Skip to content

Conversation

henrywang
Copy link
Collaborator

In Fedora or OSCI dist-git gating, SRPM is the only way to get test code. Change to extracting SRPM to get source code. That works with both Packit and dist-git gating.

This PR also includes a when: running_env != unify in prepare to make it only runs on Packit or dist-git gating test. In our case, unify means running on Github CI or locally.

@bootc-bot bootc-bot bot requested a review from jeckersb October 4, 2025 04:56
@henrywang
Copy link
Collaborator Author

henrywang commented Oct 4, 2025

ansible in prepare summary:

TMT_TREE=/var/ARTIFACTS/work-readonly-testso2z42hbo/tmt/plans/integration/readonly-tests/tree

prepare ansible playbook search path:

  1. bootc/hack/packit-reboot.yml: fail: Playbook '/var/ARTIFACTS/git-18806550f6eec4bdd5b829fbdac8e3a17cc25194x66xpqn2/bootc/hack/packit-reboot.yml' does not exist.
  2. file:///bootc/hack/packit-reboot.yml: fail: Playbook '/var/ARTIFACTS/git-18806550f6eec4bdd5b829fbdac8e3a17cc25194g61y9ec8/bootc/hack/packit-reboot.yml' does not exist.
  3. ${TMT_TREE}/bootc/hack/packit-reboot.yml: fail: Playbook '/var/ARTIFACTS/git-18806550f6eec4bdd5b829fbdac8e3a17cc25194wiir1lrw/var/artifacts/work-readonly-testsilntmhhw/tmt/plans/integration/readonly-tests/tree/bootc/hack/packit-reboot.yml' does not exist.
  4. file://../../../${TMT_TREE}/bootc/hack/packit-reboot.yml: fail: '/var/ARTIFACTS/git-18806550f6eec4bdd5b829fbdac8e3a17cc251949fqj3f3q/../../../var/artifacts/work-readonly-tests4que9qig/tmt/plans/integration/readonly-tests/tree/bootc/hack/packit-reboot.yml' is not relative to the expected root '/var/ARTIFACTS/git-18806550f6eec4bdd5b829fbdac8e3a17cc251949fqj3f3q'

Okey, I tried all different configurations, no one works in this case. I still prefer https://github.com/bootc-dev/bootc/raw/refs/heads/main/hack/packit-reboot.yml because it's clear and straightforward.

@henrywang henrywang force-pushed the prepare_when branch 6 times, most recently from af38ce9 to c6d53c7 Compare October 6, 2025 11:53
@henrywang henrywang changed the title [WIP] test: Use SRPM as test code source to work with gating test test: Use SRPM as test code source to work with gating test Oct 6, 2025
@henrywang henrywang marked this pull request as ready for review October 6, 2025 13:31
@bootc-bot bootc-bot bot requested a review from gursewak1997 October 6, 2025 13:32
@henrywang
Copy link
Collaborator Author

CS9 failure needs fix #1663.

@henrywang henrywang mentioned this pull request Oct 6, 2025
@henrywang henrywang requested a review from cgwalters October 6, 2025 13:43
./provision-derived.sh

if [[ "$GATING" == true ]]; then
# Install Fedora CI/OSCI required packages for "Prepare dist-git sources" task
Copy link
Collaborator

Choose a reason for hiding this comment

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

To be clear, this is to get the tests? Ah I see, we're shipping them in the .tar.zstd today. But in theory we shouldn't need the full build dependencies just to get those...

Is extracting the .src.rpm really what others do here? I guess we could make a -tests subpackage?

Copy link
Collaborator Author

@henrywang henrywang Oct 7, 2025

Choose a reason for hiding this comment

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

Because in Fedora/OSCI gating, two tasks will be running after our prepare:

queued prepare task #1: essential-requires on default-0
queued prepare task #2: default-0 on default-0 --> our install prepare
queued prepare task #3: default-1 on default-0 --> our provision prepare
queued prepare task #4: Prepare dist-git sources (buildrequires, patches, discovery...) on default-0 --> install packages with `rpm-build @buildsys-build 'dnf-command(builddep)`
queued prepare task #5: requires (dist-git) on default-0 --> install builddeps packages
queued prepare task #6: recommends (dist-git) on default-0

Because those package installations prepares are under our provision prepare, so we need pre-build those packages, which will be used by task 3 and task 4, into our image.

image: $@{test_disk_image}
prepare:
# Replace package mode with image mode
# DO NOT RUN ON Github or Locally
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's a bit unclear what "DO NOT RUN ON Github" means. The term "unify" also isn't obvious to me.

How about calling this "init_package_mode" or something - making clear that in this flow we're starting from package mode.

- pwd && ls -al
- if [[ -d hack ]]; then cd hack && ./provision-packit.sh; fi
- mkdir -p bootc && cp /var/share/test-artifacts/*.src.rpm bootc
- cd bootc && rpm2cpio *.src.rpm | cpio -idmv && rm -f *-vendor.tar.zstd && zstd -d *.tar.zstd && tar -xvf *.tar -C . --strip-components=1 && ls -al
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah. But if we do this, do we need the dnf builddep per above at all? I don't think so...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right. We don't need buiddep packages, but FedoraCI/OSCI needs those packages.

@henrywang henrywang merged commit f1dec83 into bootc-dev:main Oct 8, 2025
32 of 35 checks passed
@henrywang henrywang deleted the prepare_when branch October 8, 2025 03:47
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