Skip to content

USHIFT-6636: Change test-agent impl to align with greenboot-rs#6313

Open
pmtk wants to merge 3 commits intoopenshift:mainfrom
pmtk:test-agent-greenboot-rs
Open

USHIFT-6636: Change test-agent impl to align with greenboot-rs#6313
pmtk wants to merge 3 commits intoopenshift:mainfrom
pmtk:test-agent-greenboot-rs

Conversation

@pmtk
Copy link
Member

@pmtk pmtk commented Mar 5, 2026

Summary by CodeRabbit

  • Refactor

    • Boot action handling now derives actions directly from deployment configuration, removing numeric boot-step computation.
    • Automatic in-place configuration migration decrements action keys and removes processed entries at startup.
    • Boot sequencing simplified while preserving action execution flow.
  • Chores

    • CI build script no longer attempts to download cached build data; builds proceed from source unconditionally.

@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 5, 2026
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 5, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 5, 2026

@pmtk: This pull request references USHIFT-6636 which is a valid jira issue.

Details

In response to this:

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 5, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 5, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pmtk

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:

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

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

pmtk commented Mar 5, 2026

/test ?

@coderabbitai
Copy link

coderabbitai bot commented Mar 5, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Removed boot_counter logic from the test agent and migrated numeric action keys in-place; the CI ISO build script no longer attempts to download cached build data when -update_cache is not provided, so it proceeds with an unconditional full rebuild.

Changes

Cohort / File(s) Summary
Boot Action Refactoring
test/agent/microshift-test-agent.sh
Removed _get_current_boot_number() and related boot_counter usage. Now compute current_boot_actions by flattening deployment actions, run those actions, and perform an in-place migration that decrements numeric action keys and removes key "0" using a temporary file replacement.
CI Cache Path Removed
test/bin/ci_phase_iso_build.sh
Commented-out/removed the runtime branch that downloaded build cache when -update_cache is not provided; GOT_CACHED_DATA stays false, and the script always follows the full rebuild path instead of attempting cache retrieval.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly references the main objective: aligning test-agent implementation with greenboot-rs, which matches the file changes in microshift-test-agent.sh.
Stable And Deterministic Test Names ✅ Passed Custom check for Ginkgo test names does not apply to bash shell scripts; only Go test files contain Ginkgo constructs.
Test Structure And Quality ✅ Passed PR modifies bash shell scripts only; Ginkgo test code quality check not applicable.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@pmtk
Copy link
Member Author

pmtk commented Mar 5, 2026

/test e2e-aws-tests-arm e2e-aws-tests-bootc

@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 5, 2026

@pmtk: This pull request references USHIFT-6636 which is a valid jira issue.

Details

In response to this:

Summary by CodeRabbit

  • Refactor
  • Streamlined boot action handling to derive actions directly from deployment configuration.
  • Implemented in-place configuration migration with automated action key countdown during boot initialization.
  • Simplified boot sequencing logic by removing intermediate boot number computation.

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.

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 `@test/agent/microshift-test-agent.sh`:
- Around line 146-154: The jq walk() currently mutates numeric keys across the
whole AGENT_CFG, so update the transformation to target only the current
deployment object (the same selector you use earlier to extract actions) instead
of the entire file; pass the current deployment identifier into jq and apply the
decrement + remove-"0" logic only within that deployment's subtree (leaving
other deployments untouched) so only the booted deployment's numeric action keys
are shifted.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 183c8d92-aaea-4955-ac62-ca9d3e583b4e

📥 Commits

Reviewing files that changed from the base of the PR and between 21f2017 and cba8d81.

📒 Files selected for processing (3)
  • test/agent/microshift-test-agent.sh
  • test/scenarios-bootc/presubmits/el98-src@upgrade-fails-then-recovers.sh
  • test/scenarios/presubmits/el96-src@upgrade-fails-then-recovers.sh

@pmtk pmtk force-pushed the test-agent-greenboot-rs branch from cba8d81 to 1618e22 Compare March 5, 2026 09:11
@pmtk
Copy link
Member Author

pmtk commented Mar 5, 2026

/test e2e-aws-tests-arm e2e-aws-tests-bootc

@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 5, 2026

@pmtk: This pull request references USHIFT-6636 which is a valid jira issue.

