Skip to content

chore: add a unit test to ensure correct behaviour with multiple replicas and rename LifecycleTicker to AutobuildTicker #1420

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

Merged
merged 2 commits into from
May 13, 2022

Conversation

johnstcn
Copy link
Member

This PR adds another unit test to autobuild/executor to validate the correct behaviour when multiple coderd instances run in parallel.

Note: this only works if you use a "real" database, as coderdtest.New by default uses a separate fake database instance per coderd.

@johnstcn johnstcn requested a review from a team May 13, 2022 14:35
@johnstcn johnstcn self-assigned this May 13, 2022
@codecov
Copy link

codecov bot commented May 13, 2022

Codecov Report

Merging #1420 (04d1cca) into main (e6168ba) will increase coverage by 8.35%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1420      +/-   ##
==========================================
+ Coverage   58.80%   67.15%   +8.35%     
==========================================
  Files         287      287              
  Lines       19331    19331              
  Branches      244      244              
==========================================
+ Hits        11367    12982    +1615     
+ Misses       6747     5007    -1740     
- Partials     1217     1342     +125     
Flag Coverage Δ
unittest-go-macos-latest 54.15% <100.00%> (-0.02%) ⬇️
unittest-go-postgres- 65.64% <100.00%> (?)
unittest-go-ubuntu-latest 56.58% <100.00%> (-0.03%) ⬇️
unittest-go-windows-2022 52.57% <100.00%> (-0.02%) ⬇️
unittest-js 75.31% <ø> (ø)
Impacted Files Coverage Δ
coderd/coderdtest/coderdtest.go 98.27% <100.00%> (+4.44%) ⬆️
peer/channel.go 84.21% <0.00%> (-1.76%) ⬇️
agent/agent.go 65.28% <0.00%> (-0.62%) ⬇️
provisioner/terraform/provision.go 71.89% <0.00%> (-0.41%) ⬇️
provisionerd/provisionerd.go 76.03% <0.00%> (+0.26%) ⬆️
coderd/provisionerdaemons.go 63.31% <0.00%> (+0.50%) ⬆️
coderd/workspaceagents.go 56.04% <0.00%> (+0.69%) ⬆️
coderd/templates.go 64.24% <0.00%> (+1.55%) ⬆️
peer/conn.go 80.58% <0.00%> (+2.45%) ⬆️
peerbroker/listen.go 87.39% <0.00%> (+3.36%) ⬆️
... and 9 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 e6168ba...04d1cca. Read the comment docs.

@johnstcn johnstcn requested a review from kylecarbs May 13, 2022 14:54
Copy link
Member

@kylecarbs kylecarbs left a comment

Choose a reason for hiding this comment

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

We should probably change the title to reflect what this changes, but LGTM!

@johnstcn johnstcn changed the title chore: add a unit test to ensure correct behaviour with multiple replicas chore: add a unit test to ensure correct behaviour with multiple replicas and rename LifecycleTicker to AutobuildTicker May 13, 2022
@johnstcn johnstcn merged commit 4ab7a41 into main May 13, 2022
@johnstcn johnstcn deleted the cj/noissue/autobuild-exec-ha-test branch May 13, 2022 16:14
@misskniss misskniss added this to the V2 Beta milestone May 15, 2022
kylecarbs pushed a commit that referenced this pull request Jun 10, 2022
* chore: add a unit test to ensure correct behaviour with multiple coderd replicas
* nit: rename LifecycleTicker to AutobuildTicker
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