villebro opened a new pull request, #37024:
URL: https://github.com/apache/superset/pull/37024
### SUMMARY
Dev mode is currently broken for backend changes. The initial build works
correctly, but when a backend file changes, an exception is raised:
```python
Exception in thread Thread-1:
Traceback (most recent call last):
File "/Users/ville/.pyenv/versions/3.10-dev/lib/python3.10/threading.py",
line 1016, in _bootstrap_inner
self.run()
File
"/Users/ville/projects/superset/venv/lib/python3.10/site-packages/watchdog/observers/api.py",
line 213, in run
self.dispatch_events(self.event_queue)
File
"/Users/ville/projects/superset/venv/lib/python3.10/site-packages/watchdog/observers/api.py",
line 391, in dispatch_events
handler.dispatch(event)
File
"/Users/ville/projects/superset/venv/lib/python3.10/site-packages/watchdog/events.py",
line 216, in dispatch
self.on_any_event(event)
File
"/Users/ville/projects/superset/superset-extensions-cli/src/superset_extensions_cli/cli.py",
line 393, in <lambda>
backend_handler.on_any_event = lambda event: backend_watcher()
File
"/Users/ville/projects/superset/superset-extensions-cli/src/superset_extensions_cli/cli.py",
line 370, in backend_watcher
write_manifest(cwd, manifest)
File
"/Users/ville/projects/superset/superset-extensions-cli/src/superset_extensions_cli/cli.py",
line 166, in write_manifest
manifest.model_dump_json(indent=2, exclude_none=True, by_alias=True)
AttributeError: 'dict' object has no attribute 'model_dump_json'
```
This fixes the bug (backend changes don't require manifest changes, only
copying the files to the `dist` folder) and updates the associated tests. Now
when backend files are changed, we only see this on the command line:
```
✅ Backend files synced
```
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in
[SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]