Skip to content

fix: Adjust the PostgresConfig JSON/YAML tags to snake_case - #53

Merged
ibakshay merged 1 commit into
perses:mainfrom
ZPascal:adjust-the-postgresql-config-to-cue-schema
Jul 13, 2026
Merged

fix: Adjust the PostgresConfig JSON/YAML tags to snake_case#53
ibakshay merged 1 commit into
perses:mainfrom
ZPascal:adjust-the-postgresql-config-to-cue-schema

Conversation

@ZPascal

@ZPascal ZPascal commented Jul 12, 2026

Copy link
Copy Markdown
Contributor
  • Adjust the PostgresConfig JSON/YAML tags to snake_case (max_conns, connect_timeout, prepare_threshold, ssl_mode) matching the CUE schema in sql_patch.cue

Related: perses/plugins#542

…s, connect_timeout, prepare_threshold, ssl_mode) matching the CUE schema in sql_patch.cue

Signed-off-by: ZPascal <pascal.zimmermann@theiotstudio.com>
@ZPascal

ZPascal commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

@ibakshay & @Nexucis Can you please check the PR?

@ibakshay ibakshay left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR aligns the PostgresConfig JSON/YAML field names with the CUE schema (sql_patch.cue) by switching selected fields from camelCase to snake_case, and updates unit tests accordingly.

Changes:

  • Update PostgresConfig struct tags to snake_case (max_conns, connect_timeout, prepare_threshold, ssl_mode).
  • Update JSON/YAML unmarshalling tests to use the new snake_case keys.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
go/datasource/proxy/sql/sql.go Switch Postgres config serialization tags to snake_case to match the CUE schema.
go/datasource/proxy/sql/sql_test.go Update test fixtures to use snake_case keys for Postgres config JSON/YAML.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread go/datasource/proxy/sql/sql.go
Comment thread go/datasource/proxy/sql/sql.go
Comment thread go/datasource/proxy/sql/sql_test.go
Comment thread go/datasource/proxy/sql/sql_test.go
@ibakshay
ibakshay added this pull request to the merge queue Jul 13, 2026
Merged via the queue into perses:main with commit 5e453ea Jul 13, 2026
13 checks passed
@ZPascal
ZPascal deleted the adjust-the-postgresql-config-to-cue-schema branch July 13, 2026 12:33
@Nexucis

Nexucis commented Jul 15, 2026

Copy link
Copy Markdown
Member

I don't understand these changes as they are not aligned and are not compliant with the case choice of all resources in Perses.

CamelCase is the case of all resources in Perses. The only exception is the Perses configuration.

This PR needs to be reverted

@Nexucis

Nexucis commented Jul 15, 2026

Copy link
Copy Markdown
Member

and the cuelang file needs to be patched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants