Skip to content

fix: only allow promoting successful template versions - #9998

Merged
aslilac merged 11 commits into
mainfrom
only-promote-successful-builds
Oct 5, 2023
Merged

aslilac merged 11 commits into
mainfrom
only-promote-successful-builds

Conversation

@aslilac

@aslilac aslilac commented Oct 2, 2023 •

Copy link
Copy Markdown
Member

Closes #9904

  • Add a check on the backend to prevent promoting an invalid version which has a failed/canceled/unfinished build
  • Disable the "promote" button on the frontend to match
  • Add "failed", "canceling", "building", and "pending" badges in the UI for versions with corresponding states
  • Avoid showing the "newest" badge on versions that aren't valid
  • Hide "canceled" versions from the UI entirely

@aslilac

This comment was marked as resolved.

@aslilac
aslilac force-pushed the only-promote-successful-builds branch from 70e9cd6 to 6dc8fc3 Compare October 2, 2023 23:23

@BrunoQuaresma BrunoQuaresma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

FE code looks good but since most of the changes are related to Go, I would also request a review from someone with more expertise on that

@aslilac
aslilac requested a review from matifali October 3, 2023 22:58
Comment thread coderd/templateversions.go Resolved
@aslilac
aslilac requested a review from spikecurtis October 4, 2023 16:41
@aslilac
aslilac merged commit f001a57 into main Oct 5, 2023
@aslilac
aslilac deleted the only-promote-successful-builds branch October 5, 2023 16:49
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

do not allow promotion of a failed template version

3 participants