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

Fix Github Actions for Ubuntu-24.04 #11112

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

dereknola
Copy link
Member

@dereknola dereknola commented Oct 15, 2024

Proposed Changes

  • Fix lsof output for flock utility function. Ubuntu 24.04 moved to a new(ish) version of lsof which included Fix FD field description lsof-org/lsof#158.

    Old lsof Newish lsof
    image image
  • Fix composite action for libvirt/vagrant installation. Now works on ubuntu-24.04

  • Pinned e2e and unit test workflows to ubuntu-24.04 to prevent future disruption (in 2 years I can manually open PRs for ubuntu-26.04)

Types of Changes

Verification

Testing

Linked Issues

User-Facing Change


Further Comments

@dereknola dereknola marked this pull request as ready for review October 15, 2024 16:30
@dereknola dereknola requested a review from a team as a code owner October 15, 2024 16:30
@@ -52,7 +52,7 @@ func Release(lock int) error {

// CheckLock checks whether any process is using the lock
func CheckLock(path string) bool {
lockByte, _ := exec.Command("lsof", "-w", "-F", "ln", path).Output()
lockByte, _ := exec.Command("lsof", "-w", "-F", "lfn", path).Output()
Copy link
Member

Choose a reason for hiding this comment

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

eugh, I wonder if we've ever checked to see if there is a pure go version of this

Copy link
Member Author

Choose a reason for hiding this comment

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

Its literally only used in the unit test itself to validate the lock. The major lock libraries like https://github.com/gofrs/flock don't have a "checkLock" function

Copy link
Member

@brandond brandond Oct 15, 2024

Choose a reason for hiding this comment

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

ah. It is a little weird that we have stuff that is only used by the test framework mixed in with the other flock package stuff; if we only need it in tests maybe it could go in the frameworks stuff. Just nitpicking though.

Copy link
Member

@brandond brandond Oct 15, 2024

Choose a reason for hiding this comment

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

That said, wouldn't TryLock() cover what we're using CheckLock() for?

@dereknola dereknola changed the title [WIP] GHA 24.04 Fix Github Actions for Ubuntu-24.04 Oct 15, 2024
Copy link

codecov bot commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.90%. Comparing base (536fa44) to head (ef8cf0e).

❗ There is a different number of reports uploaded between BASE (536fa44) and HEAD (ef8cf0e). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (536fa44) HEAD (ef8cf0e)
e2etests 7 6
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11112      +/-   ##
==========================================
- Coverage   49.91%   43.90%   -6.02%     
==========================================
  Files         178      178              
  Lines       14820    14820              
==========================================
- Hits         7398     6506     -892     
- Misses       6070     7108    +1038     
+ Partials     1352     1206     -146     
Flag Coverage Δ
e2etests 36.15% <ø> (-9.80%) ⬇️
inttests 36.84% <ø> (+0.02%) ⬆️
unittests 13.57% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

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