-
Notifications
You must be signed in to change notification settings - Fork 887
feat: add template version creator #3001
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: add template version creator #3001
Conversation
|
||
ALTER TABLE ONLY template_versions ALTER COLUMN created_by SET NOT NULL; | ||
|
||
COMMIT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dwahler I am hoping wrapping it in BEGIN
-COMMIT
would help to fix the problem caused by the migration. Not really sure if this broke the server though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interestingly, make gen
is failing with:
panic: reached retry deadline
goroutine 1 [running]:
main.main()
/home/runner/work/coder/coder/coderd/database/dump/main.go:19 +0x80c
exit status 2
make: *** [Makefile:60: coderd/database/dump.sql] Error 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the bug, the scoping logic was not good.
48b232d
to
c98f87b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Frontend ✅
While @AbhineetJain and I were discussing this, we realized that the migration failure is probably being caused by the temporary template versions that are created by the client, in preparation for creating a new template. Those rows have So the simplest fix is to just make |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This PR adds a created_by field to the template version table and returns the relevant data with the API calls.
Subtasks
This will enable us to show the template version history (who created it and when) on the Template page for #2876.
Example API Call
Request
Response