Skip to content

Conversation

jmtd
Copy link
Member

@jmtd jmtd commented Feb 19, 2025

This merges ubi9 into jlink-dev and resolves the conflicts.

https://issues.redhat.com/browse/OPENJDK-3591

jmtd and others added 30 commits December 11, 2023 16:22
tzdata is deliberately broken in ubi-minimal images (presumably for
disk space reasons). The fix is to reinstall the tzdata package:

    <https://access.redhat.com/solutions/5616681>

This appears to add a neglibible amount to our image sizes (<1%)
but resolves TZ issues for Java applications.

    <https://issues.redhat.com/browse/OPENJDK-2519>

Signed-off-by: Jonathan Dowland <[email protected]>
Integrate the JLink workflow and scripts into the Ubi9 container sources
…tall

[OPENJDK-2519] Add tzdata module to reinstall tzdata
Signed-off-by: Jayashree Huttanagoudar <[email protected]>
[OPENJDK-2177] Move behave tests to relevant modules
Signed-off-by: Jayashree Huttanagoudar <[email protected]>
[OPENJDK-2177]Create a dummy module.yaml to move openjdk.feature behave test to mod…
Document (as a comment) the issue of ordering pkg-update and
tzdata modules. Depend upon the pkg-update module from tzdata,
to ensure it runs first always. This has no effect on the
container images as they stand now, since they have pkg-config
occurring first already, but if that changed, this would catch
it.

Signed-off-by: Jonathan Dowland <[email protected]>
…er-dependency

[OPENJDK-2519] tzdata module depend upon pkg-update
[OPENJDK-2177] Delete OPENJDK-1549 as it is already moved to new test application source repository
Signed-off-by: Adriano Machado <[email protected]>
…them with appropriate modules

Signed-off-by: Jayashree Huttanagoudar <[email protected]>
[OPENJDK-2177] Split the tests inside tests/features/java/runtime.feature to couple them with appropriate modules
Signed-off-by: Jayashree Huttanagoudar <[email protected]>
[OPENJDK-2837] Follow-on test clean-up work for ubi9
Add a test which ensures s2i binary-build works with a destination
directory not owned by UID 185 (/var/tmp), which means the running
process does not have permission to change its timestamps,
simulating a random UID and the permissions on /deployments.

Signed-off-by: Jonathan Dowland <[email protected]>
If the S2I build runs as a user other than 185 (such as s2i's default
of 1001), attempting to set the timestamp of /deployments will fail,
causing the build to fail.

https://issues.redhat.com/browse/OPENJDK-2850

See also
https://issues.redhat.com/browse/OPENJDK-2408

Signed-off-by: Jonathan Dowland <[email protected]>
…nto run-java.sh

- This tweak is to avoid defining JBOSS_CONTAINER_UTIL_LOGGING_MODULE as ENV in templates/jlink/Dokcerfile
- Deleted run-env.sh and folded its content to run-java.sh as its not doing anything much other than setting value of JAVA_APP_DIR

Signed-off-by: Jayashree Huttanagoudar <[email protected]>
Signed-off-by: Jayashree Huttanagoudar <[email protected]>
…GING_MODULE and JBOSS_CONTAINER_JAVA_RUN_MODULE

Signed-off-by: Jayashree Huttanagoudar <[email protected]>
…sts. Instead checks for some common label and image labels are correct. So its good to rename the test.

Signed-off-by: Jayashree Huttanagoudar <[email protected]>
[OPENJDK-2837] UBI9: Rename the test suitably
jmtd and others added 14 commits November 21, 2024 13:45
The changes in this fork are integrated upstream.

https://issues.redhat.com/browse/OPENJDK-3450

Signed-off-by: Jonathan Dowland <[email protected]>
This test is designed to run a custom s2i/assemble script provided by
the application source. That script prints the string "appsrc-provided
s2i assemble script executed" during execution. Expand the test to check
for this string to ensure the script has been executed.

Signed-off-by: Jonathan Dowland <[email protected]>
[OPENJDK-3450] Stop using fork of behave-test-steps
[OPENJDK-3453] Ensure custom s2i script is run in test
The default path within images for S2I scripts is /usr/libexec/s2i.
Some tools, in some circumstances, will try to execute scripts in
that path. Create a symlink so they work.

For RHEL10, we'll move the scripts to that location.

https://issues.redhat.com/browse/OPENJDK-2805

Signed-off-by: Jonathan Dowland <[email protected]>
…path-ubi9

