-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[App Service] az webapp list runtimes: Update logic to include missing Java versions and remove hardcoded lists
#32461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
…a 25 - Remove hardcoded Java version lists that were missing Java 25 - Add dynamic parsing of Java versions from API's runtimes array - Add _get_java_versions_from_minor_versions() for Linux Java SE containers - Add _get_java_versions_from_windows_container() for Windows containers - Add _get_java_runtimes_from_container_settings() for Linux container runtimes - Add deduplication to prevent duplicate runtime entries (e.g., JBOSSEAP) - Future-proof: new Java versions will automatically appear without code changes
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
|
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). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
There was a problem hiding this 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 enhances the az webapp list-runtimes command to dynamically discover Java versions from the API instead of using hardcoded lists, ensuring Java 25 and future versions appear automatically.
Key Changes:
- Added three new helper methods to dynamically extract Java versions from API data structures
- Implemented runtime deduplication for Linux to prevent duplicate entries (e.g., JBOSSEAP)
- Replaced hardcoded Java version lists ("21", "17", "11", "1.8") with dynamic parsing
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add _java_version_sort_key() helper to handle various version formats - Handles '1.8', '1.x', 'X.Y' (e.g., '11.0'), and plain integers - Prevents ValueError when version strings can't be directly converted to int
- Add explanatory comment for Linux-only deduplication logic - Add debug logging when no Java versions found in Windows container settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
- Use regex pattern to extract version from java*Runtime keys instead of magic string slicing - Use min() instead of ternary for limiting list length
Related command
az webapp list-runtimes
Description
Fix list-runtimes to dynamically discover Java versions including Java 25
Testing Guide
az webapp list-runtimesshould now show Java 25History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.