-
Notifications
You must be signed in to change notification settings - Fork 18
✨ Bring in maven index from release #158
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
Conversation
Signed-off-by: Juan Manuel Leflet Estrada <[email protected]>
WalkthroughAdds a new Docker multi-stage build step (index-download) that installs wget/zip, downloads and unpacks Maven index data, and copies two metadata files into the final image at /usr/local/etc/maven-index.txt and /usr/local/etc/maven-index.idx. Existing stages remain; final image now contains Maven index metadata. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as Docker Build
participant IDX as index-download Stage
participant REM as Remote Maven Index
participant FIN as Final Image
Dev->>IDX: Build index-download stage
IDX->>REM: wget Maven index ZIP
REM-->>IDX: ZIP bytes
IDX->>IDX: unzip to /maven-index-data
Dev->>FIN: Build final stage
FIN->>IDX: COPY central.archive-metadata.txt
FIN->>IDX: COPY central.archive-metadata.idx
note over FIN: Files placed at\n/usr/local/etc/maven-index.txt\n/usr/local/etc/maven-index.idx
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
Dockerfile(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build tackle2-addon-analyzer
| RUN microdnf install -y wget zip && microdnf clean all && rm -rf /var/cache/dnf | ||
| WORKDIR /maven-index-data | ||
| #TODO: get latest release when we get to update them periodically | ||
| RUN wget --quiet https://github.com/konveyor/maven-search-index/releases/download/v0.0.1/maven-index-data-v0.0.1.zip -O maven-index-data.zip && unzip maven-index-data.zip && rm maven-index-data.zip |
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.
Install unzip before using it.
The new stage invokes unzip, but UBI’s zip package does not ship the unzip binary, so this layer fails during the build. Install unzip (or both zip unzip) before running the command.
-RUN microdnf install -y wget zip && microdnf clean all && rm -rf /var/cache/dnf
+RUN microdnf install -y wget unzip && microdnf clean all && rm -rf /var/cache/dnf📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| RUN microdnf install -y wget zip && microdnf clean all && rm -rf /var/cache/dnf | |
| WORKDIR /maven-index-data | |
| #TODO: get latest release when we get to update them periodically | |
| RUN wget --quiet https://github.com/konveyor/maven-search-index/releases/download/v0.0.1/maven-index-data-v0.0.1.zip -O maven-index-data.zip && unzip maven-index-data.zip && rm maven-index-data.zip | |
| RUN microdnf install -y wget unzip && microdnf clean all && rm -rf /var/cache/dnf | |
| WORKDIR /maven-index-data | |
| #TODO: get latest release when we get to update them periodically | |
| RUN wget --quiet https://github.com/konveyor/maven-search-index/releases/download/v0.0.1/maven-index-data-v0.0.1.zip -O maven-index-data.zip && unzip maven-index-data.zip && rm maven-index-data.zip |
🤖 Prompt for AI Agents
In Dockerfile around lines 29 to 32, the RUN uses the unzip binary but only
installs the zip package (which on UBI doesn't provide unzip); update the RUN
that currently does "microdnf install -y wget zip ..." to include unzip (e.g.,
microdnf install -y wget zip unzip ...) so the unzip command is available, keep
the subsequent microdnf clean and rm -rf /var/cache/dnf as-is to avoid leaving
package cache.
| RUN microdnf install -y wget zip && microdnf clean all && rm -rf /var/cache/dnf | ||
| WORKDIR /maven-index-data | ||
| #TODO: get latest release when we get to update them periodically | ||
| RUN wget --quiet https://github.com/konveyor/maven-search-index/releases/download/v0.0.1/maven-index-data-v0.0.1.zip -O maven-index-data.zip && unzip maven-index-data.zip && rm maven-index-data.zip |
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.
How do we keep this up to date are there going to be version bumps?
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.
We will have version bumps yeah, but for the moment we are going to stick to the current version. We can grab the latest version and hardcoded here or pass it through an argument in the future.
Signed-off-by: Cherry Picker <[email protected]>
- Adds search functionality using pre-generated, bundled index - Removes unneeded functionality: - Maven central HTTP sha search - Search by list of public groupIds - `disableMavenSearch` is no longer used - to be removed in a subsequent PR? Addresses https://issues.redhat.com/browse/MTA-6231 Requires konveyor/java-analyzer-bundle#158 Bundle PR: 158 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added local Maven index lookup and utilities (index entry type and random-name helper) for resolving Java artifacts. * **Improvements** * Dependency extraction, decompilation, and source resolution now use a configurable Maven index path for more reliable, faster resolution. * **Removed** * Removed reliance on open-source dependency label lists and remote Maven HTTP lookup in resolution flows. * **Refactor** * Public interfaces updated to accept and propagate a Maven index path instead of label-based inputs. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Juan Manuel Leflet Estrada <[email protected]>
- Adds search functionality using pre-generated, bundled index - Removes unneeded functionality: - Maven central HTTP sha search - Search by list of public groupIds - `disableMavenSearch` is no longer used - to be removed in a subsequent PR? Addresses https://issues.redhat.com/browse/MTA-6231 Requires konveyor/java-analyzer-bundle#158 Bundle PR: 158 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added local Maven index lookup and utilities (index entry type and random-name helper) for resolving Java artifacts. * **Improvements** * Dependency extraction, decompilation, and source resolution now use a configurable Maven index path for more reliable, faster resolution. * **Removed** * Removed reliance on open-source dependency label lists and remote Maven HTTP lookup in resolution flows. * **Refactor** * Public interfaces updated to accept and propagate a Maven index path instead of label-based inputs. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Juan Manuel Leflet Estrada <[email protected]> Signed-off-by: Cherry Picker <[email protected]>
* Bring in maven index from release (#158) Signed-off-by: Cherry Picker <[email protected]> * Add tag to use release-0.8 addon Signed-off-by: Juan Manuel Leflet Estrada <[email protected]> * Add api_hub_tests_ref to global CI workflow Signed-off-by: Dylan Murray <[email protected]> --------- Signed-off-by: Cherry Picker <[email protected]> Signed-off-by: Juan Manuel Leflet Estrada <[email protected]> Signed-off-by: Dylan Murray <[email protected]> Co-authored-by: Juan Manuel Leflet Estrada <[email protected]> Co-authored-by: Dylan Murray <[email protected]>
- Adds search functionality using pre-generated, bundled index - Removes unneeded functionality: - Maven central HTTP sha search - Search by list of public groupIds - `disableMavenSearch` is no longer used - to be removed in a subsequent PR? Addresses https://issues.redhat.com/browse/MTA-6231 Requires konveyor/java-analyzer-bundle#158 Bundle PR: 166 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added local Maven index lookup and utilities (index entry type and random-name helper) for resolving Java artifacts. * **Improvements** * Dependency extraction, decompilation, and source resolution now use a configurable Maven index path for more reliable, faster resolution. * **Removed** * Removed reliance on open-source dependency label lists and remote Maven HTTP lookup in resolution flows. * **Refactor** * Public interfaces updated to accept and propagate a Maven index path instead of label-based inputs. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Juan Manuel Leflet Estrada <[email protected]> Signed-off-by: Cherry Picker <[email protected]> Signed-off-by: Juan Manuel Leflet Estrada <[email protected]> Signed-off-by: Cherry Picker <[email protected]> Co-authored-by: Juan Manuel Leflet Estrada <[email protected]>
https://issues.redhat.com/browse/MTA-6231
Summary by CodeRabbit
New Features
Chores