Details

In response to this:

Summary by CodeRabbit

  • Refactor
  • Boot action handling now derives actions directly from deployment configuration.
  • Automatic in-place configuration migration decrements action keys and removes processed entries at startup.
  • Simplified boot sequencing by removing numeric boot-step computation and relying on current deployment actions.
  • Preserved action execution flow aligned with the new extraction and migration approach.

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.

@pmtk
Copy link
Member Author

pmtk commented Mar 6, 2026

/test e2e-aws-tests-arm e2e-aws-tests-bootc

@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 6, 2026

@pmtk: This pull request references USHIFT-6636 which is a valid jira issue.

Details

In response to this:

Summary by CodeRabbit

  • Refactor

  • Boot action handling now derives actions directly from deployment configuration.

  • Automatic in-place configuration migration decrements action keys and removes processed entries at startup.

  • Boot sequencing simplified by removing numeric boot-step computation and relying on current deployment actions.

  • Action execution flow preserved and aligned with the new extraction and migration approach.

  • Chores

  • CI build script no longer attempts to download cached build data; builds proceed from source unconditionally.

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.

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 `@test/bin/ci_phase_iso_build.sh`:
- Around line 191-198: Re-enable the cache-download conditional so
GOT_CACHED_DATA can become true when cache is available: restore the commented
block that checks HAS_CACHE_ACCESS and calls download_build_cache (setting
GOT_CACHED_DATA=true on success), ensure GOT_CACHED_DATA is initialized (e.g.,
GOT_CACHED_DATA=false) before use, and change the test from the brittle "if !
${GOT_CACHED_DATA}" to a proper shell test like "if [ \"$GOT_CACHED_DATA\" !=
true ]" so the warning on GOT_CACHED_DATA only prints when the download actually
failed; relevant symbols: GOT_CACHED_DATA, HAS_CACHE_ACCESS,
download_build_cache.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 991f7864-d627-4c1a-a39c-763451ce3d51

📥 Commits

Reviewing files that changed from the base of the PR and between 1618e22 and 223f5b1.

📒 Files selected for processing (1)
  • test/bin/ci_phase_iso_build.sh

Comment on lines +191 to 198
# if ${HAS_CACHE_ACCESS} ; then
# if download_build_cache ; then
# GOT_CACHED_DATA=true
# fi
# fi
if ! ${GOT_CACHED_DATA} ; then
echo "WARNING: Build cache is not available, rebuilding all the artifacts"
fi
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Default build path now bypasses cache unconditionally.

At Line 191–195, the cache download logic is disabled, so GOT_CACHED_DATA never flips to true. That makes the Line 197 warning effectively unconditional and forces full rebuilds even when cache access exists.

Suggested fix
-    # if ${HAS_CACHE_ACCESS} ; then
-    #     if download_build_cache ; then
-    #         GOT_CACHED_DATA=true
-    #     fi
-    # fi
+    if ${HAS_CACHE_ACCESS} ; then
+        if download_build_cache ; then
+            GOT_CACHED_DATA=true
+        fi
+    fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# if ${HAS_CACHE_ACCESS} ; then
# if download_build_cache ; then
# GOT_CACHED_DATA=true
# fi
# fi
if ! ${GOT_CACHED_DATA} ; then
echo "WARNING: Build cache is not available, rebuilding all the artifacts"
fi
if ${HAS_CACHE_ACCESS} ; then
if download_build_cache ; then
GOT_CACHED_DATA=true
fi
fi
if ! ${GOT_CACHED_DATA} ; then
echo "WARNING: Build cache is not available, rebuilding all the artifacts"
fi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/bin/ci_phase_iso_build.sh` around lines 191 - 198, Re-enable the
cache-download conditional so GOT_CACHED_DATA can become true when cache is
available: restore the commented block that checks HAS_CACHE_ACCESS and calls
download_build_cache (setting GOT_CACHED_DATA=true on success), ensure
GOT_CACHED_DATA is initialized (e.g., GOT_CACHED_DATA=false) before use, and
change the test from the brittle "if ! ${GOT_CACHED_DATA}" to a proper shell
test like "if [ \"$GOT_CACHED_DATA\" != true ]" so the warning on
GOT_CACHED_DATA only prints when the download actually failed; relevant symbols:
GOT_CACHED_DATA, HAS_CACHE_ACCESS, download_build_cache.

@pmtk pmtk force-pushed the test-agent-greenboot-rs branch from 223f5b1 to 1989cfe Compare March 6, 2026 09:49
@pmtk
Copy link
Member Author

pmtk commented Mar 6, 2026

/test e2e-aws-tests-arm e2e-aws-tests-bootc

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 `@test/agent/microshift-test-agent.sh`:
- Around line 146-152: The jq transformation is decrementing the key "0" to "-1"
instead of removing it; update the pipeline around the with_entries/select steps
(the jq invocation used in the shell snippet) so that keys equal to "0" are
filtered out before any numeric decrement is applied, or restrict the decrement
to only numeric keys >= 1 (e.g., use a test like "^[1-9][0-9]*$"); adjust the
expression that uses with_entries and select so "0" never flows into the
decrement branch and is removed by the select(.key != "0") stage (refer to the
jq command in the diff that uses --arg key "${current_deployment_id}" and the
with_entries/select expressions).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 3942cd24-0c36-49d4-9b48-60cac3a2f0c6

📥 Commits

Reviewing files that changed from the base of the PR and between 223f5b1 and 1989cfe.

📒 Files selected for processing (6)
  • test/agent/microshift-test-agent.sh
  • test/bin/ci_phase_iso_build.sh
  • test/scenarios/periodics/el96-prel@el98-src@upgrade-fails-and-rolls-back.sh
  • test/scenarios/periodics/el98-src@upgrade-fails-cannot-backup.sh
  • test/scenarios/presubmits/el98-src@downgrade-block.sh
  • test/scenarios/presubmits/el98-src@upgrade-fails.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/bin/ci_phase_iso_build.sh

@pmtk pmtk force-pushed the test-agent-greenboot-rs branch from 1989cfe to 9b97758 Compare March 6, 2026 14:57
@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 6, 2026

@pmtk: This pull request references USHIFT-6636 which is a valid jira issue.

Details

In response to this:

Summary by CodeRabbit

  • Refactor

  • Boot action handling now derives actions directly from deployment configuration, removing numeric boot-step computation.

  • Automatic in-place configuration migration decrements action keys and removes processed entries at startup.

  • Boot sequencing simplified while preserving action execution flow.

  • Chores

  • CI build script no longer attempts to download cached build data; builds proceed from source unconditionally.

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.

@pmtk
Copy link
Member Author

pmtk commented Mar 6, 2026

/test e2e-aws-tests-arm e2e-aws-tests-bootc

@pmtk pmtk marked this pull request as ready for review March 8, 2026 08:53
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 8, 2026
@openshift-ci openshift-ci bot requested review from jerpeter1 and pacevedom March 8, 2026 08:54
@pmtk pmtk force-pushed the test-agent-greenboot-rs branch from 9b97758 to bd9af65 Compare March 9, 2026 10:49
@pmtk
Copy link
Member Author

pmtk commented Mar 11, 2026

/retest

@pmtk pmtk force-pushed the test-agent-greenboot-rs branch from bd9af65 to 2e8fb20 Compare March 12, 2026 11:29
@pmtk
Copy link
Member Author

pmtk commented Mar 12, 2026

/retst

@pmtk
Copy link
Member Author

pmtk commented Mar 12, 2026

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 12, 2026

@pmtk: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-tests-periodic 2e8fb20 link true /test e2e-aws-tests-periodic
ci/prow/e2e-aws-tests 2e8fb20 link true /test e2e-aws-tests
ci/prow/e2e-aws-tests-bootc-periodic 2e8fb20 link true /test e2e-aws-tests-bootc-periodic
ci/prow/e2e-aws-tests-bootc-periodic-arm 2e8fb20 link true /test e2e-aws-tests-bootc-periodic-arm
ci/prow/verify 2e8fb20 link true /test verify
ci/prow/e2e-aws-tests-periodic-arm 2e8fb20 link true /test e2e-aws-tests-periodic-arm
ci/prow/e2e-aws-tests-arm 2e8fb20 link true /test e2e-aws-tests-arm

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.

@pacevedom
Copy link
Contributor

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 13, 2026
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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants