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

ci: add versions fixture generator for Red Hat #1356

Draft
wants to merge 33 commits into
base: main
Choose a base branch
from

Conversation

G-Rath
Copy link
Collaborator

@G-Rath G-Rath commented Oct 29, 2024

Branched off #1355


This adds a semantic fixture generator for the Red Hat ecosystem - as this ends up being just under 2mb, I've not committed the file like the others, instead making the test suite only use it if it's actually present.

It works by leveraging rpms built-in Lua interpreter, which includes exposing the vercmp function meaning we can have rpm tell us what the result of comparing two versions are so long as there's a version of that available.

In terms of actually getting a version of rpm, that turns out to be a lot harder with Docker I assume just because CentOS & co is a less open-source-y distro vs the others; there are images, but they're all generally very big. In an interesting twist though it turns out Debian actually ships a version of rpm for building and the like - it has had it's package management abilities neutered, but that's not something we need so a simple apt install rpm gives us the dependency we need.

@G-Rath
Copy link
Collaborator Author

G-Rath commented Oct 29, 2024

Semantic / generate-redhat-versions (pull_request) Successful in 15m

nice, that's a very reasonable "worst case with no cache" time given the size

(as a reminder, Debian is also pretty big typically taking 5+ minutes, but with caching it only takes ~20 seconds 😄)


Semantic / generate-redhat-versions (pull_request) Successful in 34s

double nice - way to go caching 🥳

@G-Rath G-Rath force-pushed the semantic/redhat-generator branch 2 times, most recently from 5d7f6b8 to add759d Compare October 29, 2024 23:55
@codecov-commenter
Copy link

codecov-commenter commented Oct 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.74%. Comparing base (8509b99) to head (502c632).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1356      +/-   ##
==========================================
+ Coverage   68.52%   68.74%   +0.21%     
==========================================
  Files         183      184       +1     
  Lines       17574    17714     +140     
==========================================
+ Hits        12043    12177     +134     
- Misses       4873     4877       +4     
- Partials      658      660       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@G-Rath G-Rath force-pushed the semantic/redhat-generator branch 2 times, most recently from 4ed1974 to a08e2b8 Compare November 4, 2024 19:00
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