Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[skip-ci] TMT: revdep podman build test #1892

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lsm5
Copy link
Member

@lsm5 lsm5 commented Mar 6, 2024

No description provided.

Copy link

Failed to load packit config file:

Cannot parse package config. ValidationError({'jobs': {0: {'common': ["'specfile_path' is not specified or no specfile was found in the repo"]}}})

For more info, please check out the documentation or contact the Packit team. You can also use our CLI command validate-config or our pre-commit hooks for validation of the configuration.

Copy link
Contributor

openshift-ci bot commented Mar 6, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lsm5
Once this PR has been reviewed and has the lgtm label, please assign edsantiago for approval. For more information see the Kubernetes Code Review Process.

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

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

Copy link

Failed to load packit config file:

Cannot parse package config. ValidationError({'jobs': {0: {'common': ["'specfile_path' is not specified or no specfile was found in the repo"]}}})

For more info, please check out the documentation or contact the Packit team. You can also use our CLI command validate-config or our pre-commit hooks for validation of the configuration.

@lsm5 lsm5 marked this pull request as draft March 6, 2024 13:56
Copy link

Failed to load packit config file:

Cannot parse package config. ValidationError({'jobs': {0: {'common': ["'specfile_path' is not specified or no specfile was found in the repo"]}}})

For more info, please check out the documentation or contact the Packit team. You can also use our CLI command validate-config or our pre-commit hooks for validation of the configuration.

@lsm5 lsm5 changed the title TMT: revdep podman build test [skip-ci] TMT: revdep podman build test Mar 6, 2024
@lsm5 lsm5 force-pushed the tmt-podman-revdep branch 5 times, most recently from a7c3e39 to 815cd3a Compare March 6, 2024 14:50
@lsm5
Copy link
Member Author

lsm5 commented Mar 6, 2024

@Luap99 @edsantiago @TomSweeneyRedHat PTAL. Still in draft and not ready for merge either way, but if this looks ok for starters, I'd like further comments on the test matrix to enable. Right now it's only fedora-rawhide-x86_64.

plans/podman_build_test.sh Outdated Show resolved Hide resolved
@lsm5
Copy link
Member Author

lsm5 commented Mar 11, 2024

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

I am not so sure how much value a build test adds, IMO build breaks are generally known by the submitter/reviewer. I guess it adds some value to prevent accidental breakages but I don't think they are very common.

I am not against doing something like this but I think we should have proper discussion first. And as a PoC could you add a "broken" commit here to see how this would look like when it fails?

plans/podman_build_test.sh Outdated Show resolved Hide resolved
git clone https://github.com/containers/podman

cd podman
dnf -y builddep rpm/podman.spec
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't this stuff be installed in the prepare step?

Copy link
Member Author

Choose a reason for hiding this comment

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

That would be doable if we're only running podman tests. If we also want to do buildah, skopeo and anything else, then probably best done in individual tests.

plans/main.fmf Outdated
summary: Build Podman
execute:
how: tmt
script: bash ./plans/podman_build_test.sh
Copy link
Member

Choose a reason for hiding this comment

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

As it's not directly related to building, running, or documenting podman perhaps this could live under ./contrib/tmtplans or similar?

Copy link
Member Author

Choose a reason for hiding this comment

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

will try with this change.

plans/podman_build_test.sh Outdated Show resolved Hide resolved

if [ -f /etc/fedora-release ]; then
export TMPDIR=/var/tmp
fi
Copy link
Member

Choose a reason for hiding this comment

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

It's unclear to me (a lay person, non-tmt expert) why this is needed. Perhaps a comment would be helpful to other non-experts?

plans/podman_build_test.sh Outdated Show resolved Hide resolved
Comment on lines 20 to 23
git add vendor/
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git commit -am 'add vendored files'
Copy link
Member

Choose a reason for hiding this comment

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

Consider grouping all the git repository setup steps together. It will make both the logs and the script easier to read and maintain.

@TomSweeneyRedHat
Copy link
Member

It would be nice to get @edsantiago 's eyeballs on this if you have the time to wait.

@lsm5 lsm5 marked this pull request as draft March 12, 2024 13:24
Co-authored-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
@@ -0,0 +1,24 @@
#!/usr/bin/env bash

set -eox pipefail
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
set -eox pipefail
set -exo pipefail

The order here is important.

Copy link
Collaborator

@edsantiago edsantiago left a comment

Choose a reason for hiding this comment

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

Quick first pass. Please also address Chris's comment.

Comment on lines +7 to +9
if [ -f /etc/fedora-release ]; then
export TMPDIR=/var/tmp
fi
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why the conditional? In all test environments I've seen, /var/tmp is much bigger than /tmp. It seems safest just to universally set TMPDIR=/var/tmp.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oopsie

export TMPDIR=/var/tmp
fi

git clone https://github.com/containers/podman
Copy link
Collaborator

Choose a reason for hiding this comment

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

This script is named buildah_build_test but there's no buildah anything anywhere?

Now I understand the script names. Suggestion: rename both to "build_XXX" instead of XXX_build? "buildah_build_test," to me, suggests that you are testing buildah's build command.

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

Successfully merging this pull request may close these issues.

None yet

5 participants