Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Fix CI #101

Merged
merged 3 commits into from
Sep 9, 2021
Merged

Fix CI #101

merged 3 commits into from
Sep 9, 2021

Conversation

dhiltgen
Copy link
Contributor

@dhiltgen dhiltgen commented Sep 7, 2021

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Sep 7, 2021

Codecov Report

Merging #101 (278c70c) into main (63b1037) will increase coverage by 54.79%.
The diff coverage is 63.56%.

Impacted file tree graph

@@            Coverage Diff             @@
##            main     #101       +/-   ##
==========================================
+ Coverage   9.03%   63.82%   +54.79%     
==========================================
  Files         39       40        +1     
  Lines       2667     2737       +70     
==========================================
+ Hits         241     1747     +1506     
+ Misses      2399      779     -1620     
- Partials      27      211      +184     
Flag Coverage Δ
integration-tests 60.54% <63.56%> (?)
unit-tests 10.01% <1.21%> (+0.97%) ⬆️

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

Impacted Files Coverage Δ
pkg/driver/kubernetes/driver.go 64.08% <53.33%> (+64.08%) ⬆️
pkg/driver/driver.go 38.46% <55.00%> (+38.46%) ⬆️
pkg/driver/kubernetes/podchooser/podchooser.go 62.50% <58.33%> (+62.50%) ⬆️
pkg/driver/kubernetes/creation.go 64.36% <64.36%> (ø)
pkg/build/build.go 48.26% <100.00%> (+48.26%) ⬆️
pkg/cmd/create.go 78.78% <100.00%> (+78.78%) ⬆️
pkg/driver/kubernetes/manifest/manifest.go 96.53% <100.00%> (+68.24%) ⬆️
pkg/build/output.go 82.35% <0.00%> (+2.94%) ⬆️
pkg/platformutil/parse.go 27.27% <0.00%> (+4.54%) ⬆️
... and 26 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 63b1037...278c70c. Read the comment docs.

@dhiltgen dhiltgen force-pushed the fix_ci branch 12 times, most recently from 1c6a7b4 to d1a9fa4 Compare September 7, 2021 21:25
@dhiltgen dhiltgen changed the title WIP - Fix CI Fix CI Sep 7, 2021
Daniel Hiltgen added 2 commits September 7, 2021 14:47
Recent versions of k8s and/or containerd get stuck for about a minute
with the failed docker.sock mount which causes problems.  This
attempts to clean up things faster by explicitly deleting the
pods that will never start.
if err != nil {
return err
}
clients[drivers[i].Name][chosenNodeName] = c
clients[drivers[i].Name][builderClients.ChosenNode.NodeName] = builderClients.ChosenNode.BuildKitClient
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you could run into a race here unless you use sync.Mutex and lock/unlock it around the clients[] hashmap.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great catch! You're right, this was unsafe usage.

// This most likely means another build is running in parallel
// Give it just enough time to finish creating resources then retry
time.Sleep(25 * time.Millisecond * time.Duration(1+rand.Int63n(39))) // 25 - 1000 ms
}); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

This makes me a bit nervous. I get it might take a bit for the builders to simmer down, but just sleeping randomly for 1000 milliseconds feels a bit weird.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's fair. Let me drop this down to a much smaller pause to get the racing CLIs skewed but not as noticeable to a human.

@dhiltgen dhiltgen merged commit ac94d82 into vmware-archive:main Sep 9, 2021
@dhiltgen dhiltgen deleted the fix_ci branch September 9, 2021 00:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants