Fix RPM version to include build datetime for correct ordering when installing from COPR#210
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (3)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughRenames three COPR workflow display names for consistency and appends a UTC build timestamp (-YYYYMMDDHHMM) to Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/image/build-rpms.sh (1)
56-56: Update the example to match the final transformed version string.Line 56 shows
-separators, but Line 62 converts-to_. The example is misleading during troubleshooting.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/image/build-rpms.sh` at line 56, The example comment showing the version transformation is misleading because it shows hyphen separators in the original but the script converts those to underscores in the final string; update the commented example so the transformed version matches the actual output (use underscores where the script replaces hyphens), e.g. adjust the example string containing "4.21.0-202511271015-ga9cd00b34_4.21.0_okd_scos.ec.5" so the post-transformation portion reflects underscores exactly as produced by the script.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/image/build-rpms.sh`:
- Around line 51-53: The script hardcodes Makefile.version.aarch64.var when
computing MICROSHIFT_VERSION; change it to detect architecture with uname -m
(e.g., arch=$(uname -m) then map to either "aarch64" or "x86_64" if needed) and
build the filename dynamically (e.g.,
VERSION_FILE="Makefile.version.${arch}.var"), then use that variable in the
awk/sed pipeline that sets MICROSHIFT_VERSION so the correct version file is
read for both x86_64 and aarch64 builds.
- Line 53: The MICROSHIFT_VERSION assignment uses the local date command which
yields non-deterministic timestamps across time zones; update the date
invocation in the MICROSHIFT_VERSION assignment (the line setting
MICROSHIFT_VERSION) to use UTC by adding the -u flag to date so the timestamp is
generated in UTC and RPM EVR ordering is consistent across builders.
---
Nitpick comments:
In `@src/image/build-rpms.sh`:
- Line 56: The example comment showing the version transformation is misleading
because it shows hyphen separators in the original but the script converts those
to underscores in the final string; update the commented example so the
transformed version matches the actual output (use underscores where the script
replaces hyphens), e.g. adjust the example string containing
"4.21.0-202511271015-ga9cd00b34_4.21.0_okd_scos.ec.5" so the post-transformation
portion reflects underscores exactly as produced by the script.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 8b612bde-20bf-4d1c-942b-c51aa1432a44
📒 Files selected for processing (4)
.github/workflows/copr-build-and-test.yaml.github/workflows/copr-experimental.yaml.github/workflows/copr-nightly.yamlsrc/image/build-rpms.sh
4e94d5a to
bbe71d5
Compare
Resolves: #209
Summary by CodeRabbit