Skip to content

Fix Neon extension: Unify command structure and remove preview status#9090

Merged
kairu-ms merged 17 commits intoAzure:mainfrom
Bhargavsaichinni:fix/neon-extension-unified-structure
Sep 1, 2025
Merged

Fix Neon extension: Unify command structure and remove preview status#9090
kairu-ms merged 17 commits intoAzure:mainfrom
Bhargavsaichinni:fix/neon-extension-unified-structure

Conversation

@Bhargavsaichinni
Copy link
Copy Markdown
Contributor

@Bhargavsaichinni Bhargavsaichinni commented Aug 26, 2025

  • Fix dual command structure issue (az neon + az neon postgres -> unified az neon)
  • Remove preview flags from extension metadata (azext.isPreview: false)
  • Update az neon create command to use GA API version (2025-03-01)
  • Remove preview flags from individual commands
  • Fix duplicate examples in organization create command
  • Reorganize command structure to match Azure CLI patterns (similar to az sql)
  • Backup original structure preserved in src/neon-backup/

Breaking Changes:

  • Commands moved from 'az neon postgres X' to 'az neon X'
  • Extension no longer in preview mode

Addresses feedback items for production readiness.


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

Copilot AI review requested due to automatic review settings August 26, 2025 09:05
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Aug 26, 2025

❌Azure CLI Extensions Breaking Change Test
❌neon
rule cmd_name rule_message suggest_message
1012 - SubgroupRemove neon postgres sub group neon postgres removed please confirm sub group neon postgres removed
⚠️ 1011 - SubgroupAdd neon branch sub group neon branch added
⚠️ 1011 - SubgroupAdd neon compute sub group neon compute added
⚠️ 1001 - CmdAdd neon create cmd neon create added
⚠️ 1011 - SubgroupAdd neon endpoint sub group neon endpoint added
⚠️ 1011 - SubgroupAdd neon neon-database sub group neon neon-database added
⚠️ 1011 - SubgroupAdd neon neon-role sub group neon neon-role added
⚠️ 1011 - SubgroupAdd neon organization sub group neon organization added
⚠️ 1011 - SubgroupAdd neon project sub group neon project added

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Hi @Bhargavsaichinni,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Aug 26, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown
Contributor

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR unifies the Neon extension command structure and removes preview status to prepare for production release. The dual command structure (az neon and az neon postgres) is consolidated into a single az neon hierarchy, and all preview flags are removed.

Key changes:

  • Unified command structure from dual structure to single az neon pattern
  • Removed preview status from extension metadata (azext.isPreview: false)
  • Updated all commands to use GA API version (2025-03-01)

Reviewed Changes

Copilot reviewed 62 out of 99 changed files in this pull request and generated 1 comment.

File Description
src/neon/azext_neon/azext_metadata.json Removed preview status and updated minimum CLI version
src/neon/azext_neon/aaz/latest/neon/project/*.py Added new project management commands under unified structure
src/neon/azext_neon/aaz/latest/neon/organization/_wait.py Added organization wait command

@github-actions
Copy link
Copy Markdown
Contributor

CodeGen Tools Feedback Collection

Thank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 26, 2025

@github-actions github-actions bot added release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. and removed release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. labels Aug 26, 2025
@Bhargavsaichinni Bhargavsaichinni force-pushed the fix/neon-extension-unified-structure branch from 60d15e2 to e433582 Compare August 28, 2025 05:35
@Bhargavsaichinni Bhargavsaichinni force-pushed the fix/neon-extension-unified-structure branch from e433582 to 2aab993 Compare August 28, 2025 05:41
@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Aug 28, 2025

Please fix CI issues

…-cal jobs

The version-output job depends on artifacts from these prerequisite jobs.
Adding issues:write permissions to ensure proper coordination of workflow
execution and potential GitHub API interactions.
Correct version to follow proper semantic versioning:
- Main branch has 1.0.0b4 (beta 4)
- This PR introduces 1.0.0 (stable GA release)
- Consolidated all changes into single 1.0.0 release entry

This fixes the version calculation error in the workflow that
expects proper version progression without skipping stable versions.
Document complete transformation:
- Command structure unification (removed duplicate postgres wrapper)
- GA transition (1.0.0b4 → 1.0.0) with proper version progression
- GitHub Actions workflow fixes (permissions, dependencies)
- Style validation resolution (tabs, whitespace, HISTORY ordering)
- Risk assessment and testing validation procedures

This README serves as complete documentation for reviewers
and future maintainers of the Neon extension changes.
Restore the postgres command group file but without registering it as a
separate command group. This maintains structural consistency for the
version calculation system while keeping commands flattened under 'neon'.

The file exists for organizational purposes but does not create the
duplicate 'neon postgres' command group that was causing UX issues.
Remove all workflow modifications we made including:
- issues:write permissions additions
- packaging>=25 dependency upgrade
- warning-only error handling changes
- workflow permission enhancements

This restores the file to its original state from upstream/main
to test if the version calculation works with the original workflow.
Following version calculation system recommendations:
- VERSION: 1.0.0 → 1.0.0b5 (beta progression)
- azext.isPreview: false → true (restore preview status)
- Development Status: Production/Stable → Beta
- HISTORY.rst: Updated to reflect beta release with command structure improvements

This maintains the command structure flattening changes while following
the proper version progression path recommended by the system.
@github-actions github-actions bot removed the release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. label Aug 28, 2025
@Bhargavsaichinni
Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree company="Microsoft"

…ng guidelines

- Update VERSION from 1.0.0 to 2.0.0b1 to comply with breaking change requirements
- Restore preview status (azext.isPreview: true) and Beta classifier
- Update HISTORY.rst to properly document breaking changes from 1.0.0b4 to 2.0.0b1
- Breaking changes require major version increment per official Microsoft guidelines
@github-actions github-actions bot added the release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. label Aug 28, 2025
- Update VERSION from 2.0.0b1 back to 1.0.0b5 as requested
- Update HISTORY.rst to match version 1.0.0b5
- Maintain preview status and Beta classifier for compatibility
@github-actions github-actions bot removed the release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. label Aug 28, 2025
@necusjz
Copy link
Copy Markdown
Member

necusjz commented Aug 29, 2025

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

- Updated test commands from 'az neon postgres <subcommand>' to 'az neon <subcommand>'
- Fixed command group registration to use flattened structure instead of hierarchical
- Removed legacy postgres wrapper comments and restored proper import structure
- This resolves the CI failure where 'postgres' was not recognized as a valid subcommand

All tests now use the correct command format:
- az neon organization (create|list|show|delete)
- az neon project (create|list|show|delete)
- az neon branch (create|list|delete)
- az neon neon-database list
- az neon neon-role list
@azure-pipelines
Copy link
Copy Markdown

Commenter does not have sufficient privileges for PR 9090 in repo Azure/azure-cli-extensions

@FumingZhang
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls make it under neon folder instead of root folder

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't make sense to me to keep all the files under postgres folder since all az neon postgres [command] is now az neon [command]

cc @kairu-ms for review

@kairu-ms kairu-ms merged commit a973f80 into Azure:main Sep 1, 2025
25 checks passed
@azclibot
Copy link
Copy Markdown
Collaborator

azclibot commented Sep 1, 2025

[Release] Update index.json for extension [ neon-1.0.0b5 ] : https://dev.azure.com/msazure/One/_build/results?buildId=135656231&view=results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot SQL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants