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

fix: update repo counter with missing template #899

Closed
jbrockopp opened this issue Jan 8, 2024 · 0 comments · Fixed by go-vela/server#1036
Closed

fix: update repo counter with missing template #899

jbrockopp opened this issue Jan 8, 2024 · 0 comments · Fixed by go-vela/server#1036
Labels
bug Indicates a bug

Comments

@jbrockopp
Copy link
Contributor

Description

We had a user attempt to trigger the first build on a new repo in Vela with the following pipeline:

# For more details on templates, see the vela docs:
# https://go-vela.github.io/docs/templates/
# https://go-vela.github.io/docs/reference/yaml/templates/
# https://go-vela.github.io/docs/templates/tutorials/go/
# use the @branch-name override when testing
# templates:
#   - name: example
#     source: .vela.template.yml
#     type: file

stages:
  demo:
    steps:
      - name: demo
        template:
          name: example

NOTE: The demo step isn't valid because the example template is commented out.

So, when Vela went to create the build for the pipeline in the system, it led to this error shown on the Builds page:

image

NOTE: This error message is a bit misleading since a template is involved but that is a different problem.

The actual bug is that Vela didn't update the repo counter for this build leading to a broken state.

Without admin intervention, subsequent commits to the repo show this error on the Audit page:

image

This is because the counter is stuck at 0 for the repo while the actual number of builds for the repo is 1.

The workaround is to manually update the counter on the Settings page from 0 -> 1.

Value

A repo doesn't end up in a broken state that requires a repo or platform admin to resolve

Useful Information

  1. What is the output of vela --version?

v0.20.3

  1. What operating system is being used?

https://www.flatcar.org/

  1. Any other important details?

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant