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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

G-Rath
Copy link
Collaborator

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

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.94%. Comparing base (c80f395) to head (cc321c1).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1356      +/-   ##
==========================================
- Coverage   68.96%   68.94%   -0.02%     
==========================================
  Files         185      185              
  Lines       17934    17934              
==========================================
- Hits        12368    12365       -3     
- Misses       4903     4905       +2     
- Partials      663      664       +1     

☔ 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 3 times, most recently from a08e2b8 to 502c632 Compare November 5, 2024 20:12
@G-Rath G-Rath marked this pull request as ready for review November 7, 2024 19:59
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