Skip to content

chore(sources/dataplex)!: Renaming changes across all the files related to Dataplex Toolbox#2958

Closed
anikasharma03 wants to merge 4 commits intogoogleapis:mainfrom
anikasharma03:rename-toolbox
Closed

chore(sources/dataplex)!: Renaming changes across all the files related to Dataplex Toolbox#2958
anikasharma03 wants to merge 4 commits intogoogleapis:mainfrom
anikasharma03:rename-toolbox

Conversation

@anikasharma03
Copy link
Copy Markdown
Contributor

@anikasharma03 anikasharma03 commented Apr 6, 2026

Description

Perform a full rename across files and directories related to the Dataplex Toolbox . This wide-scale refactoring is needed to ensure consistency across the entire codebase and documentation.

Key Changes

File and Directory Renaming:

Moved and renamed all directories and files associated with the dataplex implementation to follow the new naming convention (e.g., in internal/tools/, internal/sources/, and tests/).

Documentation Updates:

Updated references in README.md, integration guides, and other documentation files to reflect the new component naming.

Code Refactoring:

Updated internal references, variable names, and configuration keys to match the new naming standard while maintaining functional compatibility.

Test Updates:

Renamed test files and updated test cases to ensure they correctly validate the renamed components.

PR Checklist

Thank you for opening a Pull Request! Before submitting your PR, there are a
few things you can do to make sure it goes smoothly:

  • Make sure you reviewed
    CONTRIBUTING.md
  • Make sure to open an issue as a
    bug/issue
    before writing your code! That way we can discuss the change, evaluate
    designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)
  • Make sure to add ! if this involve a breaking change

🛠️ Fixes #2956

@anikasharma03 anikasharma03 requested review from a team as code owners April 6, 2026 10:13
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request renames "Dataplex" to "Knowledge Catalog" across the entire repository, including CI configurations, documentation, internal Go packages, and integration tests. The feedback provided focuses on maintaining consistent naming conventions in the documentation and fixing a minor typo in the description of the search aspect types tool.

@Yuan325 Yuan325 changed the title chore(renaming): Renaming changes across all the files related to Dataplex Toolbox chore(sources/dataplex)!: Renaming changes across all the files related to Dataplex Toolbox Apr 6, 2026
Copy link
Copy Markdown
Contributor

@Yuan325 Yuan325 left a comment

Choose a reason for hiding this comment

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

Might be good to update the project env var as well so users are not confused (having to use type as "knowledge-catalog" but env var with the "dataplex" name). Please update it across the docs~

we're missing updates on these files:

  • .github/CODEOWNERS - folder name (we can keep the mdb group as is for now)
  • .github/blunderbuss.yml - update the label name (can keep the group as is)
  • .github/labels.yaml

Will dataplex be updating the official cloud docs page link? e.g. https://cloud.google.com/dataplex? If yes, we might want to update that as well. seems like some of bigquery doc that points towards that too.

Thank you!

anikasharma03 added a commit to anikasharma03/genai-toolbox that referenced this pull request Apr 7, 2026
anikasharma03 added a commit to anikasharma03/genai-toolbox that referenced this pull request Apr 7, 2026
@Yuan325 Yuan325 added release candidate Use label to signal PR should be included in the next release. do not merge Indicates a pull request not ready for merge, due to either quality or timing. labels Apr 7, 2026
Yuan325 pushed a commit to anikasharma03/genai-toolbox that referenced this pull request Apr 9, 2026
Yuan325 pushed a commit to anikasharma03/genai-toolbox that referenced this pull request Apr 9, 2026
@Yuan325
Copy link
Copy Markdown
Contributor

Yuan325 commented Apr 9, 2026

/gcbrun

Copy link
Copy Markdown
Contributor

@Yuan325 Yuan325 left a comment

Choose a reason for hiding this comment

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

Hi @anikasharma03 can we implement this for cases where user uses "dataplex"? With this, we shouldn't have to worrry about breaking change.

We will also need to update the following to change entryName to "knowledge-catalog" if "dataplex" is detected (this will handle all the migration when user uses our migrate subcommand):

entryName, ok := entry.Key.(string)

We can keep all the docs updated to knowledge-catalog, no need to update those, thank you!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we do another copy of this file and keep the types with the "dataplex" name?

@Yuan325
Copy link
Copy Markdown
Contributor

Yuan325 commented Apr 9, 2026

/gcbrun

Comment on lines +70 to +73
if r.Project == "" {
r.Project = os.Getenv("DATAPLEX_PROJECT")
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would prefer not to do this. We try not to grab environment variable from the server code post-unmarshalling. This might be flaky if the server is deployed in a separate environment as well.

Suggested change
if r.Project == "" {
r.Project = os.Getenv("DATAPLEX_PROJECT")
}

// See the License for the specific language governing permissions and
// limitations under the License.

package knowledgecatalog_test
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
package knowledgecatalog_test
package knowledgecatalog

KnowledgeCatalogSearchEntriesToolType = "dataplex-search-entries"
KnowledgeCatalogLookupEntryToolType = "dataplex-lookup-entry"
KnowledgeCatalogSearchAspectTypesToolType = "dataplex-search-aspect-types"
KnowledgeCatalogProject = getProject()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
KnowledgeCatalogProject = getProject()
KnowledgeCatalogProject = os.Getenv("DATAPLEX_PROJECT")

Comment on lines +49 to +57
)

func getProject() string {
p := os.Getenv("KNOWLEDGE_CATALOG_PROJECT")
if p == "" {
p = os.Getenv("DATAPLEX_PROJECT")
}
return p
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
)
func getProject() string {
p := os.Getenv("KNOWLEDGE_CATALOG_PROJECT")
if p == "" {
p = os.Getenv("DATAPLEX_PROJECT")
}
return p
}
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we just keep this file as the exact same as what we have now in dataplex_integration_test.go? I don't think we will need to update anything~

Comment on lines -194 to -195
if len(dataplex_config) <= 0 {
t.Fatalf("unexpected error: could not fetch dataplex prebuilt tools yaml")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

let's keep this~

Comment on lines -78 to +84
expectedKeys := expectedToolSources
var expectedKeys []string
for _, k := range expectedToolSources {
if k != "dataplex" {
expectedKeys = append(expectedKeys, k)
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's keep as is and don't modify this~

cloudsqlmysql_admin_config, _ := prebuiltconfigs.Get("cloud-sql-mysql-admin")
cloudsqlmssql_config, _ := prebuiltconfigs.Get("cloud-sql-mssql")
cloudsqlmssql_admin_config, _ := prebuiltconfigs.Get("cloud-sql-mssql-admin")
dataplex_config, _ := prebuiltconfigs.Get("dataplex")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

let's keep this to make sure we implement the backwards compatibility.

t.Setenv("API_KEY", "your_api_key")

t.Setenv("BIGQUERY_PROJECT", "your_gcp_project_id")
t.Setenv("DATAPLEX_PROJECT", "your_gcp_project_id")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

let's keep this.

Comment on lines -1797 to -1798
name: "dataplex prebuilt tools",
in: dataplex_config,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

let's keep this~ and add a new test case for knowledge catalog.

@Yuan325
Copy link
Copy Markdown
Contributor

Yuan325 commented Apr 10, 2026

Closing since we are no longer renaming the src code.

@Yuan325 Yuan325 closed this Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Indicates a pull request not ready for merge, due to either quality or timing. release candidate Use label to signal PR should be included in the next release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Renaming across files and directories related to Dataplex Toolbox

2 participants