Skip to content

Conversation

cveticm
Copy link
Collaborator

@cveticm cveticm commented Aug 25, 2025

Proposed changes

PR (2/2) of #4158

For the two plugins effected by the refactor work of the Service Accounts Epic, we need to check if the plugins are a version which supports the new config version.
To address this, I have added a check when running a plugin command which:

  1. Is the plugin one of the plugins which require the check
  2. If so, is it less than minimum version
  3. If so, return error

Plugin min versions

These versions are the expected versions we will implement support for the refactor work.

Plugin Version
atlas-cli-plugin-kubernetes v1.1.7
atlas-cli-plugin-gsa v0.0.2

plugin refactor work tickets:

Example error:

> bin/atlas kubernetes config generate
Error: plugin mongodb/atlas-cli-plugin-kubernetes version v1.1.5 is below minimum required version v1.1.7 for this version of AtlasCLI.
Please update the plugin using 'atlas plugin update atlas-cli-plugin-kubernetes'

@cveticm cveticm marked this pull request as ready for review August 25, 2025 16:47
@cveticm cveticm requested a review from a team as a code owner August 25, 2025 16:47
assert.Equal(t, plugin.Commands[0].Aliases, manifest.Commands["testCommand"].Aliases)
}

func TestPluginVerion(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
func TestPluginVerion(t *testing.T) {
func TestPluginVersion(t *testing.T) {

return
}
}
// Disabling this plugin test until atlas-cli-plugin-kubernetes v1.1.7 is released. Will be re-enabled by CLOUDP-340658
Copy link
Collaborator

Choose a reason for hiding this comment

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

[q] should we keep the plugin test running and comment the validation instead until we release?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Makes sense, modified this ticket which is to be done after changes to k8s plugin to reflect the new approach: CLOUDP-340658

@cveticm cveticm marked this pull request as draft August 26, 2025 16:07
}

func (p *Plugin) Run(cmd *cobra.Command, args []string) error {
// TODO: uncomment after plugin release
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

to be done by CLOUDP-340658

@cveticm cveticm marked this pull request as ready for review September 1, 2025 08:36
@cveticm cveticm merged commit 648ab7c into SA_refactor_feature_branch Sep 1, 2025
23 checks passed
@cveticm cveticm deleted the CLOUDP-339293_plugin_version_check branch September 1, 2025 09:23
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.

2 participants