Skip to content

feat(rdb): add config get command to generate database client snippets#5644

Draft
jremy42 wants to merge 4 commits into
mainfrom
feat/rdb-config-get
Draft

feat(rdb): add config get command to generate database client snippets#5644
jremy42 wants to merge 4 commits into
mainfrom
feat/rdb-config-get

Conversation

@jremy42

@jremy42 jremy42 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

close #5501

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #0000

Release note for CHANGELOG:


@jremy42 jremy42 requested review from a team and remyleone as code owners June 5, 2026 10:00
@codecov-commenter

codecov-commenter commented Jun 5, 2026

Copy link
Copy Markdown

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
2428 3 2425 17
View the top 3 failed test(s) by shortest run time
github.com/scaleway/scaleway-cli/v2/cmd/scw::Test_AllUsage/rdb_config_usage
Stack Traces | 0.01s run time
=== RUN   Test_AllUsage/rdb_config_usage
=== PAUSE Test_AllUsage/rdb_config_usage
=== CONT  Test_AllUsage/rdb_config_usage
    main_test.go:37: 
        	Error Trace:	.../scaleway-cli/core/testing.go:779
        	            				.../scaleway-cli/core/testing.go:693
        	            				.../scaleway-cli/core/testing.go:523
        	Error:      	Received unexpected error:
        	            	open testdata/test-all-usage-rdb-config-usage.golden: no such file or directory
        	Test:       	Test_AllUsage/rdb_config_usage
        	Messages:   	expected to find golden file testdata/test-all-usage-rdb-config-usage.golden
--- FAIL: Test_AllUsage/rdb_config_usage (0.01s)
github.com/scaleway/scaleway-cli/v2/cmd/scw::Test_AllUsage/rdb_usage
Stack Traces | 0.01s run time
=== RUN   Test_AllUsage/rdb_usage
=== PAUSE Test_AllUsage/rdb_usage
=== CONT  Test_AllUsage/rdb_usage
    main_test.go:37: 
        	Error Trace:	.../scaleway-cli/core/testing.go:780
        	            				.../scaleway-cli/core/testing.go:693
        	            				.../scaleway-cli/core/testing.go:523
        	Error:      	Not equal: 
        	            	expected: "🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲\n🟩🟩🟩 STDOUT️ 🟩🟩🟩️\nThis API allows you to manage your Managed Databases for PostgreSQL and MySQL.\n\nUSAGE:\n  scw rdb <command>\n\nAVAILABLE COMMANDS:\n  acl          Access Control List (ACL) management commands\n  backup       Backup management commands\n  database     Database management commands\n  endpoint     Endpoint management\n  engine       Database engines commands\n  instance     Instance management commands\n  log          Instance logs management commands\n  node-type    Node types management commands\n  privilege    User privileges management commands\n  read-replica Read replica management\n  setting      Setting management\n  snapshot     Block snapshot management\n  user         User management commands\n\nFLAGS:\n  -h, --help                help for rdb\n      --list-sub-commands   List all subcommands\n\nGLOBAL FLAGS:\n  -c, --config string    The path to the config file\n  -D, --debug            Enable debug mode\n  -o, --output string    Output format: json or human, see 'scw help output' for more info (default \"human\")\n  -p, --profile string   The config profile to use\n\nUse \"scw rdb [command] --help\" for more information about a command.\n"
        	            	actual  : "🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲\n🟩🟩🟩 STDOUT️ 🟩🟩🟩️\nThis API allows you to manage your Managed Databases for PostgreSQL and MySQL.\n\nUSAGE:\n  scw rdb <command>\n\nAVAILABLE COMMANDS:\n  acl          Access Control List (ACL) management commands\n  backup       Backup management commands\n  config       Database client configuration snippets\n  database     Database management commands\n  endpoint     Endpoint management\n  engine       Database engines commands\n  instance     Instance management commands\n  log          Instance logs management commands\n  node-type    Node types management commands\n  privilege    User privileges management commands\n  read-replica Read replica management\n  setting      Setting management\n  snapshot     Block snapshot management\n  user         User management commands\n\nFLAGS:\n  -h, --help                help for rdb\n      --list-sub-commands   List all subcommands\n\nGLOBAL FLAGS:\n  -c, --config string    The path to the config file\n  -D, --debug            Enable debug mode\n  -o, --output string    Output format: json or human, see 'scw help output' for more info (default \"human\")\n  -p, --profile string   The config profile to use\n\nUse \"scw rdb [command] --help\" for more information about a command.\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -10,2 +10,3 @@
        	            	   backup       Backup management commands
        	            	+  config       Database client configuration snippets
        	            	   database     Database management commands
        	Test:       	Test_AllUsage/rdb_usage
--- FAIL: Test_AllUsage/rdb_usage (0.01s)
github.com/scaleway/scaleway-cli/v2/cmd/scw::Test_AllUsage
Stack Traces | 3.62s run time
=== RUN   Test_AllUsage
--- FAIL: Test_AllUsage (3.62s)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@github-actions github-actions Bot added the rdb Managed MySQL and PostgreSQL issues, bugs and feature requests label Jun 5, 2026

| Name | | Description |
|------|---|-------------|
| shell | Default: `/bin/bash` | |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you remove that?

func RenderNodeConfig(info *ConnectionInfo) core.RawResult {
lines := []string{privateNetworkComment(info)}

switch info.EngineFamily {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you have gotemplates in a different folder?

@remyleone remyleone marked this pull request as draft June 8, 2026 08:35
@jremy42 jremy42 self-assigned this Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rdb Managed MySQL and PostgreSQL issues, bugs and feature requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for configuring a database with popular SDKs

3 participants