-
Notifications
You must be signed in to change notification settings - Fork 34
feat: remove workflow-name org scoping #1414
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: remove workflow-name org scoping #1414
Conversation
Signed-off-by: Miguel Martinez <[email protected]>
Signed-off-by: Miguel Martinez <[email protected]>
@@ -0,0 +1,2 @@ | |||
-- Modify "workflows" table | |||
ALTER TABLE "workflows" ALTER COLUMN "project" SET NOT NULL; |
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.
We don't need a migration of previous workflows right?
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.
No because they happened to be set and forced in another layer.
@@ -35,7 +35,7 @@ type Workflow struct { | |||
func (Workflow) Fields() []ent.Field { | |||
return []ent.Field{ | |||
field.String("name").Immutable(), | |||
field.String("project").Optional(), | |||
field.String("project"), |
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.
What are we doing with the current data? Will we migrate it?
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.
There is no need to migrate since all fields, in fact, have a project name, enforced somewhere else in the stack, not in the DB until now
This patch allows users to create workflows with the same name in the same org as long as they are in different projects.
It also enforces now the requirement of passing
project name
during attestation and updates documentation and dagger module.closes #1375