fix(flex-linux-setup): fetch admin-ui-plugin from the jans GitHub release#2886
Conversation
…ease jenkins.jans.io was shut off when Janssen moved artifact publishing to GitHub release assets, so flex_setup.py's admin-ui-plugin download (jenkins.jans.io/maven/...) 404'd and admin-ui-plugin-<ver>-distribution.jar was missing from /opt/dist/jans in the flex packages. Route it through jans-linux-setup's base.determine_jans_artifact_url with app_info['jans_version'] - the same helper jans-linux-setup uses for the auth-client/fido2 jars - so the asset name and release tag (nightly vs v<version>) stay consistent with the jans build being installed. Drop the now-unused maven_base_url constant and urljoin import. Signed-off-by: moauto <54212639+mo-auto@users.noreply.github.com>
📝 WalkthroughWalkthroughIn ChangesAdmin-UI JAR URL Source Refactor
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@flex-linux-setup/flex_linux_setup/flex_setup.py`:
- Around line 365-368: The code references
base.current_app.app_info['jans_version'] in the determine_jans_artifact_url
call for the admin-ui-plugin artifact URL, but this key does not exist in
base.current_app.app_info and will cause a KeyError at runtime. Replace the
reference to base.current_app.app_info['jans_version'] with
app_versions['jans_version'] in the format string, since the local app_versions
dictionary (populated on line 146) contains the correctly computed jans_version
that combines JANS_APP_VERSION with JANS_BUILD.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 68bf482e-36f2-473e-a7bb-cda12aa378ba
📒 Files selected for processing (1)
flex-linux-setup/flex_linux_setup/flex_setup.py




Summary
jenkins.jans.iowas shut off when the Janssen project moved artifact publishing from Jenkins to GitHub (Packages + release assets).flex-linux-setupstill downloaded the admin-ui-plugin distribution jar fromjenkins.jans.io/maven/..., so the download 404'd andadmin-ui-plugin-<ver>-distribution.jarwent missing from/opt/dist/jans/in the flex packages.Change
Route that one download through jans-linux-setup's
base.determine_jans_artifact_url(...)(the helperflex_setup.pyalready imports), which builds the GitHub release asset URL.../releases/download/<tag>/admin-ui-plugin-<ver>-distribution.jar. The version comes frombase.current_app.app_info['jans_version']so the asset name and the release tag (nightlyvsv<version>) both derive from the jans build being installed — exactly how jans-linux-setup fetches the auth-client and fido2 jars. The now-unusedmaven_base_urlconstant andurljoinimport are removed.The asset is published on the jans release (e.g.
admin-ui-plugin-2.2.0-distribution.jaronv2.2.0).Summary by CodeRabbit