-
Notifications
You must be signed in to change notification settings - Fork 0
maven-central then bilt-maven #3
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
Draft
kenkania
wants to merge
8
commits into
master
Choose a base branch
from
curses-ken
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+113
−11
Draft
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| # Bilt AR Wagon Fork | ||
|
|
||
| go/arwagon | ||
|
|
||
| This describes how to use Bilt's GCP Artifact Registry maven wagon fork, which has much improved | ||
| performance. GCP promised they are treating poor Java AR performance as critical, but it is unclear | ||
| when significant improvements will actually be made. | ||
|
|
||
| Q: Would it be just as fast to use virtual with fallback to maven central in pom.xml? | ||
| Q: Does remote API have quota problems unlike remote? | ||
| Q: Does remote API not pull from central unlike remote? | ||
| Q: how to do jobrunr crap? | ||
|
|
||
|
|
||
|
|
||
| ## Interface | ||
|
|
||
| On GitHub, we use remote API; everywhere else we just use maven central. This can be overriden by: | ||
|
|
||
| * **-Dcom.bilt.internal.arwagon.bilt-redirect=<value>**, where value is either: | ||
| * none | ||
| * standard | ||
| * **-Dcom.bilt.internal.arwagon.other-redirect=<value>**, where value is either: | ||
| * none | ||
| * remote | ||
| * remote-api | ||
| * maven-central | ||
|
|
||
|
|
||
| ## Performance | ||
|
|
||
| On Github ubuntu-latest, with wagon 2.2.5, mvn 3.9.11 (default), mvn go:dependency-offline took: | ||
|
|
||
| * tests/maven-0-artifacts: 19:21 min | ||
| * tests/quarkus-starter: 39:04 min | ||
| * tests/payment-svc: 179 min | ||
|
|
||
| On local dev machine in VA, maven 3.8.7, tests/maven-0-artifacts (~450 downloads, excluding SHAs): | ||
|
|
||
| * maven central: 12s | ||
| * wagon 2.2.5, bilt-maven (mvn will fallback to maven central): 1:27 min | ||
| * wagon 2.2.5, bilt-maven, fallback to maven-central-cache: 5:32 min | ||
| * wagon 2.2.5, virtual: 13:08 min | ||
| * wagon 2.2.5 (edited), virtual, redirect non-bilt to remote AR API: 1:43min | ||
|
|
||
| See here for more numbers: https://docs.google.com/document/d/1z8XYDS-xTj2Y3EzUMFGM-lqa9zGcHnjo3B_KI-aiiBc/edit?tab=t.0#heading=h.hhx1fxwzd219 | ||
|
|
||
| ## Future Improvements | ||
|
|
||
| use latest maven with parallelization flags and bf collector (2-10x) | ||
|
|
||
| run builds in GCP network (2-10x) | ||
|
|
||
| prefetch SHAs/JARs (or lazily verify SHAs) | ||
|
|
||
| > Maven fetches pom, then pom.sha1, then eventually jar, then jar.sha1. We can prefetch on | ||
| > pom request, and/or compute the SHAs ourself and verify async. | ||
|
|
||
| better connection pooling / http2 (~15% from early experiments) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
| <groupId>org.acme</groupId> | ||
| <artifactId>slow</artifactId> | ||
| <version>1.0.0-SNAPSHOT</version> | ||
|
|
||
| <properties> | ||
| <compiler-plugin.version>3.14.0</compiler-plugin.version> | ||
| <maven.compiler.release>21</maven.compiler.release> | ||
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
| <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
| <skipITs>true</skipITs> | ||
| </properties> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>com.biltcard.common</groupId> | ||
| <artifactId>egress-proxy</artifactId> | ||
| <version>1.1.2</version> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <artifactId>maven-compiler-plugin</artifactId> | ||
| <version>${compiler-plugin.version}</version> | ||
| <configuration> | ||
| <parameters>true</parameters> | ||
| </configuration> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| </project> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Issue on line in
run_test.sh:91:Maven will always reference the
artifactregistry://URLs insettings.xml, but the Artifact Registry wagon is only configured whenREPO_URLis set. If a user clearsREPO_URL, Maven will fail to resolve those URLs without the wagon installed.The root cause is that
settings.xmlis generated unconditionally withartifactregistry://repositories, while the wagon (viaextensions.xml) is only installed inside theif [[ -n "$REPO_URL" ]]block.Consider only writing and using the custom
settings.xmlwhenREPO_URLis non-empty, so that Maven falls back to its default central repository behavior when no Artifact Registry URL is provided.