Skip to content
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

Introduce backend flag to indicate that a deployed project is in an a… #3758

Conversation

rakeshsharma14317
Copy link
Contributor

No description provided.

Copy link
Contributor

@begelundmuller begelundmuller left a comment

Choose a reason for hiding this comment

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

Change of plan – @nishantmonu51 requested to turn this into a generic tagging feature. High level suggested changes:

  • Instead of ProdSLA bool, we would have ProdTags []string
  • Instead of rill sudo project search --sla, we would have rill sudo project search --tag tag1 --tag tag2 ... (use cmd.Flags().StringSliceVar to read multiple values into a []string).

@nishantmonu51
Copy link
Collaborator

Nit: Instead of ProdTags []string we can just have Tags []string

admin/database/postgres/migrations/0019.sql Outdated Show resolved Hide resolved
admin/database/database.go Outdated Show resolved Hide resolved
admin/deployments.go Outdated Show resolved Hide resolved
admin/projects.go Outdated Show resolved Hide resolved
admin/server/projects.go Outdated Show resolved Hide resolved
cli/cmd/sudo/tags/get.go Outdated Show resolved Hide resolved
cli/cmd/sudo/tags/set.go Outdated Show resolved Hide resolved
proto/rill/admin/v1/api.proto Outdated Show resolved Hide resolved
proto/rill/admin/v1/api.proto Outdated Show resolved Hide resolved
go.mod Show resolved Hide resolved
ProdSlots int `db:"prod_slots"`
ProdTTLSeconds *int64 `db:"prod_ttl_seconds"`
ProdDeploymentID *string `db:"prod_deployment_id"`
Tags pq.StringArray `db:"tags"`
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't use lib/pq, we use jackc/pgx for Postgres. Does this work? If yes, you can just put []string here. If not, should use pgtype.Array[string].

Copy link
Contributor Author

@rakeshsharma14317 rakeshsharma14317 Jan 6, 2024

Choose a reason for hiding this comment

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

I tried both ways you suggested, only works if we use pq.StringArray or custom impl of Tags

admin/server/projects.go Outdated Show resolved Hide resolved
cli/cmd/sudo/tags/set.go Outdated Show resolved Hide resolved
cli/cmd/sudo/tags/get.go Outdated Show resolved Hide resolved
@begelundmuller begelundmuller merged commit 272ce03 into main Jan 8, 2024
6 of 7 checks passed
@begelundmuller begelundmuller deleted the 3648-introduce-backend-flag-to-indicate-that-a-deployed-project-is-in-an-actual-production-state branch January 8, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce backend flag to indicate that a deployed project is in an actual production state
3 participants