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

enhance: any status, error wrapping, and fetch improvements #142

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

ecrupper
Copy link
Contributor

@ecrupper ecrupper commented Aug 21, 2024

A few things:

  • Supplying any for the status will allow for users to restart the latest build on a given branch regardless of its status without having to enumerate all statuses
  • Return err when failing to restart a target build
  • Default depth of 50 instead of 500 for builds searching + early exiting the pagination loop if a build is found early. No need to grab 500 builds when the first one is the desired status.

Closes go-vela/community#220
Closes go-vela/community#981

@ecrupper ecrupper requested a review from a team as a code owner August 21, 2024 16:41
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

Attention: Patch coverage is 36.00000% with 16 lines in your changes missing coverage. Please review.

Project coverage is 35.04%. Comparing base (0ffe39f) to head (849ff94).

Files Patch % Lines
cmd/vela-downstream/main.go 0.00% 8 Missing ⚠️
cmd/vela-downstream/plugin.go 38.46% 8 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #142      +/-   ##
==========================================
- Coverage   35.34%   35.04%   -0.31%     
==========================================
  Files           6        6              
  Lines         348      351       +3     
==========================================
  Hits          123      123              
- Misses        223      226       +3     
  Partials        2        2              
Files Coverage Δ
cmd/vela-downstream/build.go 100.00% <100.00%> (ø)
cmd/vela-downstream/config.go 100.00% <ø> (ø)
cmd/vela-downstream/repo.go 100.00% <100.00%> (ø)
cmd/vela-downstream/main.go 0.00% <0.00%> (ø)
cmd/vela-downstream/plugin.go 34.06% <38.46%> (+1.07%) ⬆️

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

@ecrupper ecrupper merged commit 2178111 into main Aug 21, 2024
10 of 12 checks passed
@ecrupper ecrupper deleted the enhance/early-exit-on-find branch August 21, 2024 18:22
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.

Downstream Plugin - Improve error reporting vela-downstream invoke most recent commit of a branch
3 participants