Skip to content

Conversation

@okankoAMZ
Copy link
Contributor

@okankoAMZ okankoAMZ commented Jul 3, 2025

Description of the issue

The EC2 SELinux test matrix previously used hardcoded AMI patterns such as CloudwatchSelinuxAL2v4* and CloudwatchSelinuxAL2023*. These patterns were not aligned with the standardized, dynamically selected AMI naming conventions for cloudwatch-agent integration testing. As a result, tests might not have targeted the correct or most recent AMIs, potentially impacting test coverage and reliability.

Related file: generator/resources/ec2_selinux_test_matrix.json

Description of changes

  • Updated the "ami" field for both the Amazon Linux 2 and AL2023 test matrices to use the new, dynamic AMI name patterns:
    • Changed CloudwatchSelinuxAL2v4* to cloudwatch-agent-integration-test-selinux*
    • Changed CloudwatchSelinuxAL2023* to cloudwatch-agent-integration-test-x86-selinux*
  • These updates ensure that integration tests always use the latest, dynamically selected AMIs for SELinux testing, improving test reliability and alignment with current resources.

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Tests

  • Ran the integration test workflow and confirmed instances were launched using the new AMI patterns.
  • Verified that all existing EC2 SELinux matrix tests passed successfully with the updated AMIs.
  • For more details, see the workflow run: GitHub Actions Job Log

@okankoAMZ okankoAMZ marked this pull request as ready for review July 7, 2025 19:47
@okankoAMZ okankoAMZ requested a review from a team as a code owner July 7, 2025 19:47
TravisStark
TravisStark previously approved these changes Jul 7, 2025
"username": "ec2-user",
"instanceType":"t3a.medium",
"installAgentCommand": "go run ./install/install_agent.go rpm",
"ami": "CloudwatchSelinuxAL2v4*",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you post a passing test run

@dricross
Copy link
Contributor

dricross commented Jul 8, 2025

The new names e.g. cloudwatch-agent-integration-test-al2-selinux might be picked up by the AMI expression we use for non-selinux tests: https://github.com/aws/amazon-cloudwatch-agent-test/blob/main/generator/resources/ec2_linux_test_matrix.json#L73C13-L73C49

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.

4 participants