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: status endpoints #1235

Merged
merged 8 commits into from
Jan 7, 2025
Merged

feat: status endpoints #1235

merged 8 commits into from
Jan 7, 2025

Conversation

plyr4
Copy link
Contributor

@plyr4 plyr4 commented Jan 2, 2025

implements go-vela/community#749 in a way that doesnt impact current status svg responses.

instead, two new endpoints to get unauthenticated access to "lite" versions of repo and builds.

Concerns

  • potential impact to the database from unauthenticated and untrackable spam. but... this is not a new problem. could easily do it elsewhere (dashboards, pat auth, etc) if you were determined, but still.
  • the /badge endpoint for "private repos" have never been protected, but this is obviously opening the door much wider.

@plyr4 plyr4 requested a review from a team as a code owner January 2, 2025 17:39
Copy link

codecov bot commented Jan 2, 2025

Codecov Report

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

Project coverage is 56.60%. Comparing base (4c9e836) to head (e42c378).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
api/build/status.go 0.00% 11 Missing ⚠️
api/repo/status.go 0.00% 11 Missing ⚠️
api/types/build.go 0.00% 7 Missing ⚠️
router/router.go 0.00% 6 Missing ⚠️
api/types/repo.go 0.00% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1235      +/-   ##
==========================================
- Coverage   56.66%   56.60%   -0.06%     
==========================================
  Files         626      628       +2     
  Lines       35541    35578      +37     
==========================================
  Hits        20139    20139              
- Misses      14722    14759      +37     
  Partials      680      680              
Files with missing lines Coverage Δ
api/types/repo.go 99.17% <0.00%> (-0.83%) ⬇️
router/router.go 0.00% <0.00%> (ø)
api/types/build.go 97.56% <0.00%> (-1.06%) ⬇️
api/build/status.go 0.00% <0.00%> (ø)
api/repo/status.go 0.00% <0.00%> (ø)

timhuynh94
timhuynh94 previously approved these changes Jan 2, 2025
Copy link
Member

@wass3rw3rk wass3rw3rk left a comment

Choose a reason for hiding this comment

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

test fail. swagger annotation is defining GetStatus twice. otherwise 👍🏼

timhuynh94
timhuynh94 previously approved these changes Jan 3, 2025
Copy link
Member

@wass3rw3rk wass3rw3rk left a comment

Choose a reason for hiding this comment

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

what do you think about dropping email from the build status endpoint at least? maybe deploy_payload, as well.

@plyr4 plyr4 merged commit f34ffb9 into main Jan 7, 2025
11 of 13 checks passed
@plyr4 plyr4 deleted the feat/status-endpoints branch January 7, 2025 17:32
timhuynh94 pushed a commit that referenced this pull request Jan 17, 2025
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