Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch latest E2E test AMI ID dynamically #8238

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

abhay-krishna
Copy link
Member

This PR adds the logic to dynamically fetch the latest AMI ID to use for E2E tests. We do this by calling the DescribeImages API with filters for the name, description and owner and then getting the latest image by creation time.

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

@eks-distro-bot eks-distro-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 1, 2024
Copy link

codecov bot commented Jun 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.48%. Comparing base (ca22504) to head (143f1ea).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8238   +/-   ##
=======================================
  Coverage   73.48%   73.48%           
=======================================
  Files         578      578           
  Lines       36489    36489           
=======================================
  Hits        26814    26814           
  Misses       7956     7956           
  Partials     1719     1719           

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

@abhay-krishna abhay-krishna force-pushed the latest-e2e-id-dynamic branch 2 times, most recently from 6fbe75c to 72ab342 Compare June 1, 2024 05:01
@abhay-krishna
Copy link
Member Author

/override lint

@eks-distro-bot
Copy link
Collaborator

@abhay-krishna: /override requires failed status contexts, check run or a prowjob name to operate on.
The following unknown contexts/checkruns were given:

  • lint

Only the following failed contexts/checkruns were expected:

  • eks-anywhere-cli-attribution-presubmit
  • eks-anywhere-e2e-presubmit
  • eks-anywhere-generate-files-presubmit
  • eks-anywhere-presubmit
  • tide

If you are trying to override a checkrun that has a space in it, you must put a double quote on the context.

In response to this:

/override lint

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@abhay-krishna abhay-krishna force-pushed the latest-e2e-id-dynamic branch from 72ab342 to 9ba3d28 Compare June 1, 2024 08:53
@eks-distro-bot eks-distro-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 1, 2024
@abhay-krishna abhay-krishna force-pushed the latest-e2e-id-dynamic branch 3 times, most recently from e1e2b3e to c27d8d3 Compare June 3, 2024 19:04
@abhay-krishna
Copy link
Member Author

/retest

@abhay-krishna abhay-krishna force-pushed the latest-e2e-id-dynamic branch from c27d8d3 to 25e7e9d Compare June 6, 2024 03:11
@abhay-krishna
Copy link
Member Author

/retest

@abhay-krishna abhay-krishna force-pushed the latest-e2e-id-dynamic branch from 25e7e9d to 60acea5 Compare June 6, 2024 05:28
@eks-distro-bot eks-distro-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 6, 2024
@abhay-krishna abhay-krishna force-pushed the latest-e2e-id-dynamic branch 4 times, most recently from a421940 to 7597f0f Compare June 6, 2024 15:46
Copy link
Member

@g-gaston g-gaston left a comment

Choose a reason for hiding this comment

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

are we gonna generate new amis automatically every week?

INTEGRATION_TEST_INFRA_CONFIG="/tmp/test-infra.yml"
export T_TINKERBELL_S3_INVENTORY_CSV_KEY="inventory/den80/den80-hardware.csv"

INTEGRATION_TEST_AMI_ID=$(aws ec2 describe-images \
--profile ${AWS_PROFILE} \
--owners 857151390494 \
Copy link
Member

Choose a reason for hiding this comment

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

can't account be dynamic?

Copy link
Member Author

Choose a reason for hiding this comment

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

Since we only build it in the build account and share it to these accounts, we are hardcoding the owner here.

@abhay-krishna
Copy link
Member Author

are we gonna generate new amis automatically every week?

The AMI generation will be triggered by us every week, but it will get used automatically in CI.

@abhay-krishna abhay-krishna force-pushed the latest-e2e-id-dynamic branch 2 times, most recently from e664f73 to 4518ba6 Compare June 11, 2024 01:25
Copy link
Member

@g-gaston g-gaston left a comment

Choose a reason for hiding this comment

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

rest looks good

@abhay-krishna abhay-krishna force-pushed the latest-e2e-id-dynamic branch from 4518ba6 to fe8a71a Compare June 20, 2024 17:29
@abhay-krishna abhay-krishna force-pushed the latest-e2e-id-dynamic branch from fe8a71a to 143f1ea Compare June 20, 2024 17:47
Copy link
Member

@g-gaston g-gaston left a comment

Choose a reason for hiding this comment

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

/lgtm

@abhay-krishna
Copy link
Member Author

/approve

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhay-krishna

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@eks-distro-bot eks-distro-bot merged commit 336551f into aws:main Jun 20, 2024
11 checks passed
mitalipaygude pushed a commit to mitalipaygude/eks-anywhere-1 that referenced this pull request Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants