fix: allow converting string literal block with list#3050
Conversation
4cf9718 to
2a1728c
Compare
There was a problem hiding this comment.
Code Review
This pull request updates the configuration conversion logic to preserve top-level comments and empty lines, while transitioning terminology from 'v1/v2' to 'nested/flat' formats. It also enables literal style for multiline strings in YAML encoding. Review feedback suggests renaming variables for consistency, adding the missing 'authSources' key to the migration list, correcting comment numbering, and updating related informational logs that have become inaccurate due to these changes.
I am having trouble creating individual review comments. Click here to see my feedback.
cmd/internal/config.go (147)
To align with the PR's goal of moving away from "v1/v2" terminology, this variable should be renamed (e.g., to nestedFormatKeys). Additionally, authSources is missing from this list, which prevents the migration tool from detecting and converting documents that use the deprecated authSources key, even though it is explicitly handled in the switch statement at line 170.
nestedFormatKeys := []string{"sources", "authSources", "authServices", "embeddingModels", "tools", "toolsets", "prompts"}
cmd/internal/config.go (126)
The comment starts with "2.", but there is no preceding "1." step in this function. It is better to use a descriptive comment without numbering to avoid confusion.
// Manually copy top-level comments and empty lines from the source
cmd/internal/config.go (163)
Update the variable name to match the suggested rename at line 147.
if slices.Contains(nestedFormatKeys, key) {
cmd/internal/migrate/command.go (130)
While updating this message, please note that the informational log at line 68 ("any comments... will not be preserved") is now incorrect because of the changes in ConvertConfig that preserve top-level comments. Since line 68 is outside the current diff hunks, it should be updated in a separate commit or by expanding the PR scope to ensure users are not given misleading information.
efe5e17 to
06b40d0
Compare
|
🧨 Preview deployments removed. Cloudflare Pages environments for |
🤖 I have created a release *beep* *boop* --- ## [1.2.0](v1.1.0...v1.2.0) (2026-05-07) ### Features * Add support for HTTPS/TLS listener ([#3126](#3126)) ([8bc385d](8bc385d)) * **source/bigquery:** Add maximumBytesBilled source config ([#2724](#2724)) ([42f2d07](42f2d07)) * **source/cloud-storage:** Add bucket and object management tools ([#3129](#3129)) ([8de9bcf](8de9bcf)) * **source/cloud-storage:** Add Cloud Storage source with list_objects and read_object tools ([#3081](#3081)) ([da27b37](da27b37)) * **source/cloud-storage:** Add write/copy/move/delete object tools ([#3139](#3139)) ([b225fc4](b225fc4)) * **tools/knowledge-catalog:** Search Data Quality Scans ([#2444](#2444)) ([1c63551](1c63551)) ### Bug Fixes * Allow converting string literal block with list ([#3050](#3050)) ([36ab2a9](36ab2a9)), closes [#3023](#3023) * **mcp:** Implement router-level logger injection for MCP auth ([#3067](#3067)) ([ccc7cf5](ccc7cf5)) * Prevent test.db from being created during unit tests ([#3042](#3042)) ([d10d2ca](d10d2ca)) * Remove hardcoded * allowed origin for sse ([#3054](#3054)) ([c4c7bd9](c4c7bd9)) * **sources/postgres:** Apply URL encoding to query string params ([#3020](#3020)) ([6b860f4](6b860f4)) * **tool/looker-conversational-analytics:** OAuth token in GDA payload fix ([#3058](#3058)) ([6632d96](6632d96)) * **tools/bigquery-execute-sql:** Avoid surfacing invalid queries as MCP 500s ([#3056](#3056)) ([7ed92c8](7ed92c8)) * **tools/looker:** Fix OAuth for Converational Analytics ([#3044](#3044)) ([f9e3e55](f9e3e55)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [1.2.0](googleapis/mcp-toolbox@v1.1.0...v1.2.0) (2026-05-07) ### Features * Add support for HTTPS/TLS listener ([googleapis#3126](googleapis#3126)) ([8bc385d](googleapis@8bc385d)) * **source/bigquery:** Add maximumBytesBilled source config ([googleapis#2724](googleapis#2724)) ([42f2d07](googleapis@42f2d07)) * **source/cloud-storage:** Add bucket and object management tools ([googleapis#3129](googleapis#3129)) ([8de9bcf](googleapis@8de9bcf)) * **source/cloud-storage:** Add Cloud Storage source with list_objects and read_object tools ([googleapis#3081](googleapis#3081)) ([da27b37](googleapis@da27b37)) * **source/cloud-storage:** Add write/copy/move/delete object tools ([googleapis#3139](googleapis#3139)) ([b225fc4](googleapis@b225fc4)) * **tools/knowledge-catalog:** Search Data Quality Scans ([googleapis#2444](googleapis#2444)) ([1c63551](googleapis@1c63551)) ### Bug Fixes * Allow converting string literal block with list ([googleapis#3050](googleapis#3050)) ([36ab2a9](googleapis@36ab2a9)), closes [googleapis#3023](googleapis#3023) * **mcp:** Implement router-level logger injection for MCP auth ([googleapis#3067](googleapis#3067)) ([ccc7cf5](googleapis@ccc7cf5)) * Prevent test.db from being created during unit tests ([googleapis#3042](googleapis#3042)) ([d10d2ca](googleapis@d10d2ca)) * Remove hardcoded * allowed origin for sse ([googleapis#3054](googleapis#3054)) ([c4c7bd9](googleapis@c4c7bd9)) * **sources/postgres:** Apply URL encoding to query string params ([googleapis#3020](googleapis#3020)) ([6b860f4](googleapis@6b860f4)) * **tool/looker-conversational-analytics:** OAuth token in GDA payload fix ([googleapis#3058](googleapis#3058)) ([6632d96](googleapis@6632d96)) * **tools/bigquery-execute-sql:** Avoid surfacing invalid queries as MCP 500s ([googleapis#3056](googleapis#3056)) ([7ed92c8](googleapis@7ed92c8)) * **tools/looker:** Fix OAuth for Converational Analytics ([googleapis#3044](googleapis#3044)) ([f9e3e55](googleapis@f9e3e55)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <[email protected]>
This PR updates the following:
Fixes #3023