Skip to content

Conversation

@Amrutha-Kanhirathingal
Copy link
Contributor

@Amrutha-Kanhirathingal Amrutha-Kanhirathingal commented Oct 24, 2025

@Amrutha-Kanhirathingal Amrutha-Kanhirathingal marked this pull request as draft October 24, 2025 14:43
@Amrutha-Kanhirathingal
Copy link
Contributor Author

Amrutha-Kanhirathingal commented Oct 24, 2025

Logs :

  • System jars are already present in machine

https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/55715/console

  • Added wrong url to fail downloading jar using custom url (FYI -the log and snapshot has old log statements which may not be matching with the current pr logs)
image

https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/55707/consoleFull

@llxia
Copy link
Contributor

llxia commented Oct 24, 2025

I do not see that a customUrl is set and used for non-system tests. Please check descriptions in adoptium/aqa-tests#6461 (comment)

00:03:06.008  Custom URL: https://openj9-jenkins.osuosl.org/job/test.getDependency/lastSuccessfulBuild/artifact/
00:03:34.431       [exec] Downloading jar from third-party URL for json-simple.jar: https://repo1.maven.org/maven2/com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1.jar

sanity.functional : https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/55718/

Only ran one test. It did not run entire sanity.functional.

@Amrutha-Kanhirathingal Amrutha-Kanhirathingal force-pushed the TKG-TEST-PR branch 2 times, most recently from 0f6efab to f6657cc Compare October 28, 2025 18:34
@Amrutha-Kanhirathingal
Copy link
Contributor Author

Hi @llxia ,

As per discussion i have updated the script to consider non-system tests as well,
Please find the logs

special function : https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/55803/
extended perf : https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/55802/
sanity.function : https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/55801/parameters/
special function -failed case : https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/55812/console

Thanks

@Amrutha-Kanhirathingal Amrutha-Kanhirathingal marked this pull request as ready for review October 29, 2025 17:06
@llxia llxia requested a review from LongyuZhang October 29, 2025 20:50
catch {
print "Warning : Download failed for $fn from custom url $url: $_";
};
if (!$download_success && $url ne "") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why we need to check $url here?

my $full_dir_path = File::Spec->catdir($path, $dir);
my $url_custom = $customUrl;

my $thirdParty_Url = $url;
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use camel case or _, but do not mix them. In this case, call it third_party_url