[OPENJDK-2805] Symlink /usr/libexec/s2i
Update cekit/actions-setup-cekit to v1.1.7
This test seems to stall, especially for the runtime images.

https://issues.redhat.com/browse/OPENJDK-3536

Signed-off-by: Jonathan Dowland <[email protected]>
…-test

[OPENJDK-3536] temporarily disable flaky test
This test checks a custom test application source to ensure that
a custom settings.xml, which defines a custom profile, has been
activated.

Signed-off-by: Jonathan Dowland <[email protected]>
…ile-active

[OPENJDK-3597] test for MAVEN_SETTINGS_XML
The hsperfdata path is determined by the running user's username.
This is no longer "jboss", but "default". Use "${USER}" so that we
catch any future changes in username.

Signed-off-by: Jonathan Dowland <[email protected]>
[OPENJDK-3637] clean up correct hsperfdata path
@jmtd jmtd force-pushed the 3591-merge-back-jlink branch from 405d2b8 to 762880c Compare February 25, 2025 07:32
@jmtd
Copy link
Member Author

jmtd commented Feb 25, 2025

As of 762880c , behave test results from a local build (and local test run) are

8 features passed, 0 failed, 7 skipped
18 scenarios passed, 0 failed, 51 skipped
52 steps passed, 0 failed, 150 skipped, 0 undefined
Took 10m53.976s

'the @ignore (S2I) tests:

1 feature passed, 0 failed, 14 skipped
20 scenarios passed, 0 failed, 49 skipped
58 steps passed, 0 failed, 144 skipped, 0 undefined
Took 2m15.175s

@jmtd
Copy link
Member Author

jmtd commented Feb 25, 2025

test results on internal build (inc. s2i tests)

9 features passed, 0 failed, 6 skipped
38 scenarios passed, 0 failed, 31 skipped
110 steps passed, 0 failed, 92 skipped, 0 undefined
Took 12m0.062s

internal build pushed to quay.io/jdowland/openjdk-21-jlink-rhel9-tech-preview:latest

Copy link

@sefroberg sefroberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are attempting this merge in a more complicated way than it needs to be. Try just branch to branch merge?
I see a delta of 75 commits in 73 files here: jlink-dev...ubi9

@jmtd jmtd force-pushed the 3591-merge-back-jlink branch from 762880c to 3af343e Compare March 3, 2025 15:56
@jmtd
Copy link
Member Author

jmtd commented Mar 3, 2025

Updated the merge commit with some fixes (thanks to @sefroberg for helping me spot them):

  • half the files in the jlink module were missing
  • pathfinder and jlink not hooked into s2i.bash module
  • S2I_ENABLE_JLINK not defined in s2i.core

@jmtd
Copy link
Member Author

jmtd commented Mar 3, 2025

behave test status on current state of this PR (3af343e):

Failing scenarios:
  features/jboss.container.java.jlink/jlink.feature:5  tech preview warning is printed (OPENJDK-3038)
  features/jboss.container.java.jlink/jlink.feature:16  Check that /tmp/jre/bin/java and /tmp/jre/lib/modules exist post s2i build if jlink is enabled.

8 features passed, 1 failed, 7 skipped
19 scenarios passed, 2 failed, 51 skipped
56 steps passed, 2 failed, 152 skipped, 0 undefined
Took 15m31.523s

The test tagging is not quite right (not enough tests running); that may also be a problem in the jlink-dev branch (I'll compare).

the two test failures are jlink specific and point at problems in this merge. digging further.

@jmtd
Copy link
Member Author

jmtd commented Mar 3, 2025

The jlink-specific tests are broken in jlink-dev too. I'll file a separate issue for that.

edit: tracker for one broken test is https://issues.redhat.com/browse/OPENJDK-3647

and the other https://issues.redhat.com/browse/OPENJDK-3038

(Fixes in #564)

Likewise test tagging

edit: test tagging is tracked in https://issues.redhat.com/browse/OPENJDK-3598

@jmtd
Copy link
Member Author

jmtd commented Mar 3, 2025

build from this branch quay.io/jdowland/openjdk-21-jlink-rhel9-tech-preview:latest

@jmtd jmtd merged commit 7e16de1 into rh-openjdk:jlink-dev Mar 4, 2025
0 of 6 checks passed
@jmtd
Copy link
Member Author

jmtd commented Mar 4, 2025

Here we go!

@jmtd jmtd deleted the 3591-merge-back-jlink branch March 4, 2025 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants