Skip to content

Remove AWS Batch scheduler and Amazon Linux 2 OS support and support Python 3.13#7394

Open
hanwen-cluster wants to merge 5 commits into
aws:developfrom
hanwen-cluster:developmaydeprecation
Open

Remove AWS Batch scheduler and Amazon Linux 2 OS support and support Python 3.13#7394
hanwen-cluster wants to merge 5 commits into
aws:developfrom
hanwen-cluster:developmaydeprecation

Conversation

@hanwen-cluster
Copy link
Copy Markdown
Contributor

@hanwen-cluster hanwen-cluster commented May 14, 2026

Description of changes

  • Remove AWS Batch scheduler and Amazon Linux 2 OS support
  • Add Python 3.13 support
  • Fix GitHub workflow checks to only scan additions (not full diff) and remove the 300-file limit
  • Filter AMI retrieval to available status to prevent race conditions during concurrent AMI builds
  • Fix DCV integration test by explicitly specifying SSH key path

See commit descriptions for details.

Tests

  • image build and integration tests are successful

References

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.

Comment thread tests/integration-tests/tests/storage/test_efs.py Fixed
Comment thread tests/integration-tests/tests/storage/test_efs.py Fixed
@hanwen-cluster hanwen-cluster force-pushed the developmaydeprecation branch 9 times, most recently from ea9ebb8 to 2a71b0e Compare May 15, 2026 19:45
@hanwen-cluster
Copy link
Copy Markdown
Contributor Author

Secrutiy Exclusions Checker is ignored because the file change is only a whitespace change.
The "the update compute fleet status can only be set to" # nosec B608 has been there before this PR

@hanwen-cluster hanwen-cluster added the skip-security-exclusions-check Skip the checks regarding the security exclusions label May 15, 2026
@hanwen-cluster
Copy link
Copy Markdown
Contributor Author

Code scanning results failure is long standing. We will address it separately

@hanwen-cluster hanwen-cluster force-pushed the developmaydeprecation branch from db1b29f to 5f78294 Compare May 15, 2026 20:29
@hanwen-cluster hanwen-cluster marked this pull request as ready for review May 15, 2026 20:31
@hanwen-cluster hanwen-cluster requested review from a team as code owners May 15, 2026 20:31
@hanwen-cluster hanwen-cluster changed the title Remove AWS Batch scheduler support and Amazon Linux 2 (AL2) OS support from ParallelCluster Remove AWS Batch scheduler and Amazon Linux 2 OS support and support Python 3.13 May 15, 2026
Copy link
Copy Markdown
Contributor

@hehe7318 hehe7318 left a comment

Choose a reason for hiding this comment

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

[Blocking] Can we update validator so that Scheduler: awsbatch is rejected with a clear error message indicating AWS Batch support has been removed and pointing the user to the deprecation notice / alternative schedulers? [Task PC-22243]

if cluster.stack.scheduler == "awsbatch":
if status == RequestedComputeFleetStatus.ENABLED:
cluster.start()
elif status == RequestedComputeFleetStatus.DISABLED:
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.

[Blocking] Let's remove ENABLED and DISABLED from all files, I found in cli/src/pcluster/api/models/requested_compute_fleet_status.py and compute_fleet_status.py.

ENABLED = "ENABLED"
DISABLED = "DISABLED"

ENABLED = "ENABLED"
DISABLED = "DISABLED"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -138,7 +136,7 @@ test-suites:
dimensions:
- regions: [{{ p4d_24xlarge_CAPACITY_RESERVATION_2_INSTANCES_2_HOURS_YESPG_alinux2 }}]
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.

[Question] Is the region okay? alinux2 -> alinux2023.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Great discover. FIxed

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.

[Non-blocking] Test name: no_awsbatch. Can we rename?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

_run_and_assert(mocker, capsys, output, error, config, temp_path_for_config)


def test_subnet_automation_no_awsbatch_no_errors_empty_vpc(mocker, capsys, test_datadir, temp_path_for_config):
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.

[Non-blocking] no_awsbatch Rename?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

@hanwen-cluster
Copy link
Copy Markdown
Contributor Author

[Blocking] Can we update validator so that Scheduler: awsbatch is rejected with a clear error message indicating AWS Batch support has been removed and pointing the user to the deprecation notice / alternative schedulers? [Task PC-22243]

Because this is a separate task, can I finish it with a separate PR?

@hanwen-cluster hanwen-cluster force-pushed the developmaydeprecation branch from 5f78294 to 70b4023 Compare May 18, 2026 16:09
  Changes

  - Delete awsbatch-cli/ package, awsbatch_builder.py, awsbatch_validators.py, Batch API client, and all Batch integration tests
  - Remove Batch from schemas, constants, cluster model, IAM policy templates, and CI workflows
  - Remove AL2 from supported OS list and image builder configs
  - Mechanically replace Os: alinux2 → Os: alinux2023 across all test config YAMLs
  - Delete Batch-only utility scripts (generate-ami-list.py, update_pcluster_configs.py, upload-script.py, bump-awsbatch-cli-version.sh) — these have no Slurm equivalent use

  Notes for reviewers

  - pcluster configure wizard removes the scheduler selection prompt entirely since Slurm is now the only option.
  - conditions gating on scheduler type are simplified; is_awsbatch helper and related conditional logic removed rather than left as dead code.
This commit add `Cache.clear_all()` to conftest of unit test because Python 3.13 reuse caches more actively. Without `Cache.clear_all()`, some tests were failing
DCV test failed on environment where SSH key path is not configured for autouse. Specifying the key path solves the problem
Retrieving AMIs with status pending causes cluster creation failure. This could happen when we are building AMIs and running tests concurrently with the same version of ParallelCluster
In the past, the workflows checked content on full diff (addition and deletion) and limited the maximum file changes to 300. Now the improved workflows check only additions
@hanwen-cluster hanwen-cluster force-pushed the developmaydeprecation branch from 70b4023 to 4d3603f Compare May 18, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-security-exclusions-check Skip the checks regarding the security exclusions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants