mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
refactor: Generalize log ownership to allow for scratch jobs (#182)
* refactor: Generalize log ownership to allow for scratch jobs Importing may fail when creating a project. We don't want to lose this output, but we don't want to allow users to create a failing project. This generalizes logs to soon enable one-off situations where a user can upload their archive, create a project, and watch the output parse to completion. * Improve file table schema by using hash * Fix racey test by allowing logs before * Add debug logging for PostgreSQL insert
This commit is contained in:
@ -153,7 +153,6 @@ func (api *api) postProjectVersionByOrganization(rw http.ResponseWriter, r *http
|
||||
InitiatorID: apiKey.UserID,
|
||||
Provisioner: project.Provisioner,
|
||||
Type: database.ProvisionerJobTypeProjectImport,
|
||||
ProjectID: project.ID,
|
||||
Input: input,
|
||||
})
|
||||
if err != nil {
|
||||
@ -249,7 +248,3 @@ func convertProjectParameter(parameter database.ProjectParameter) ProjectParamet
|
||||
ValidationValueType: parameter.ValidationValueType,
|
||||
}
|
||||
}
|
||||
|
||||
func projectVersionLogsChannel(projectVersionID uuid.UUID) string {
|
||||
return fmt.Sprintf("project-version-logs:%s", projectVersionID)
|
||||
}
|
||||
|
Reference in New Issue
Block a user