Skip to content

NO-ISSUE: Update AMI collection script for installer changes#5790

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
djoshy:update-ami
Mar 23, 2026
Merged

NO-ISSUE: Update AMI collection script for installer changes#5790
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
djoshy:update-ami

Conversation

@djoshy
Copy link
Contributor

@djoshy djoshy commented Mar 23, 2026

Update script to account for changes from openshift/installer#10321, which splits the rhcos.json into two files.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 23, 2026
@openshift-ci-robot
Copy link
Contributor

@djoshy: This pull request explicitly references no jira issue.

Details

In response to this:

Update script to account for changes from openshift/installer#10321, which splits the rhcos.json into two files.

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 openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai
Copy link

coderabbitai bot commented Mar 23, 2026

Walkthrough

This pull request refactors the AMI update script to process multiple JSON file paths instead of a single file. The script now iterates over each path independently, fetching commit history and extracting AMIs per file while accumulating results across all sources.

Changes

Cohort / File(s) Summary
Multi-file Processing Refactor
hack/update_amis.py
Changed from single file (FILE_PATH) to multiple files (FILE_PATHS) iteration. Updated commit history fetching and AMI extraction to operate per file path independently. Modified error handling to skip individual paths with no commits while still validating that at least one AMI is found overall. Made logging path-agnostic.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@djoshy
Copy link
Contributor Author

djoshy commented Mar 23, 2026

/verified bypass

This has no affect on the payload, just updates a helper script that is tested by a periodic

/override ci/prow/e2e-aws-ovn
/override ci/prow/e2e-aws-ovn-upgrade
/override ci/prow/e2e-gcp-op-ocl
/override ci/prow/e2e-gcp-op-ocl-part1
/override ci/prow/e2e-gcp-op-ocl-part2
/override ci/prow/e2e-gcp-op-part1
/override ci/prow/e2e-gcp-op-part2
/override ci/prow/e2e-gcp-op-single-node
/override ci/prow/e2e-hypershift

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Mar 23, 2026
@openshift-ci-robot
Copy link
Contributor

@djoshy: The verified label has been added.

Details

In response to this:

/verified bypass

This has no affect on the payload, just updates a helper script that is tested by a periodic

/override ci/prow/e2e-aws-ovn
/override ci/prow/e2e-aws-ovn-upgrade
/override ci/prow/e2e-gcp-op-ocl
/override ci/prow/e2e-gcp-op-ocl-part1
/override ci/prow/e2e-gcp-op-ocl-part2
/override ci/prow/e2e-gcp-op-part1
/override ci/prow/e2e-gcp-op-part2
/override ci/prow/e2e-gcp-op-single-node
/override ci/prow/e2e-hypershift

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 openshift-eng/jira-lifecycle-plugin repository.

@djoshy
Copy link
Contributor Author

djoshy commented Mar 23, 2026

/test periodic-ci-openshift-machine-config-operator-update-amis

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 23, 2026

@djoshy: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test bootstrap-unit
/test e2e-aws-ovn
/test e2e-aws-ovn-upgrade
/test e2e-gcp-op-part1
/test e2e-gcp-op-part2
/test e2e-gcp-op-single-node
/test e2e-hypershift
/test images
/test okd-scos-images
/test unit
/test verify
/test verify-deps

The following commands are available to trigger optional jobs:

/test e2e-agent-compact-ipv4
/test e2e-agent-compact-ipv4-iso-no-registry
/test e2e-aws-disruptive
/test e2e-aws-mco-disruptive
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-fips-op
/test e2e-aws-ovn-ocb-techpreview
/test e2e-aws-ovn-serial-ipsec
/test e2e-aws-ovn-upgrade-ipsec
/test e2e-aws-ovn-upgrade-ocb-techpreview
/test e2e-aws-ovn-upgrade-out-of-change
/test e2e-aws-ovn-windows
/test e2e-aws-ovn-workers-rhel8
/test e2e-aws-proxy
/test e2e-aws-serial
/test e2e-aws-single-node
/test e2e-aws-upgrade-single-node
/test e2e-aws-workers-rhel8
/test e2e-azure
/test e2e-azure-ovn-multidisk-techpreview
/test e2e-azure-ovn-upgrade
/test e2e-azure-ovn-upgrade-out-of-change
/test e2e-azure-upgrade
/test e2e-gcp-mco-disruptive
/test e2e-gcp-op
/test e2e-gcp-op-ocl
/test e2e-gcp-op-ocl-part1
/test e2e-gcp-op-ocl-part2
/test e2e-gcp-op-techpreview
/test e2e-gcp-ovn-rt-upgrade
/test e2e-gcp-rt
/test e2e-gcp-rt-op
/test e2e-gcp-single-node
/test e2e-gcp-upgrade
/test e2e-hypershift-techpreview
/test e2e-metal-assisted
/test e2e-metal-ipi-ovn-dualstack
/test e2e-metal-ipi-ovn-ipv6
/test e2e-metal-ovn-two-node-arbiter
/test e2e-metal-ovn-two-node-fencing
/test e2e-openstack
/test e2e-openstack-dualstack
/test e2e-openstack-externallb
/test e2e-openstack-hypershift
/test e2e-openstack-parallel
/test e2e-openstack-singlestackv6
/test e2e-ovirt
/test e2e-ovirt-upgrade
/test e2e-ovn-step-registry
/test e2e-vsphere
/test e2e-vsphere-ovn-disk-setup-techpreview
/test e2e-vsphere-ovn-upi
/test e2e-vsphere-ovn-upi-zones
/test e2e-vsphere-ovn-zones
/test e2e-vsphere-upgrade
/test okd-scos-e2e-aws-ovn
/test security

Use /test all to run the following jobs that were automatically triggered:

pull-ci-openshift-machine-config-operator-main-bootstrap-unit
pull-ci-openshift-machine-config-operator-main-e2e-aws-ovn
pull-ci-openshift-machine-config-operator-main-e2e-aws-ovn-upgrade
pull-ci-openshift-machine-config-operator-main-e2e-gcp-op-ocl
pull-ci-openshift-machine-config-operator-main-e2e-gcp-op-ocl-part1
pull-ci-openshift-machine-config-operator-main-e2e-gcp-op-ocl-part2
pull-ci-openshift-machine-config-operator-main-e2e-gcp-op-part1
pull-ci-openshift-machine-config-operator-main-e2e-gcp-op-part2
pull-ci-openshift-machine-config-operator-main-e2e-gcp-op-single-node
pull-ci-openshift-machine-config-operator-main-e2e-hypershift
pull-ci-openshift-machine-config-operator-main-images
pull-ci-openshift-machine-config-operator-main-okd-scos-images
pull-ci-openshift-machine-config-operator-main-security
pull-ci-openshift-machine-config-operator-main-unit
pull-ci-openshift-machine-config-operator-main-verify
pull-ci-openshift-machine-config-operator-main-verify-deps
Details

In response to this:

/test ci/prow/periodic-ci-openshift-machine-config-operator-update-amis

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-sigs/prow repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 23, 2026

@djoshy: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test bootstrap-unit
/test e2e-aws-ovn
/test e2e-aws-ovn-upgrade
/test e2e-gcp-op-part1
/test e2e-gcp-op-part2
/test e2e-gcp-op-single-node
/test e2e-hypershift
/test images
/test okd-scos-images
/test unit
/test verify
/test verify-deps

The following commands are available to trigger optional jobs:

