Commit 5b7838b
Serdes CLI Tool (#25870)
## Summary & Motivation
Adds a `serdes` subcommand to `dagster-dev` for inspecting registered
serdes types. This is useful for understanding the full shape of the
serdes type registry for a given package — including objects, enums,
unions, and builtin types — without having to manually trace through
code.
The CLI supports three commands:
- **`list`** — lists all registered types, with optional `--detailed`,
`--json`, or `--html` output
- **`show <typename>`** — shows detailed info for a specific type
- **`tree <typename>`** — shows a type and all types it transitively
references, with optional \`--html\` output
The `--html` flag generates a self-contained HTML page with a table of
contents, cross-linked type references, hover tooltips showing full type
strings, and collapsible "Referenced by" backlink sections for each
type.
Type discovery works by scanning a package's source files for
`@whitelist_for_serdes` usage and importing those modules to populate
the whitelist map, then introspecting the registered serializers to
extract field types, base classes, field mappings, old fields, and other
compatibility metadata.
This is heavily claude-coded.
## Test Plan
Manual testing. Attaching screenshots.
`just serdes dagster list --html`

Click into an object:

Enums and unions listed separately:

Union details:

Console inspection:
```
> just serdes dagster list | grep Asset
AllAssetCheckSelection
AndAssetSelection
AssetBackfillData
AssetCheckEvaluation
AssetCheckEvaluationPlanned
...
```
Can also target a specific object:
```
> just serdes dagster tree AssetDetails
AssetDetails
Storage Name: AssetDetails
Type: dagster._core.assets.AssetDetails
Serializer: NamedTupleSerializer
Fields (1):
- last_wipe_timestamp: float | None
```
---------
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Internal-RevId: 10dc39a0c566abb8db3ac95747906fbf110db4831 parent 4987b00 commit 5b7838b
8 files changed
Lines changed: 1093 additions & 0 deletions
File tree
- python_modules/automation/automation
- dagster_dev/commands
- serdes
Lines changed: 142 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
Whitespace-only changes.
0 commit comments