镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Various fixes to unblock presubmits & COPR nightlies - #229

Merged
ggiguash merged 5 commits into
microshift-io:mainfrom
pmtk:bump-builder-fix-rpm
Jul 28, 2026
Merged

ggiguash merged 5 commits into
microshift-io:mainfrom
pmtk:bump-builder-fix-rpm

Conversation

@pmtk

@pmtk pmtk commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • RPM image builds now install the latest upstream Go toolchain (amd64/arm64).
    • Quick-start “latest” tag fetching now supports optional GitHub authentication and improved API failure handling/timeouts.
  • Bug Fixes
    • Spec modification now removes additional metrics-related content.
    • Mirror repo generation now preserves the detected MicroShift RPM version.
    • Post-install now ensures /etc/containers/policy.json exists by copying from the default location when needed.

@pmtk
pmtk requested a review from a team as a code owner July 24, 2026 12:35
@coderabbitai

coderabbitai Bot commented Jul 24, 2026 •

Copy link
Copy Markdown

Review Change Stack

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

Walkthrough

The PR updates RPM build tooling and downstream spec filtering, preserves detected repository versions, ensures container policy placement, and adds optional authenticated GitHub release lookup with explicit failure handling to quick-start.

Changes

RPM packaging updates

Layer / File(s) Summary
RPM build and spec filtering
packaging/rpm.Containerfile, src/image/modify-spec.py
The RPM build image installs the latest upstream Go toolchain, and modified specs remove additional metrics packages and exporter install entries.
RPM runtime and repository handling
src/rpm/create_repos.sh, src/rpm/postinstall.sh
Repository creation uses the detected version directly, and missing container policy files are copied into /etc/containers/ when available.

Quick-start release lookup

Layer / File(s) Summary
Authenticated release query
.github/actions/quick-start-clean/action.yaml, src/quickstart.sh
The action forwards GITHUB_TOKEN; quick-start adds timeout handling, optional authorization, response validation, and explicit API failure handling.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant QuickStartAction
  participant QuickstartScript
  participant GitHubReleasesAPI
  QuickStartAction->>QuickstartScript: Pass GITHUB_TOKEN, IMAGE, and TAG
  QuickstartScript->>GitHubReleasesAPI: Request releases/latest with timeout and optional Authorization
  GitHubReleasesAPI-->>QuickstartScript: Release response
  QuickstartScript->>QuickstartScript: Parse and validate tag_name
Loading

Possibly related PRs

Suggested reviewers: ggiguash

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the PR’s overall purpose: a set of fixes to unblock presubmits and COPR nightlies.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packaging/rpm.Containerfile`:
- Line 3: Update the RPM build documentation describing the make rpm target to
reference the CentOS Stream 10 builder instead of Stream 9. Review the Stream 10
release/test instructions in docs/build.md and ensure they explicitly cover
supported CentOS 9 deployments where required, without changing the packaging
configuration.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 6d7583d9-7131-42c9-80b9-0aa06924a6d0

📥 Commits

Reviewing files that changed from the base of the PR and between 99d9d3f and 6c3e1c5.

📒 Files selected for processing (2)
  • packaging/rpm.Containerfile
  • src/image/modify-spec.py

Comment thread packaging/rpm.Containerfile Resolved
@pmtk
pmtk force-pushed the bump-builder-fix-rpm branch from ee4ebad to 006fc54 Compare July 24, 2026 13:26
Comment thread packaging/rpm.Containerfile Resolved
@pmtk
pmtk force-pushed the bump-builder-fix-rpm branch 2 times, most recently from f481189 to 995c662 Compare July 27, 2026 08:33
@pmtk pmtk changed the title Disable new metrics packages & bump RPM builder Various upstream fixes Jul 27, 2026
@pmtk
pmtk force-pushed the bump-builder-fix-rpm branch 2 times, most recently from ec108aa to f9fa0ac Compare July 27, 2026 08:55
@pmtk pmtk changed the title Various upstream fixes Various fixes to unblock presubmits & COPR nightlies Jul 27, 2026
@pmtk
pmtk force-pushed the bump-builder-fix-rpm branch from f9fa0ac to ad7c447 Compare July 27, 2026 09:58

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packaging/rpm.Containerfile (1)

3-3: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Apply the intended Stream 10 base-image change.

packaging/rpm.Containerfile still uses quay.io/centos/centos:stream9, while the README lists CentOS 10 RPM support using the Stream 10 image. Update this stage to quay.io/centos/centos:stream10, and update related stream9 references if this is a Stream 10 migration.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packaging/rpm.Containerfile` at line 3, Update the base image in the RPM
container stage from CentOS Stream 9 to quay.io/centos/centos:stream10, and
revise any related stream9 references in the same migration scope to
consistently target Stream 10.
🧹 Nitpick comments (1)
packaging/rpm.Containerfile (1)

