Separate generate/trigger child jobs with parameters defined by Configrations and Params - #7536
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors aqaTestPipeline.groovy to clearly separate downstream job generation into config-driven vs params-driven paths, addressing cases where pipeline parameters were previously ignored or inconsistently overridden (notably for private relay/manual runs).
Changes:
- Split job generation into
generateJobsWithConfig()(JSON config authoritative) andgenerateJobsFromParams()(pipeline params authoritative). - Extract shared helpers for job naming/platform-derived variables and downstream triggering/artifact collection (
buildTestFlagSuffix,resolvePlatformVars,triggerChildJob). - Simplify/centralize parameter assembly logic for downstream job triggers.
Suppressed comments (1)
buildenv/jenkins/aqaTestPipeline.groovy:593
- generateJobsWithConfig() later forces config-derived values for DYNAMIC_COMPILE/KEEP_REPORTDIR/RERUN_ITERATIONS and VENDOR_TEST_* via explicit childParams appends, but these keys are not excluded from the params.each loop. If Jenkins honors the first occurrence of a duplicate parameter, the pipeline param value could override the config value, defeating the "config is authoritative" goal. Exclude the keys that are set explicitly later from the params pass-through loop.
if (param.key in ["PLATFORMS", "TARGETS", "TOP_LEVEL_SDK_URL", "AUTO_AQA_GEN",
"JDK_VERSIONS", "VARIANT", "PIPELINE_DISPLAY_NAME"]) {
// do not pass to child jobs
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| if (param.key in ["PLATFORMS", "TARGETS", "TOP_LEVEL_SDK_URL", "AUTO_AQA_GEN", | ||
| "JDK_VERSIONS", "VARIANT", "PIPELINE_DISPLAY_NAME"]) { | ||
| // do not pass to child jobs |
| def VENDOR_TEST_REPOS = params.VENDOR_TEST_REPOS ?: (buildConfig.VENDOR_TEST_REPOS ?: '') | ||
| def VENDOR_TEST_BRANCHES = params.VENDOR_TEST_BRANCHES ?: (buildConfig.VENDOR_TEST_BRANCHES ?: '') | ||
| def VENDOR_TEST_DIRS = params.VENDOR_TEST_DIRS ?: (buildConfig.VENDOR_TEST_DIRS ?: '') | ||
| def VENDOR_TEST_DIRS = params.VENDOR_TEST_DIRS ?: (buildConfig.VENDOR_TEST_DIRS ?: '') | ||
| int rerunIterations = (params.RERUN_ITERATIONS ?: (buildConfig.RERUN_ITERATIONS ?: '0')).toString().toInteger() |
fe02c27 to
74e030c
Compare
|
Depends on #7632 |
|
Test with AUTO_AQA_GEN=true and AUTO_AQA_GEN=false, job parameters generated by configuration are same as before and parameters are passed to child jobs correctly for example https://ci.adoptium.net/job/Test_openjdk26_hs_sanity.functional_x86-64_linux/62/parameters/ - time_limit is 25 instead of job template default 10. https://ci.adoptium.net/job/AQA_Test_Pipeline_TESTING/24/ jck rerun release build https://ci.adoptium.net/job/AQA_Test_Pipeline_JCK/444/ |
andrew-m-leonard
left a comment
There was a problem hiding this comment.
looks good I think
|
@annaibm could you help to test if there is any issue with openj9 side? To test I've created aqa-tckT branch. The only difference is aqa-tckT branch set aqa repo and branch as adoptium:master, which is on purpose as test jobs are light_weight_checkout by default. Check if test jobs are triggered with correct parameters are enough. Thanks. |
|
@sophia-guo AQA_Test_Pipeline_Release #573 correctly checked out the personal repo/branch and computed the merged buildConfig — confirmed in the log: This build then triggered However: The child job's own checkout still used the default Note: I don't have access to https://openj9-jenkins.osuosl.org/ so this was run entirely on our internal hyc-runtimes-jenkins instance instead |
@annaibm this is expected. The only difference between aqa-tckT( the branch for testing) and aqa-tck( this PR branch) https://github.com/sophia-guo/openjdk-tests/compare/aqa-tck...sophia-guo:openjdk-tests:aqa-tckT?expand=1 is the test job's aqa setting is default adoptium/aqa-tests:master rather than sophia-guo/openjdk-tests:aqa-tckT. If you check the job configuration in openj9 side it will be similar as SCM repository URL is hardcoded as https://github.com/adoptium/aqa-tests.git, which will fail the job if using personal repo and branch - sophia-guo/openjdk-tests:aqa-tck. Downstream test jobs uses openjdk_tests groovy, which this PR doesn't change it. Testing parameters can be passed in correctly is enough. Thanks @annaibm . |
|
@smlambert updated, main changes
|
smlambert
left a comment
There was a problem hiding this comment.
My one comment is out of curiosity, but does not block this PR.
| if (arch.contains("x86-64")) arch = "x64" | ||
| else if (arch.contains("x86-32")) arch = "x86-32" |
There was a problem hiding this comment.
Not sure I understand why L303 resolves to x64 and L304 resolves to x86-64, as in resolves in a non-symmetrical way. Is it that this only mattered when we were building Win32 builds to build the download_url for those artifacts?

Close #7535
AqaTestPipeline triggers donwstream test jobs either by predefined configuration parameters or parameters forwarded from pipeline job itself. However several parameters (PARALLEL, NUM_MACHINES,KEEP_REPORTDIR, DYNAMIC_COMPILE) read from buildConfig only and silently discarded the incoming pipeline params, which arehardcoded as special cases. This is hard to reason about and error-prone.
Refactor generateJobs() into three focused functions:
Extract two additional shared helpers:
Each function now has a single clear source of truth for parameter values, eliminating the mixed buildConfig/?:/params fallback chains that made the previous code error-prone and hard to reason about.
Assisted by IBM Bob