-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Fix pointing exact version with BP_JAVA_VERSION #1358
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: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -313,6 +313,14 @@ dependencies: | |
| Expect(dep.Name).To(Equal("openjdk")) | ||
| Expect(dep.Version).To(Equal("17.0.13")) | ||
| }) | ||
|
|
||
| It("resolves exact patch version", func() { | ||
| os.Setenv("BP_JAVA_VERSION", "17.0.13") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The basic fix probably works as far as I can tell, but the actual versions of JRE are like: X.Y.Z+W format (17.0.19+11). Consider adding a test where BP_JAVA_VERSION resolves against a manifest entry 17.0.19+11. I also thought we use "JBP_CONFIG_OPEN_JDK_JRE: '{ jre: { version: "25.0.3" } }'", I assume the fix also works for those cases, but maybe also add test case to be sure. |
||
| dep, err := jres.GetJREVersion(ctx, "openjdk") | ||
| Expect(err).NotTo(HaveOccurred()) | ||
| Expect(dep.Name).To(Equal("openjdk")) | ||
| Expect(dep.Version).To(Equal("17.0.13")) | ||
| }) | ||
| }) | ||
|
|
||
| Context("without BP_JAVA_VERSION", func() { | ||
|
|
||
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.
Although this code is probably not on a hot path, you can also hoist regexes so its no compiled for each call, e.g.