-
-
Notifications
You must be signed in to change notification settings - Fork 24
feat: add labels to projects #366
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
base: master
Are you sure you want to change the base?
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Overall LGTM, minor suggestions
@@ -360,6 +360,7 @@ func (router *Router) DeployApplicationRoutes(f *fuego.Server, deployController | |||
fuego.Get(f, "/logs/{application_id}", deployController.GetLogs) | |||
fuego.Get(f, "/deployments/{deployment_id}/logs", deployController.GetDeploymentLogs) | |||
fuego.Get(f, "/deployments", deployController.GetApplicationDeployments) | |||
fuego.Put(f, "/labels", deployController.UpdateApplicationLabels) |
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.
ideally better to keep it as /application/{appID}/labels
right?
query string would make sense if it was optional value, but in our case this is mandatory
) | ||
|
||
func (s *DeployService) UpdateApplicationLabels(applicationID uuid.UUID, labels []string, organizationID uuid.UUID) error { | ||
return s.storage.UpdateApplicationLabels(applicationID, labels, organizationID) |
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.
Can we remove duplicate strings just incase if its there in labels array? Like sanity before storing in db? In FE, should we keep max character limit otherwise might be able to add a big string, looking odd in the UI?
setNewLabel(''); | ||
return; | ||
} | ||
const updated = [...localLabels, value]; |
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.
const updated = [...localLabels, value]; | |
const updated = [...new Set([...localLabels, value])]; |
removes duplication
api/internal/types/task.go
Outdated
type UpdateOptions struct { | ||
Force bool | ||
ForceWithoutCache bool | ||
} |
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.
} | |
} | |
|
||
generatePorts := "seq 49152 65535" | ||
|
||
getUsedPorts := "command -v ss >/dev/null 2>&1 && ss -tan | awk '{print $4}' | cut -d':' -f2 | grep '[0-9]\\{1,5\\}' | sort -u || netstat -tan | awk '{print $4}' | grep ':[0-9]' | cut -d':' -f2 | sort -u" |
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.
should we move this to utils?
reopened accidental closure of this PR, @zhravan for your notice |
92e753e
to
871021e
Compare
871021e
to
7230676
Compare
No description provided.