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(schedule)!: show schedule errors and nest object #1108

Merged
merged 17 commits into from
May 8, 2024

Conversation

wsan3
Copy link
Contributor

@wsan3 wsan3 commented Apr 15, 2024

Description

Whenever a user has a YAML bug in their pipeline, or any other build-breaking error that short-circuits pipeline execution, they can usually find these error in the Audit tab, where we populate the hook with the error message.

This is currently not available for schedules. Instead, the error is just logged.

Desired View

Screenshot 2024-04-26 at 10 37 57 AM

Notable Changes

  • Moved Schedule out of go-vela/types and into go-vela/server
  • Turned Schedule into a nested object containing Repo and User information
  • Replaced reflect.DeepEqual with cmp.Diff in test files

Related

go-vela/community#872

@wsan3 wsan3 added the feature Indicates a new feature label Apr 15, 2024
@wsan3 wsan3 requested a review from a team as a code owner April 15, 2024 14:30
mock/server/schedule.go Show resolved Hide resolved
database/schedule/get_repo.go Outdated Show resolved Hide resolved
database/schedule/list.go Outdated Show resolved Hide resolved
cmd/vela-server/schedule.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Apr 16, 2024

Codecov Report

Attention: Patch coverage is 93.46154% with 17 lines in your changes are missing coverage. Please review.

❗ No coverage uploaded for pull request base (main@7f1a4c0). Click here to learn what that means.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1108   +/-   ##
=======================================
  Coverage        ?   68.08%           
=======================================
  Files           ?      394           
  Lines           ?    13284           
  Branches        ?        0           
=======================================
  Hits            ?     9044           
  Misses          ?     3731           
  Partials        ?      509           
Files Coverage Δ
api/build/approve.go 0.00% <ø> (ø)
api/types/schedule.go 100.00% <100.00%> (ø)
database/build/opts.go 100.00% <ø> (ø)
database/resource.go 78.86% <100.00%> (ø)
database/schedule/delete.go 100.00% <100.00%> (ø)
database/schedule/get.go 87.50% <100.00%> (ø)
database/schedule/get_repo.go 90.47% <100.00%> (ø)
database/schedule/list.go 76.00% <100.00%> (ø)
database/schedule/list_active.go 76.92% <100.00%> (ø)
database/schedule/list_repo.go 81.81% <100.00%> (ø)
... and 11 more

database/schedule/schedule.go Outdated Show resolved Hide resolved
database/schedule/schedule.go Outdated Show resolved Hide resolved
@wsan3 wsan3 self-assigned this Apr 17, 2024
wsan3 added 4 commits April 18, 2024 16:24
- Preload owner in Repo, which is nested in Schedule
- Update unit tests to reflect change
- Update integration tests to reflect change
database/types/schedule.go Show resolved Hide resolved
database/types/schedule.go Show resolved Hide resolved
Copy link
Contributor

@ecrupper ecrupper left a comment

Choose a reason for hiding this comment

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

Nice. One small thing I noticed

compiler/native/validate.go Outdated Show resolved Hide resolved
cmd/vela-server/schedule.go Outdated Show resolved Hide resolved
@ecrupper ecrupper changed the title feat(schedule): show schedule errors feat(schedule)!: show schedule errors and nest object May 6, 2024
Copy link
Collaborator

@wass3r wass3r left a comment

Choose a reason for hiding this comment

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

couple minor things. lgtm otherwise.

cmd/vela-server/schedule.go Outdated Show resolved Hide resolved
database/integration_test.go Show resolved Hide resolved
database/schedule/opts.go Outdated Show resolved Hide resolved
@wsan3 wsan3 merged commit 300ca45 into main May 8, 2024
14 of 16 checks passed
@wsan3 wsan3 deleted the feat/show-schedule-errors branch May 8, 2024 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Indicates a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants