Skip to content

Upgrade tdnf to version 3.5.8 and Fix the ptests#10464

Merged
sameluch merged 7 commits into3.0-devfrom
sammeluch/upgrade-tdnf
Sep 18, 2024
Merged

Upgrade tdnf to version 3.5.8 and Fix the ptests#10464
sameluch merged 7 commits into3.0-devfrom
sammeluch/upgrade-tdnf

Conversation

@sameluch
Copy link
Copy Markdown
Contributor

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

What does the PR accomplish, why was it needed?
Currently the ptests for tdnf don't run, also we are taking a minor upgrade for tdnf to go alongside the snapshot work. PR stops skipping tests, additionally makes them compatible with the chroot environment.

Change Log
  • Upgrade tdnf to version 3.5.8
  • Fix the ptests to run for azure linux
Does this affect the toolchain?

YES

Test Methodology

@sameluch sameluch requested review from a team as code owners September 17, 2024 02:17
Comment thread SPECS/tdnf/fix-tests-for-azl.patch Outdated
name=basic
baseurl=http://localhost:8080/photon-test-src
-gpgkey=file:///etc/pki/rpm-gpg/VMWARE-RPM-GPG-KEY
+gpgkey=file:///etc/pki/rpm-gpg/MICROSOFT-RPM-GPG-KEY
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For the key paths, it might be easier to instead link/copy them in the %check section to match the expectations from the tests. Specs tend to be more friendly to view if we ever change the key name/path and my hope is it'll be harder to miss this workaround at that time.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

in this sense are you saying to copy the microsoft gpg key to the vmware gpg key path?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yup, or just add a symbolic link before we run the tests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Symbolic link added in during check section.

Comment thread SPECS/tdnf/tdnf.spec Outdated
Comment thread SPECS/tdnf/tdnf.spec Outdated
Comment on lines +133 to +134
# remove problematic test file when running tests from within the rpm build directory
rm pytests/tests/test_srpms.py
Copy link
Copy Markdown
Contributor

@PawelWMS PawelWMS Sep 17, 2024

Choose a reason for hiding this comment

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

Two questions here:

  • What is wrong with these tests? I'm reluctant to remove tests without a good reason. If it's something on our end, we should fix it. If it's a different case, please add details as to why it's OK to remove these tests.
  • Is this really ran from the %build stage? It would be ideal, if we could keep all test steps inside the %check section, although I'm aware that's not always possible.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The tests count and check the srpms present within the build expected RPM build directory. We don't necessarily know what exactly will be in this directory at the time of build, so these tests did not make much sense when this is the case and when being executed within the build directory. Additionally, the test's expected cleanup is to delete the entire directory. By doing so, the entire source directory and actively running tests are removed. Thus I've opted to remove thei file as to not be included prior to being built/included by cmake within the build directory.

Alternative to this, a skip directive could be added to each test, and the cleanup function could be removed as to no blow away the source. Though removing this in the spec %build or %prep section seemed much cleaner. I opted to include it within %build as it seemed more relevant to building rather than prepping to build.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Got it. In that case, could I ask you to add that explanation you just gave here about why we need to remove the tests? A shorted version is fine, though.:)

And can you check, if moving this to the %check section is still fine? That way it's clearer this is a test-only change.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I will check if its possible to remove during the check section, though I suspect it may have to remain in build or prep.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Explanation added, also moved removal to check section. Since cmake duplicates the file in the build directory, it also is removed there for safety.

Comment thread SPECS/tdnf/tdnf.spec Outdated
@sameluch sameluch merged commit 7c7e361 into 3.0-dev Sep 18, 2024
@sameluch sameluch deleted the sammeluch/upgrade-tdnf branch September 18, 2024 23:21
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