$download_success = 1;
}
catch {
print "Error: Failed to download $fn from third-party URL ($thirdParty_Url): $_";
Copy link
Contributor

Choose a reason for hiding this comment

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

If the second download failed, the program should exit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

Comment on lines 409 to 412
unless ($download_success) {
print " ERROR: Could not download $fn from either custom or third-party URL.\n";
next;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be removed.

@llxia
Copy link
Contributor

llxia commented Oct 29, 2025

Please also run extended.functional. Since we are using a new library Try::Tiny, please run sanity.functional on zos.

@Amrutha-Kanhirathingal
Copy link
Contributor Author

Amrutha-Kanhirathingal commented Oct 30, 2025

@Amrutha-Kanhirathingal Amrutha-Kanhirathingal force-pushed the TKG-TEST-PR branch 2 times, most recently from dac6954 to 1163234 Compare October 30, 2025 16:33
$download_success = 1;
};
if (!$download_success) {
print "Warning: Download failed for $fn from custom URL $url\nDownloading $fn from third-party URL: $third_party_url\n";
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use $filename, not $fn

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

$download_success = 1;
};
if (!$download_success) {
print "Error: Failed to download $fn from third-party URL $third_party_url\n";
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use $filename, not $fn

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

use File::Copy;
use File::Spec;
use File::Path qw(make_path);

Copy link
Contributor

Choose a reason for hiding this comment

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

We can keep this blank line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deleted blank lines added back

@llxia
Copy link
Contributor

llxia commented Oct 30, 2025

Could you fix Closes : #6461 in both description and commit message? It should be using the full linkCloses: https://github.com/adoptium/aqa-tests/issues/6461

Copy link
Contributor

@LongyuZhang LongyuZhang left a comment

Choose a reason for hiding this comment

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

LGTM

@llxia
Copy link
Contributor

llxia commented Oct 30, 2025

tested in parallel: extended.functional and sanity.functional

@Amrutha-Kanhirathingal, please fix failed cases in sanity.functional.

@Amrutha-Kanhirathingal
Copy link
Contributor Author

Amrutha-Kanhirathingal commented Oct 31, 2025

@llxia
Issue fixed : eclipse-openj9/openj9#22877

@llxia
Copy link
Contributor

llxia commented Dec 1, 2025

This PR should run on the master branch (not the release branch) to ensure all dependent tests are updated accordingly.
@smlambert, I will leave it for you to merge.

@annaibm
Copy link
Contributor

annaibm commented Dec 3, 2025

@Amrutha-Kanhirathingal,
Could you please rerun the sanity.functional and sanity.system tests to confirm everything is still working? Since a month has passed, I just want to make sure nothing has broken..


# define directory path separator
my $sep = File::Spec->catfile('', '');
$customUrl = $ENV{'CUSTOM_URL'} if !defined($customUrl) || $customUrl eq '';
Copy link
Contributor

Choose a reason for hiding this comment

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

New environment variable means local usr ( not jenkins story) has to do another export. Instead of setting in Jenkins file would it be better to set in makefile ie, evnSettings.mk or settings.mk?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes Thanks for pointing this out.
https://github.com/adoptium/aqa-tests/blob/80a0985b5df03cbd05cebe9ae4a81a6a42bb8dfd/buildenv/jenkins/JenkinsfileBase#L215-L216
This is how we are fetching and assigning customUrl.
I’ll set the defaults in the Makefile as suggested.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @sophia-guo ,

When testing locally, the jars are downloaded using the third-party URLs, so we do not need to set this environment variable in the Makefile. The current behavior already works for local runs without requiring any additional exports.

Image

Copy link
Contributor

Choose a reason for hiding this comment

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

Any update?

Copy link
Contributor

@sophia-guo sophia-guo Jan 19, 2026

Choose a reason for hiding this comment

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

So this is depends on another PR in aqa-tests, adoptium/aqa-tests#6694, which introduces a new environment variable in jenkins level. So for locals customUrl="" and env CUSTOM_URL is not set, so customUrl keeps empty. For jenkins, env CUSTOM_URL is set at pre stage and build.xml can use it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes Absolutely

@Amrutha-Kanhirathingal
Copy link
Contributor Author

@Amrutha-Kanhirathingal, Could you please rerun the sanity.functional and sanity.system tests to confirm everything is still working? Since a month has passed, I just want to make sure nothing has broken..

sanity.functional : https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/56773/console
sanity.system : https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/56781/

@karianna
Copy link
Contributor

@Amrutha-Kanhirathingal You'll also need to rebase.

Copy link
Contributor

@smlambert smlambert left a comment

Choose a reason for hiding this comment

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

Waiting on the update to mk file, as discussed in the review comments, so that this will work even when not run in a Jenkins environment.

@annaibm
Copy link
Contributor

annaibm commented Jan 15, 2026

Waiting on the update to mk file, as discussed in the review comments, so that this will work even when not run in a Jenkins environment.

Just to clarify my understanding: when running the tests locally, the jars are already downloaded using the third-party URLs, and the current workflow works without requiring any additional environment variable exports. Given this behavior, I wanted to confirm whether the change to the Makefile is still required, or if the existing setup is sufficient for non-Jenkins environments.

Given that, it would be helpful if @Amrutha-Kanhirathingal could run a few local tests as well to confirm this behavior...

@Amrutha-Kanhirathingal
Copy link
Contributor Author

Amrutha-Kanhirathingal commented Jan 16, 2026

HI

image

Local test log :

image

like we mentioned before.
The current behaviour : local user downloads third party jars using the default third party url, as customUrl is neither used nor required in the local setup.Also value of customUrl is determined by Jenkins, and it varies based on the Jenkins domain.Therefore, for local users the default third-party url will be using to download jars.

@sophia-guo / @smlambert ,

please let me know still make file changes are required or not.
Thanks

@smlambert
Copy link
Contributor

Couple of notes, you need to test the case where when someone is running locally, the initial download has not run successfully. You may need to manually interrupt the download to set up that situation for testing.

One more thing I would like changed around this PR is the environment variable name, which is very generic and not informative enough to tell what CUSTOM_URL, what is it for?

Reading the issue that this PR is meant to fix, perhaps calling it DEPENDENCY_CUSTOM_URL, DEPENDENCY_FALLBACK_URL or something like that.

@smlambert
Copy link
Contributor

Also, based on my reading of the comments above, is the implication that there is yet another parameter being set via Jenkins to set this environment variable on a test node?

@smlambert
Copy link
Contributor

smlambert commented Jan 16, 2026

@sophia-guo - Can you reread the issue that describes what this intends to fix
adoptium/aqa-tests#6461 (comment)

I am trying to understand the problem that this PR is intending to fix. If I read correctly, there are two issues being described, 1st issue was that getDependencies was downloading more dependencies than were needed. 2nd was that when larger file downloads fail, it retried, but this PR wants to have it retry from an alternate URL, (and if that fails, try fetching from the 3rd party URL)?

@sophia-guo
Copy link
Contributor

Yes, this ENV{'CUSTOM_URL'} won't affect local run. Also this env variable was not introduced by this PR. I'm just in general not a fan of environment variable due to poor maintainability and reproducibility.

@annaibm
Copy link
Contributor

annaibm commented Jan 16, 2026

I am trying to understand the problem that this PR is intending to fix. If I read correctly, there are two issues being described, 1st issue was that getDependencies was downloading more dependencies than were needed. 2nd was that when larger file downloads fail, it retried, but this PR wants to have it retry from an alternate URL, (and if that fails, try fetching from the 3rd party URL)?

Yes as I read the issue, @smlambert that your understanding is correct. The PR addresses both issues:

  1. Over-downloading: The previous workflow downloaded all third-party jars at the Jenkins level, even when only a subset was needed. The update restricts downloads to only the dependencies required for the current BUILD_LIST (jck,openjdk etc) except for system tests

  2. Fallback logic for large/unstable files: Previously, a failed download was simply retried from the same URL. The updated logic now tries in this order:

First attempt: download from the custom (test dependency job url ) Jenkins URL
If that fails: fall back to the original third-party URL.

@sophia-guo
Copy link
Contributor

Based on adoptium/aqa-tests#6461 (comment), Lan's idea:

  1. Prestage ( download from jenkins dependency pipeline sh "perl ./aqa-tests/TKG/scripts/getDependencies.pl -path ${env.LIB_DIR} -task default -customUrl ${customUrl}" ) will only be triggered if build_list=system. That is there will be no prestage step for all other build_lists

  2. For systemtest prestage step if first try (with jenkins dependency job) fails second try will be triggered with third party url.

- getDependencies.pl script run twice.Once with customUrl. If it failed, retry with 3rd party URL.
Closes:  adoptium/aqa-tests#6461
Signed-off-by:Amrutha Kanhirathingal <Amrutha.Kanhirathingal@ibm.com>
@karianna karianna requested a review from sophia-guo January 29, 2026 08:26
@sophia-guo sophia-guo merged commit 710e5f5 into adoptium:master Jan 29, 2026
3 checks passed
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.

7 participants