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

feat(repo)!: add pending approval timeout #1227

Merged
merged 10 commits into from
Dec 30, 2024

Conversation

ecrupper
Copy link
Contributor

Give repos a new setting called approval_timeout which will set builds that have been sitting in a pending approval state to a failure if they've been unapproved for the given time.

Also applied some approval logic to restarts now that we store fork on builds.

@ecrupper ecrupper requested a review from a team as a code owner December 16, 2024 20:53
Copy link

codecov bot commented Dec 16, 2024

Codecov Report

Attention: Patch coverage is 35.40373% with 208 lines in your changes missing coverage. Please review.

Project coverage is 56.57%. Comparing base (ada42d5) to head (d510c01).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
api/webhook/post.go 0.00% 39 Missing ⚠️
api/build/enqueue.go 0.00% 34 Missing ⚠️
api/build/gatekeep.go 0.00% 31 Missing ⚠️
api/build/restart.go 0.00% 26 Missing ⚠️
cmd/vela-server/cleanup.go 0.00% 26 Missing ⚠️
api/repo/create.go 0.00% 15 Missing ⚠️
cmd/vela-server/server.go 0.00% 13 Missing ⚠️
cmd/vela-server/main.go 0.00% 6 Missing ⚠️
api/repo/update.go 0.00% 5 Missing ⚠️
router/middleware/default_timeout.go 0.00% 5 Missing ⚠️
... and 3 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1227      +/-   ##
==========================================
- Coverage   56.64%   56.57%   -0.08%     
==========================================
  Files         623      626       +3     
  Lines       35280    35429     +149     
==========================================
+ Hits        19986    20044      +58     
- Misses      14620    14709      +89     
- Partials      674      676       +2     
Files with missing lines Coverage Δ
api/types/repo.go 100.00% <100.00%> (+2.03%) ⬆️
database/repo/table.go 100.00% <ø> (ø)
database/testutils/api_resources.go 94.85% <100.00%> (+0.01%) ⬆️
mock/server/repo.go 0.00% <ø> (ø)
api/build/auto_cancel.go 16.93% <66.66%> (+0.44%) ⬆️
database/build/list_pending_approval.go 89.65% <89.65%> (ø)
database/types/repo.go 94.89% <88.57%> (-1.85%) ⬇️
api/repo/update.go 0.00% <0.00%> (ø)
router/middleware/default_timeout.go 50.00% <0.00%> (-50.00%) ⬇️
cmd/vela-server/main.go 0.00% <0.00%> (ø)
... and 7 more

KellyMerrick
KellyMerrick previously approved these changes Dec 17, 2024
Copy link
Contributor

@KellyMerrick KellyMerrick left a comment

Choose a reason for hiding this comment

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

lgtm

api/build/traffic.go Outdated Show resolved Hide resolved
KellyMerrick
KellyMerrick previously approved these changes Dec 26, 2024
Copy link
Contributor

@KellyMerrick KellyMerrick left a comment

Choose a reason for hiding this comment

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

lgtm

cmd/vela-server/main.go Outdated Show resolved Hide resolved
Copy link
Contributor

@plyr4 plyr4 left a comment

Choose a reason for hiding this comment

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

sweet

@ecrupper ecrupper merged commit 70ca430 into main Dec 30, 2024
14 of 16 checks passed
@ecrupper ecrupper deleted the enhance/pending-approval-timeout branch December 30, 2024 15:02
timhuynh94 pushed a commit that referenced this pull request Jan 17, 2025
* init commit

* feat(repo): add pending approval timeout

* fix test

* remove dead code

---------

Co-authored-by: David May <[email protected]>
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.

4 participants