/test e2e-agent-compact-ipv4
/test e2e-agent-compact-ipv4-iso-no-registry
/test e2e-aws-disruptive
/test e2e-aws-mco-disruptive
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-fips-op
/test e2e-aws-ovn-ocb-techpreview
/test e2e-aws-ovn-serial-ipsec
/test e2e-aws-ovn-upgrade-ipsec
/test e2e-aws-ovn-upgrade-ocb-techpreview
/test e2e-aws-ovn-upgrade-out-of-change
/test e2e-aws-ovn-windows
/test e2e-aws-ovn-workers-rhel8
/test e2e-aws-proxy
/test e2e-aws-serial
/test e2e-aws-single-node
/test e2e-aws-upgrade-single-node
/test e2e-aws-workers-rhel8
/test e2e-azure
/test e2e-azure-ovn-multidisk-techpreview
/test e2e-azure-ovn-upgrade
/test e2e-azure-ovn-upgrade-out-of-change
/test e2e-azure-upgrade
/test e2e-gcp-mco-disruptive
/test e2e-gcp-op
/test e2e-gcp-op-ocl
/test e2e-gcp-op-ocl-part1
/test e2e-gcp-op-ocl-part2
/test e2e-gcp-op-techpreview
/test e2e-gcp-ovn-rt-upgrade
/test e2e-gcp-rt
/test e2e-gcp-rt-op
/test e2e-gcp-single-node
/test e2e-gcp-upgrade
/test e2e-hypershift-techpreview
/test e2e-metal-assisted
/test e2e-metal-ipi-ovn-dualstack
/test e2e-metal-ipi-ovn-ipv6
/test e2e-metal-ovn-two-node-arbiter
/test e2e-metal-ovn-two-node-fencing
/test e2e-openstack
/test e2e-openstack-dualstack
/test e2e-openstack-externallb
/test e2e-openstack-hypershift
/test e2e-openstack-parallel
/test e2e-openstack-singlestackv6
/test e2e-ovirt
/test e2e-ovirt-upgrade
/test e2e-ovn-step-registry
/test e2e-vsphere
/test e2e-vsphere-ovn-disk-setup-techpreview
/test e2e-vsphere-ovn-upi
/test e2e-vsphere-ovn-upi-zones
/test e2e-vsphere-ovn-zones
/test e2e-vsphere-upgrade
/test okd-scos-e2e-aws-ovn
/test security

Use /test all to run the following jobs that were automatically triggered:

pull-ci-openshift-machine-config-operator-main-bootstrap-unit
pull-ci-openshift-machine-config-operator-main-e2e-aws-ovn
pull-ci-openshift-machine-config-operator-main-e2e-aws-ovn-upgrade
pull-ci-openshift-machine-config-operator-main-e2e-gcp-op-ocl
pull-ci-openshift-machine-config-operator-main-e2e-gcp-op-ocl-part1
pull-ci-openshift-machine-config-operator-main-e2e-gcp-op-ocl-part2
pull-ci-openshift-machine-config-operator-main-e2e-gcp-op-part1
pull-ci-openshift-machine-config-operator-main-e2e-gcp-op-part2
pull-ci-openshift-machine-config-operator-main-e2e-gcp-op-single-node
pull-ci-openshift-machine-config-operator-main-e2e-hypershift
pull-ci-openshift-machine-config-operator-main-images
pull-ci-openshift-machine-config-operator-main-okd-scos-images
pull-ci-openshift-machine-config-operator-main-security
pull-ci-openshift-machine-config-operator-main-unit
pull-ci-openshift-machine-config-operator-main-verify
pull-ci-openshift-machine-config-operator-main-verify-deps
Details

In response to this:

/test periodic-ci-openshift-machine-config-operator-update-amis

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-sigs/prow repository.

@djoshy
Copy link
Contributor Author

djoshy commented Mar 23, 2026

/override ci/prow/e2e-aws-ovn
/override ci/prow/e2e-aws-ovn-upgrade
/override ci/prow/e2e-gcp-op-ocl
/override ci/prow/e2e-gcp-op-ocl-part1
/override ci/prow/e2e-gcp-op-ocl-part2
/override ci/prow/e2e-gcp-op-part1
/override ci/prow/e2e-gcp-op-part2
/override ci/prow/e2e-gcp-op-single-node
/override ci/prow/e2e-hypershift

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 23, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@hack/update_amis.py`:
- Around line 219-223: The loop over FILE_PATHS silently treats an empty commits
result (from run_command(..., check=False)) as "no commits" and can hide git
failures; update the logic around FILE_PATHS and the run_command call so that if
run_command returns an empty string for a configured path you treat it as an
error instead of skipping it—either call run_command with check=True or
explicitly detect commits == "" and raise/log+exit with a clear message; adjust
the same pattern in the later block (the code at the other occurrence noted) so
both uses of FILE_PATHS/run_command fail fast on empty output rather than
silently continuing.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bd8b7845-d4ef-4f2c-b59e-4681003c10d7

📥 Commits

Reviewing files that changed from the base of the PR and between 10ca0df and b31445c.

📒 Files selected for processing (1)
  • hack/update_amis.py

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 23, 2026

@djoshy: Overrode contexts on behalf of djoshy: ci/prow/e2e-aws-ovn, ci/prow/e2e-aws-ovn-upgrade, ci/prow/e2e-gcp-op-ocl, ci/prow/e2e-gcp-op-ocl-part1, ci/prow/e2e-gcp-op-ocl-part2, ci/prow/e2e-gcp-op-part1, ci/prow/e2e-gcp-op-part2, ci/prow/e2e-gcp-op-single-node, ci/prow/e2e-hypershift

Details

In response to this:

/verified bypass

This has no affect on the payload, just updates a helper script that is tested by a periodic

/override ci/prow/e2e-aws-ovn
/override ci/prow/e2e-aws-ovn-upgrade
/override ci/prow/e2e-gcp-op-ocl
/override ci/prow/e2e-gcp-op-ocl-part1
/override ci/prow/e2e-gcp-op-ocl-part2
/override ci/prow/e2e-gcp-op-part1
/override ci/prow/e2e-gcp-op-part2
/override ci/prow/e2e-gcp-op-single-node
/override ci/prow/e2e-hypershift

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-sigs/prow repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 23, 2026

@djoshy: Overrode contexts on behalf of djoshy: ci/prow/e2e-aws-ovn, ci/prow/e2e-aws-ovn-upgrade, ci/prow/e2e-gcp-op-ocl, ci/prow/e2e-gcp-op-ocl-part1, ci/prow/e2e-gcp-op-ocl-part2, ci/prow/e2e-gcp-op-part1, ci/prow/e2e-gcp-op-part2, ci/prow/e2e-gcp-op-single-node, ci/prow/e2e-hypershift

Details

In response to this:

/override ci/prow/e2e-aws-ovn
/override ci/prow/e2e-aws-ovn-upgrade
/override ci/prow/e2e-gcp-op-ocl
/override ci/prow/e2e-gcp-op-ocl-part1
/override ci/prow/e2e-gcp-op-ocl-part2
/override ci/prow/e2e-gcp-op-part1
/override ci/prow/e2e-gcp-op-part2
/override ci/prow/e2e-gcp-op-single-node
/override ci/prow/e2e-hypershift

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-sigs/prow repository.

@djoshy
Copy link
Contributor Author

djoshy commented Mar 23, 2026

/override ci/prow/e2e-aws-ovn
/override ci/prow/e2e-aws-ovn-upgrade
/override ci/prow/e2e-gcp-op-ocl
/override ci/prow/e2e-gcp-op-ocl-part1
/override ci/prow/e2e-gcp-op-ocl-part2
/override ci/prow/e2e-gcp-op-part1
/override ci/prow/e2e-gcp-op-part2
/override ci/prow/e2e-gcp-op-single-node
/override ci/prow/e2e-hypershift

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 23, 2026

@djoshy: Overrode contexts on behalf of djoshy: ci/prow/e2e-aws-ovn, ci/prow/e2e-aws-ovn-upgrade, ci/prow/e2e-gcp-op-ocl, ci/prow/e2e-gcp-op-ocl-part1, ci/prow/e2e-gcp-op-ocl-part2, ci/prow/e2e-gcp-op-part1, ci/prow/e2e-gcp-op-part2, ci/prow/e2e-gcp-op-single-node, ci/prow/e2e-hypershift

Details

In response to this:

/override ci/prow/e2e-aws-ovn
/override ci/prow/e2e-aws-ovn-upgrade
/override ci/prow/e2e-gcp-op-ocl
/override ci/prow/e2e-gcp-op-ocl-part1
/override ci/prow/e2e-gcp-op-ocl-part2
/override ci/prow/e2e-gcp-op-part1
/override ci/prow/e2e-gcp-op-part2
/override ci/prow/e2e-gcp-op-single-node
/override ci/prow/e2e-hypershift

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-sigs/prow repository.

Copy link
Member

@isabella-janssen isabella-janssen left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 23, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 23, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: djoshy, isabella-janssen

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [djoshy,isabella-janssen]

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

@djoshy
Copy link
Contributor Author

djoshy commented Mar 23, 2026

/override ci/prow/e2e-gcp-op-part2

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 23, 2026

@djoshy: Overrode contexts on behalf of djoshy: ci/prow/e2e-gcp-op-part2

Details

In response to this:

/override ci/prow/e2e-gcp-op-part2

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-sigs/prow repository.

@openshift-merge-bot openshift-merge-bot bot merged commit d4008e5 into openshift:main Mar 23, 2026
18 checks passed
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 23, 2026

@djoshy: all tests passed!

Full PR test history. Your PR dashboard.

Details

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-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants