Skip to content

[Release] Add upload-node.py to push aws-parallelcluster-node to S3 #7460

Merged
himani2411 merged 5 commits into
aws:developfrom
himani2411:cli-devsetting
Jun 30, 2026
Merged

[Release] Add upload-node.py to push aws-parallelcluster-node to S3 #7460
himani2411 merged 5 commits into
aws:developfrom
himani2411:cli-devsetting

Conversation

@himani2411

@himani2411 himani2411 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Description of changes

This is required as part of our release process as we move from uploading node package from s3 aws/aws-parallelcluster-cookbook#3211

Multi-region S3 uploader for the node package, modeled on upload-cookbook.py. Uploads to s3://-aws-parallelcluster/parallelcluster//node/, which is where the cookbook now downloads the node package from in all regions (see parallelcluster_node.rb). Invoked by the Jenkins push_node_s3 release job.

Tests

  • tested using Dry-run option
  • Successful testing on personal S3 bucket

References

  • Link to impacted open issues.
  • Link to related PRs in other packages (i.e. cookbook, node).
  • Link to documentation useful to understand the changes.

Checklist

  • Make sure you are pointing to the right branch.
  • If you're creating a patch for a branch other than develop add the branch name as prefix in the PR title (e.g. [release-3.6]).
  • Check all commits' messages are clear, describing what and why vs how.
  • Make sure to have added unit tests or integration tests to cover the new/modified code.
  • Check if documentation is impacted by this change.

Please review the guidelines for contributing and Pull Request Instructions.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@himani2411 himani2411 added the skip-changelog-update Disables the check that enforces changelog updates in PRs label Jun 29, 2026
@himani2411 himani2411 requested review from a team as code owners June 29, 2026 19:48
@himani2411 himani2411 added the 3.x label Jun 29, 2026
Comment thread util/upload-node.py Fixed
Comment thread util/upload-node.py Fixed
Comment thread util/upload-node.py Fixed
Comment thread util/upload-node.py Fixed
Himani Anil Deshpande added 2 commits June 30, 2026 12:04
Multi-region S3 uploader for the node package, modeled on upload-cookbook.py.
Uploads to s3://<region>-aws-parallelcluster/parallelcluster/<version>/node/,
which is where the cookbook now downloads the node package from in all regions
(see parallelcluster_node.rb). Invoked by the Jenkins push_node_s3 release job.
Resolves CodeQL py/use-of-exit-or-quit (alerts 2356-2359). exit() is a
site.Quitter object that may be absent under python -S or a custom site.py;
sys.exit() is always available. Add 'import sys' and convert all four calls.
Himani Anil Deshpande added 2 commits June 30, 2026 12:14
The added-lines CI check  (security_exclusions_checker) forbids new nosec/nosemgrep annotations. Replace the
suppressed hashlib.md5() with hashlib.md5(usedforsecurity=False), which marks
the hash as a checksum (not cryptographic), so scanners no longer flag it and
no suppression is needed. Requires Python 3.9+ (repo floor is 3.9).
File.exists? (plural) was removed in Ruby 3.2; the latest AMIs ship Ruby 3.4.9,
so the 'Wait for slurmrestd' ruby_block failed with NoMethodError. Switch to
the canonical File.exist?, valid on all Ruby versions.
@himani2411 himani2411 enabled auto-merge (rebase) June 30, 2026 18:51
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.94%. Comparing base (bdf724a) to head (13fe225).
⚠️ Report is 15 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7460      +/-   ##
===========================================
+ Coverage    89.91%   89.94%   +0.02%     
===========================================
  Files          180      180              
  Lines        16200    16253      +53     
===========================================
+ Hits         14567    14619      +52     
- Misses        1633     1634       +1     
Flag Coverage Δ
unittests 89.94% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hehe7318 hehe7318 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, just minor comments to reduce the code duplication.

Comment thread util/upload-node.py
_main_region = None


def _get_all_aws_regions(region):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we extract this method into a common file for use by upload-node.py and upload-cookbook.py?

Comment thread util/upload-node.py
return set(sorted(r.get("RegionName") for r in ec2.describe_regions().get("Regions")))


def _aws_s3_ls(s3, region, bucket_name, key):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same as above, also the below functions.

@himani2411 himani2411 merged commit 43fb229 into aws:develop Jun 30, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.x skip-changelog-update Disables the check that enforces changelog updates in PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants