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

Enforce installing llvm-libs from the copr repo #697

Merged
merged 2 commits into from
Sep 6, 2024

Conversation

jchecahi
Copy link
Contributor

@jchecahi jchecahi commented Sep 4, 2024

This addresses test run issues raised in #692.

Tested on this run (RedHat internal only).

@nikic nikic requested a review from kwk September 4, 2024 12:48
Copy link
Collaborator

@kwk kwk left a comment

Choose a reason for hiding this comment

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

@jchecahi it looks good and seems to work. But I now wonder if we should ask dnf to install a specific version of our packages. We know for each day which version that is by asking:

yyyymmdd=$(date +%Y%m%d)

rev_url=https://github.com/fedora-llvm-team/llvm-snapshots/releases/download/snapshot-version-sync/llvm-git-revision-${yyyymmdd}.txt
rev=$(curl -sL $rev_url)
rev_short=$(echo "${rev:0:14}")

release_url=https://github.com/fedora-llvm-team/llvm-snapshots/releases/download/snapshot-version-sync/llvm-release-${yyyymmdd}.txt
ver=$(curl -sL $release_url)
suffix=${ver}~pre${yyyymmdd}.g${rev_short}

echo "Need to install llvm-lib-${suffix}"

I approve this PR but if you say that we can install a specific version then I'd like that better. I understand that we're pulling in tests that should be left untouched and are used for other OSes where we don't know the LLVM version upfront. Just saying.

@jchecahi
Copy link
Contributor Author

jchecahi commented Sep 5, 2024

I approve this PR but if you say that we can install a specific version then I'd like that better. I understand that we're pulling in tests that should be left untouched and are used for other OSes where we don't know the LLVM version upfront. Just saying.

In #671 we agreed to keep this as simple as possible, and I think we should follow the same approach here. IMHO, it's not worth adding that complexity to the prepare step of a tmt test plan.
We don't need to be that exhaustive and request the exact version, as we can make some safe assumptions in our environment:

  1. We're adding a copr repo on top of a distro (be it rhel, be it fedora) which contains the snapshot for a given day. It's guaranteed that this copr repo (regardless the day) has an llvm newer than any distro repos.
  2. We ask dnf to install the "best" llvm. From previous point, dnf will install it (or upgrade to) from the copr repo.
  3. Let tmt install all the test requirements
  4. Verify that llvm-libs installed is a ~pre package, ensuring that tmt did not downgrade or mess up with our snapshot package.

@nikic nikic merged commit 0be530d into fedora-llvm-team:main Sep 6, 2024
4 of 5 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.

3 participants