Skip to content

Conversation

@kadai0308
Copy link
Contributor

What this PR does

refactor sqldef toolRegistry download binary

Which issue(s) this PR fixes

Fixes #33 (comment)

@kadai0308 kadai0308 requested a review from a team as a code owner August 13, 2025 04:51
// Currently, we create them every time the stage is executed beucause we can't pass input.Client.toolRegistry to the plugin when starting the plugin.
toolRegistry := toolRegistryPkg.NewRegistry(input.Client.ToolRegistry())

// map for prevent repeatedly download sqldef
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I decided to keep it simple, just download the binary every time.

Comment on lines +87 to +88
// For MySQL, verify the path contains the expected binary name
if tt.dbType == config.DBTypeMySQL {
Copy link
Member

Choose a reason for hiding this comment

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

add a TODO comment to avoid missing when supporting other types.

lp.Errorf("Failed while getting Sqldef tool (%v)", err)
return sdk.StageStatusFailure
}
lp.Info(fmt.Sprintf("Sqldef binary downloaded: %s", sqlDefPath))
Copy link
Member

Choose a reason for hiding this comment

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

the path is not necessary to show on UI

@kadai0308 kadai0308 changed the title refactor(sqldef) refactor sqldef toolRegistry download binary [Sqldef Pluging] refactor(sqldef) refactor sqldef toolRegistry download binary Aug 25, 2025
@t-kikuc t-kikuc merged commit bed3b32 into main Aug 25, 2025
17 checks passed
@t-kikuc t-kikuc deleted the refactor/sqldef-toolRegistry-download-binary branch August 25, 2025 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants