Skip to content

Conversation

@cveticm
Copy link
Collaborator

@cveticm cveticm commented Jan 9, 2025

Proposed changes

Removes kubernetes commands operator install, config generate, config apply.
All methods only used by these commands have also been removed.

Docs and mocks have been regenerated to reflect these removals.

Evergreen tasks remain and will be altered as necessary during future work.

Jira ticket: CLOUDP-293144

Checklist

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works
  • I have added any necessary documentation in document requirements section listed in CONTRIBUTING.md (if appropriate)
  • I have addressed the @mongodb/docs-cloud-team comments (if appropriate)
  • I have updated test/README.md (if an e2e test has been added)
  • I have run make fmt and formatted my code

@cveticm cveticm changed the base branch from master to CLOUDP-260713_k8s_plugin January 9, 2025 17:37
@github-actions github-actions bot removed the atlascli label Jan 9, 2025
echo "Error: Coverage difference (${{ steps.compare.outputs.diff }}%) is negative"
fi
fuzz-tests:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removing fuzz test as all fuzz tests are tests for k8s commands

* :ref:`atlas-events` - Manage events for your organization or project.
* :ref:`atlas-federatedAuthentication` - Manage Atlas Federated Authentication.
* :ref:`atlas-integrations` - Configure third-party integrations for your Atlas project.
* :ref:`atlas-kubernetes` - Manage Kubernetes resources.
Copy link
Collaborator Author

@cveticm cveticm Jan 9, 2025

Choose a reason for hiding this comment

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

Noting that removal of k8s commands results in the removal of mention of the command in docs.

Would be interested to hear opinions on this behaviour.
Should k8s, being a first class plugin, not be removed like this (and thus also removed in Docs AtlasCLI)?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it will be removed from this file and then added back via copybara integration, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think this would be the case since the copybara logic is to replace all doc files in AtlasCLI to DocAtlasCLI. Theres no other modifications applied to files. On k8s plugin side, the only docs it holds are k8s docs and so won't effect atlas.txt.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe the copybara workflow in AtlasCLI could modify atlas.txt by including a core.replace transformation which replaces

* :ref:`atlas-integrations` - Configure third-party integrations for your Atlas project.

with

* :ref:`atlas-integrations` - Configure third-party integrations for your Atlas project.
* :ref:`atlas-kubernetes` - Manage Kubernetes resources.

Or perhaps the gen-docs logic could install all first class plugins to find and add their root command (in this case kubernetes) in the atlas.txt doc.

Copy link
Collaborator

Choose a reason for hiding this comment

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

2 good options, I suggest creating a JIRA ticke tin the epic so that we don't miss this update!

"go.mongodb.org/atlas": "apix-2",
"go.mongodb.org/atlas-sdk/v20241113004": "apix-2",
"go.mongodb.org/atlas-sdk/v20240530005": "apix-2",
"go.mongodb.org/atlas-sdk/v20241113001": "apix-2",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removing library owner entries for libraries which have been removed

logoutCmd,
whoCmd,
registerCmd,
kubernetes.Builder(),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removes k8s from CLI builder.

const (
maxRetryAttempts = 5
)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed methods and variables no longer in use after removal of k8s commands

err := cmd.Run()
return o.String(), e.String(), err
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed methods no longer in use after removal of k8s commands

@cveticm cveticm marked this pull request as ready for review January 9, 2025 18:17
@cveticm cveticm requested review from a team as code owners January 9, 2025 18:17
@github-actions github-actions bot added the need-doc-review Improvements or additions to documentation, will be reviewed by the docs team label Jan 9, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2025

APIx Bot :bowtie:: a message has been sent to Docs Slack channel 🚀.

@apix-bot
Copy link
Contributor

apix-bot bot commented Jan 9, 2025

Coverage Report 📉

Branch Commit Coverage
CLOUDP-260713_k8s_plugin 2cc3804 %
CLOUDP-293144_remove_k8s_commands 6fc5143 37.0%
Difference %

Copy link
Collaborator

@blva blva left a comment

Choose a reason for hiding this comment

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

LGTM - Removal in the feature branch only.

Notes:

  1. no need for docs review at this point
  2. would be good to get one more LGTM from APIx
  3. would be good to get one LGTM from K8s - K8s, can you confirm this is all the code you expect to live in the plugin, is there any other kubernetes functionality we are missing? (whatever we're not deleting)

@RafaelBroseghini
Copy link

how will k8s resource(s) importing work going forward?

@blva
Copy link
Collaborator

blva commented Jan 9, 2025

how will k8s resource(s) importing work going forward?

hi @RafaelBroseghini , the code is being moved to a separate code base in https://github.com/mongodb/atlas-cli-plugin-kubernetes and will be used as a 1st class plugin. Users will have the same experience as of today, the only difference is that the plugin will have its own binary and release cadence.

@cveticm cveticm removed the request for review from a team January 10, 2025 08:47
"google.golang.org/protobuf": "apix-2",
"golang.org/x/mod": "apix-2",
"gopkg.in/yaml.v3": "apix-2",
"github.com/mongodb/mongodb-atlas-kubernetes/v2": "atlas_kubernetes_team",
Copy link
Collaborator

Choose a reason for hiding this comment

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

We don’t remove commands lightly. Our standard process involves first deprecating the commands and displaying a deprecation warning in stderr for a period determined by the PM. Once the deprecation period ends, we remove the command in follow up release. Could you clarify why this process is not being followed in this case?

Copy link
Collaborator Author

@cveticm cveticm Jan 10, 2025

Choose a reason for hiding this comment

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

Since the release in which these commands are removed from the AtlasCLI repo directly follows the release of the k8s plugin, which contains all of the code that is being removed in this PR, the UX experience will not change at all. The code has just been migrated. Thus, I don't think a deprecation period is required since commands will still be available to customers with same functionality as now.

Copy link
Collaborator

@blva blva Jan 10, 2025

Choose a reason for hiding this comment

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

yep, as per scope we proposed to replace them

Copy link
Collaborator

@andreaangiolillo andreaangiolillo Jan 10, 2025

Choose a reason for hiding this comment

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

the UX experience will not change at all.

I don't agree with this, customers running the CLI in a closed network environment (without access to the GH repo) will start getting an error which is a breaking change

yep, as per scope we proposed to replace them

when we are deprecating a command we are removing it from the doc. The fact that we said replace does not prevent us from deprecating the command first and then remove it in a separate release

Copy link
Collaborator

Choose a reason for hiding this comment

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

good point, moving this to slack

@blva blva merged commit 6870e66 into CLOUDP-260713_k8s_plugin Jan 10, 2025
17 of 18 checks passed
@blva blva deleted the CLOUDP-293144_remove_k8s_commands branch January 10, 2025 11:31
cveticm added a commit that referenced this pull request Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

need-doc-review Improvements or additions to documentation, will be reviewed by the docs team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants