Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CLI logging output to be cluster type aware: #8231

Merged
merged 4 commits into from
Jul 13, 2024

Conversation

jacobweinstock
Copy link
Member

@jacobweinstock jacobweinstock commented May 30, 2024

Issue #, if available:

Description of changes:
This removes the confusion in the CLI logs when creating a management cluster as the log lines say it's creating a workload cluster. This is a leak of implementation details about how clusters are created. While CAPI calls the initial cluster a workload cluster and then pivots its control plane objects to make it a permanent management cluster this is an implementation detail we shouldn't expose to users.

Testing (if applicable):

Documentation added/planned (if applicable):

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@eks-distro-bot eks-distro-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 30, 2024
We have been leaking implementation details around
how we create clusters. While CAPI calls the initial
cluster a workload cluster and then pivots its control plane
objects to make it a management cluster this is an
implementation detail that we shouldn't be exposing to
users.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
Copy link

codecov bot commented May 31, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 73.42%. Comparing base (a2a1992) to head (eec468d).
Report is 122 commits behind head on main.

Files Patch % Lines
cmd/eksctl-anywhere/cmd/createcluster.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8231   +/-   ##
=======================================
  Coverage   73.42%   73.42%           
=======================================
  Files         577      577           
  Lines       35944    35944           
=======================================
  Hits        26391    26391           
  Misses       7884     7884           
  Partials     1669     1669           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
This func is only for management cluster anyway,
so there is no need to check if its a management cluster
or not.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
@jacobweinstock
Copy link
Member Author

/test eks-anywhere-presubmit

@jacobweinstock
Copy link
Member Author

/approve

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jacobweinstock

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@@ -47,7 +47,7 @@ func (s *installEksaComponentsOnWorkloadTask) Run(ctx context.Context, commandCo
commandContext.ClusterSpec.Cluster.ClearTinkerbellIPAnnotation()
}

logger.Info("Installing EKS-A custom components on workload cluster")
logger.Info("Installing EKS-A custom components on the management cluster")
Copy link
Member

Choose a reason for hiding this comment

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

nit: initially the workload cluster in all these places meant wrt the kind cluster being the mgmt cluster vs the workload cluster getting created by the kind cluster.

Looks fine to me if we want to make this change tho since by this time we already would've moved the capi components.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't believe a new customer coming to eksa for the first time is going to grasp this implementation detail. They have asked for a management cluster and are now seeing logs about a workload cluster.

Copy link
Member Author

@jacobweinstock jacobweinstock Jun 28, 2024

Choose a reason for hiding this comment

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

Think of the cognitive load we're requiring from a customers just to understand this one log line. They have to understand quite a lot of implementation details of how we create clusters. I believe that's an unreasonable expectation.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah it looks fine to me since for the customer can understand this better. When we use this statement for debugging the engineer can probably figure out which cluster we are talking about. LGTM!

@eks-distro-bot eks-distro-bot merged commit f0f2a54 into aws:main Jul 13, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants