feat(extensions): add update command to extensions cli#38651
feat(extensions): add update command to extensions cli#38651villebro wants to merge 6 commits intoapache:masterfrom
Conversation
Code Review Agent Run #1255ffActionable Suggestions - 0Additional Suggestions - 4
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Sequence DiagramThis PR adds an update command that makes extension json the source of truth for version values and propagates that version to frontend and backend metadata files. It also extends validate to fail when versions diverge and direct users to run update. sequenceDiagram
participant Developer
participant CLI
participant ExtensionFile
participant FrontendFile
participant BackendFile
Developer->>CLI: Run update with optional version
CLI->>ExtensionFile: Read current version
alt Version flag is provided
CLI->>ExtensionFile: Write new version
end
CLI->>FrontendFile: Sync package version
CLI->>BackendFile: Sync project version
CLI-->>Developer: Report updated files or no changes
Developer->>CLI: Run validate
CLI->>FrontendFile: Check version matches extension file
CLI->>BackendFile: Check version matches extension file
CLI-->>Developer: Validation success or mismatch with update guidance
Generated by CodeAnt AI |
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #38651 +/- ##
==========================================
- Coverage 64.98% 64.37% -0.62%
==========================================
Files 1819 2537 +718
Lines 72515 130164 +57649
Branches 23149 29905 +6756
==========================================
+ Hits 47126 83789 +36663
- Misses 25389 44923 +19534
- Partials 0 1452 +1452
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review Agent Run #3abf02
Actionable Suggestions - 1
-
superset-extensions-cli/src/superset_extensions_cli/cli.py - 1
- License comparison bug in validation · Line 406-410
Review Details
-
Files reviewed - 6 · Commit Range:
242f17f..16fc206- superset-extensions-cli/src/superset_extensions_cli/cli.py
- superset-extensions-cli/tests/conftest.py
- superset-extensions-cli/tests/test_cli_update.py
- superset-extensions-cli/tests/test_cli_validate.py
- requirements/base.txt
- requirements/development.txt
-
Files skipped - 1
- docs/developer_docs/extensions/development.md - Reason: Filter setting
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ Successful
Bito Usage Guide
Commands
Type the following command in the pull request comment and save the comment.
-
/review- Manually triggers a full AI review. -
/pause- Pauses automatic reviews on this pull request. -
/resume- Resumes automatic reviews. -
/resolve- Marks all Bito-posted review comments as resolved. -
/abort- Cancels all in-progress reviews.
Refer to the documentation for additional commands.
Configuration
This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.
Documentation & Help
Code Review Agent Run #40cd39Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
User description
SUMMARY
This adds a new
updatecommand that will be needed for introducing translations, and will do general automated metadata syncing and updating across frontend/backend.Changes
superset-extensions updatecommand that syncs derived files (package.json,pyproject.toml) fromextension.json--version [<version>]and--license [<license>]flags set new values across all files; both prompt with the current value as default when used without a valuevalidatenow checks version and license consistency acrossextension.json,package.json, andpyproject.toml(non-zero exit on mismatch, useful for CI)write_json/write_tomlutils alongside existingread_json/read_tomltomli-was a dependency for TOML writinginit,build,devetc)Test plan
Examples
Validate
$ superset-extensions validate ❌ Metadata mismatch detected: backend/pyproject.toml version: 0.1.1 (expected 0.1.0) backend/pyproject.toml license: MIT (expected Apache-2.0) Run `superset-extensions update` to sync from extension.json.If the backend's
pyproject.tomlis out of syncUpdate version interactively:
Update version inline:
Update both license and version interactively:
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION
CodeAnt-AI Description
Add an
updatecommand and strict metadata consistency checks to the CLIWhat Changed
superset-extensions updatecommand that syncs version and license from extension.json into frontend/package.json and backend/pyproject.toml; shows which files were updated or reports "All files already up to date."--version [<version>]and--license [<license>]flags allow setting values inline or prompt for them when used without a value.superset-extensions validatenow fails when version or license in frontend/backend do not match extension.json and prints a clear "Metadata mismatch detected" message advisingsuperset-extensions update.Impact
✅ Clearer metadata mismatch errors✅ Shorter fix cycle for version/license drift✅ Fewer CI failures from inconsistent extension metadata💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.