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

Ignore blocked pipelines for badge rendering #4582

Merged
merged 3 commits into from
Dec 18, 2024
Merged

Ignore blocked pipelines for badge rendering #4582

merged 3 commits into from
Dec 18, 2024

Conversation

xoxys
Copy link
Member

@xoxys xoxys commented Dec 17, 2024

Fixes: #2337

Use the existing pagination helper to find the last pipeline that has a status != blocked. While it works, I'm not sure if that's the best solution. If you have any other suggestion, please let me know.

image

@woodpecker-bot
Copy link
Contributor

woodpecker-bot commented Dec 17, 2024

Deployment of preview was torn down

Copy link

codecov bot commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 0% with 30 lines in your changes missing coverage. Please review.

Project coverage is 28.29%. Comparing base (e8216bc) to head (2549cc4).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
server/store/mocks/store.go 0.00% 22 Missing ⚠️
server/store/datastore/pipeline.go 0.00% 7 Missing ⚠️
server/api/badge.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4582      +/-   ##
==========================================
- Coverage   28.30%   28.29%   -0.02%     
==========================================
  Files         399      399              
  Lines       28168    28197      +29     
==========================================
+ Hits         7973     7978       +5     
- Misses      19490    19514      +24     
  Partials      705      705              

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

@qwerty287
Copy link
Contributor

Can't we directly do that in SQL with where status != blocked? So a new function next to GetPipelineLast extending it with this filter

@xoxys
Copy link
Member Author

xoxys commented Dec 18, 2024

Sure, sounds like a better idea 😅

@qwerty287 qwerty287 added bug Something isn't working server labels Dec 18, 2024
@xoxys xoxys requested a review from a team December 18, 2024 07:47
@xoxys
Copy link
Member Author

xoxys commented Dec 18, 2024

Thanks for your review!

@xoxys xoxys merged commit 7fa474c into main Dec 18, 2024
7 of 9 checks passed
@xoxys xoxys deleted the badge-skip-blocked branch December 18, 2024 07:58
@woodpecker-bot woodpecker-bot mentioned this pull request Dec 17, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Skip pipelines waiting for approvals from badge
3 participants