14-14: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Fail closed for unsupported architectures.

Every uname -m value other than x86_64 is treated as arm64. Use explicit x86_64 and aarch64 cases, and exit with an error for anything else instead of downloading an incompatible archive.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packaging/rpm.Containerfile` at line 14, Update the GO_ARCH assignment in the
Containerfile to explicitly map x86_64 to amd64 and aarch64 to arm64, and fail
the build with an error for any other uname -m value instead of defaulting to
arm64.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/actions/quick-start-clean/action.yaml:
- Line 30: Update the quick-start invocation around quickstart.sh to stop
passing GITHUB_TOKEN as a sudo command-line assignment while xtrace is enabled.
Preserve the token handoff to quickstart.sh using an environment mechanism that
does not expose its value in traced arguments or process listings, while
retaining the existing IMAGE and TAG behavior.

In `@packaging/rpm.Containerfile`:
- Around line 13-20: Update the Go installation RUN step to pin an explicit Go
version instead of querying go.dev/VERSION, derive the supported architecture,
and retrieve the matching official per-architecture checksum from
go.dev/dl/?mode=json with failure and timeout handling. Download the pinned
archive, verify it with sha256sum -c before extraction, then preserve the
existing cleanup and installation flow.

In `@src/quickstart.sh`:
- Around line 203-206: Update the curl_args initialization in the release lookup
flow to include the fail-on-HTTP-error option, preserving the existing silent,
redirect-following, and timeout behavior. Ensure the curl call used by the
response assignment rejects 4xx/5xx responses before passing data to jq.

---

Outside diff comments:
In `@packaging/rpm.Containerfile`:
- Line 3: Update the base image in the RPM container stage from CentOS Stream 9
to quay.io/centos/centos:stream10, and revise any related stream9 references in
the same migration scope to consistently target Stream 10.

---

Nitpick comments:
In `@packaging/rpm.Containerfile`:
- Line 14: Update the GO_ARCH assignment in the Containerfile to explicitly map
x86_64 to amd64 and aarch64 to arm64, and fail the build with an error for any
other uname -m value instead of defaulting to arm64.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9e09f872-0bb2-4984-b915-a71b630e341b

📥 Commits

Reviewing files that changed from the base of the PR and between 2155960 and ad7c447.

📒 Files selected for processing (6)
  • .github/actions/quick-start-clean/action.yaml
  • packaging/rpm.Containerfile
  • src/image/modify-spec.py
  • src/quickstart.sh
  • src/rpm/create_repos.sh
  • src/rpm/postinstall.sh
💤 Files with no reviewable changes (1)
  • src/rpm/create_repos.sh
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/rpm/postinstall.sh
  • src/image/modify-spec.py

Comment thread packaging/rpm.Containerfile Resolved
Comment thread src/quickstart.sh Resolved
@pmtk
pmtk force-pushed the bump-builder-fix-rpm branch 2 times, most recently from 3e05ec7 to 0e80a9b Compare July 27, 2026 10:33
@pmtk
pmtk force-pushed the bump-builder-fix-rpm branch from 0e80a9b to f18e718 Compare July 28, 2026 04:32

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packaging/rpm.Containerfile`:
- Around line 13-17: Update the GO_ARCH assignment in the Go toolchain download
RUN command to explicitly map uname -m values x86_64 to amd64 and aarch64 to
arm64, and fail for all other architectures instead of defaulting to ARM64.
Preserve the existing download flow for supported architectures.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 46fbe8d7-58e1-4d40-ba38-fe10268e02d0

📥 Commits

Reviewing files that changed from the base of the PR and between ad7c447 and f18e718.

📒 Files selected for processing (6)
  • .github/actions/quick-start-clean/action.yaml
  • packaging/rpm.Containerfile
  • src/image/modify-spec.py
  • src/quickstart.sh
  • src/rpm/create_repos.sh
  • src/rpm/postinstall.sh
💤 Files with no reviewable changes (1)
  • src/rpm/create_repos.sh
🚧 Files skipped from review as they are similar to previous changes (3)
  • .github/actions/quick-start-clean/action.yaml
  • src/image/modify-spec.py
  • src/quickstart.sh

Comment thread packaging/rpm.Containerfile Resolved
@pmtk
pmtk force-pushed the bump-builder-fix-rpm branch from f18e718 to f335d4f Compare July 28, 2026 05:47

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/quickstart.sh`:
- Around line 204-207: Update the release lookup around the curl invocation in
quickstart.sh to disable xtrace while GITHUB_TOKEN is incorporated into
curl_args and used, then restore the prior tracing state afterward. Also remove
GITHUB_TOKEN from the quick-start-clean caller’s child Bash invocation so the
token is not exposed through environment or command tracing.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 825ca721-4a90-475a-9b59-7c9bbb65eaf2

📥 Commits

Reviewing files that changed from the base of the PR and between f18e718 and f335d4f.

📒 Files selected for processing (2)
  • .github/actions/quick-start-clean/action.yaml
  • src/quickstart.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/actions/quick-start-clean/action.yaml

Comment thread src/quickstart.sh
Comment on lines +204 to +207
# If the GITHUB_TOKEN is available use it to authN and avoid anonymous request limits
[ -n "${GITHUB_TOKEN:-}" ] && curl_args+=(-H "Authorization: token ${GITHUB_TOKEN}")
response=""
if ! response="$(curl "${curl_args[@]}" "https://github.com/proxy/api.github.com/repos/${OWNER}/${REPO}/releases/latest")"; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== locate files =="
git ls-files | rg '(^|/)(quickstart\.sh|action\.ya?ml|.*check.*)$' || true

echo
echo "== quickstart relevant lines =="
if [ -f src/quickstart.sh ]; then
  nl -ba src/quickstart.sh | sed -n '180,225p'
fi

echo
echo "== quick-start action files =="
fd -a 'action\.ya?ml' .github actions src 2>/dev/null | sed 's#^\./##' | while read -r f; do
  if rg -n 'quickstart|GITHUB_TOKEN|xtrace|set -x|bash -x|pipefail' "$f" >/dev/null 2>&1; then
    echo "--- $f"
    nl -ba "$f" | sed -n '1,220p'
  fi
done

echo
echo "== search for quickstart invocation and env export =="
rg -n 'quickstart|GITHUB_TOKEN|set -x|bash -x|BUNDLER|GITHUB_TOKEN\|' .github src -S || true

echo
echo "== ShellCheck availability and lint (read-only) =="
if command -v shellcheck >/dev/null 2>&1; then
  shellcheck --version | head -5
  shellcheck src/quickstart.sh || true
else
  echo "shellcheck not available"
fi

Repository: microshift-io/microshift

Length of output: 851


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== quickstart relevant lines =="
awk 'NR>=180 && NR<=225 {printf "%7d  %s\n", NR, $0}' src/quickstart.sh

echo
echo "== quick-start action file =="
awk 'NR>=1 && NR<=220 {printf "%7d  %s\n", NR, $0}' .github/actions/quick-start-clean/action.yaml

echo
echo "== all action entries for quickstart/quick-start-clean/GITHUB_TOKEN/bash -x/set -x =="
awk '
  /quick-start-clean|quickstart|GITHUB_TOKEN|xtrace|set -x|bash -x|pipefail|RUN|env:/ {printf "%s:%s\n", FILENAME, $0}
' .github/actions src/quickstart.sh docs/quickstart.sh 2>/dev/null || true

echo
echo "== search quickstart call graph with grep =="
grep -RIn 'quickstart|quick-start-clean|GITHUB_TOKEN|set -x|bash -x|pipefail' .github src docs 2>/dev/null || true

Repository: microshift-io/microshift

Length of output: 5941


Keep GITHUB_TOKEN out of xtrace logs.

quick-start-clean runs this script with set -x and passes GITHUB_TOKEN into the child Bash invocation before the curl_args expansion that adds Authorization: token .... Disable tracing around this release lookup and remove it from the caller invocation rather than relying on masking.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/quickstart.sh` around lines 204 - 207, Update the release lookup around
the curl invocation in quickstart.sh to disable xtrace while GITHUB_TOKEN is
incorporated into curl_args and used, then restore the prior tracing state
afterward. Also remove GITHUB_TOKEN from the quick-start-clean caller’s child
Bash invocation so the token is not exposed through environment or command
tracing.

@ggiguash
ggiguash merged commit 5587591 into microshift-io:main Jul 28, 2026
6 of 15 checks passed
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.

2 participants