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

CLI-980 Refactor confluent iam acl parameter names to match those of underlying API #945

Merged
merged 1 commit into from
Jul 28, 2021

Conversation

MuweiHe
Copy link
Contributor

@MuweiHe MuweiHe commented Jul 27, 2021

Checklist

  1. [CRUCIAL] Is the change for CP or CCloud functionalities that are already live in prod?

    • yes: ok
  2. Did you add/update any commands that accept secrets as args/flags?

    • no: ok

What

Rename list fields in confluent iam acl commands from {"KafkaClusterId", "Principal", "Permission", "Operation", "Host", "Resource", "Name", "Type"} to {"KafkaClusterId", "Principal", "Permission", "Operation", "Host", "ResourceType", "ResourceName", "PatternType"}

References

Test&Review

@MuweiHe MuweiHe requested a review from a team as a code owner July 27, 2021 18:19
@MuweiHe MuweiHe changed the base branch from master to 2.0 July 27, 2021 18:21
Copy link
Member

@brianstrauch brianstrauch left a comment

Choose a reason for hiding this comment

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

This is an issue that existed before this PR (see KafkaClusterId), but we're using upper camel case for the "human" output... do we really want to be doing this?

@MuweiHe MuweiHe requested a review from DABH July 27, 2021 18:49
@DABH
Copy link
Contributor

DABH commented Jul 28, 2021

This is an issue that existed before this PR (see KafkaClusterId), but we're using upper camel case for the "human" output... do we really want to be doing this?

@brianstrauch What are our other options? KafkaClusterID? Wonder what is best practice / pros and cons? Could check with Ethan?

Copy link
Contributor

@DABH DABH left a comment

Choose a reason for hiding this comment

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

This seems right afaict

@MuweiHe MuweiHe merged commit d44018c into 2.0 Jul 28, 2021
@MuweiHe MuweiHe deleted the CLI-980 branch July 28, 2021 16:39
@brianstrauch
Copy link
Member

@brianstrauch What are our other options? KafkaClusterID? Wonder what is best practice / pros and cons? Could check with Ethan?

@DABH @MuweiHe A ListOutputWriter takes three slices of strings, the second of which is called humanLabels, which in this case should look like the following (should look like titles instead of using UpperCamelCase) because they're used for the titles of the tables:

var humanFields = []string{"Kafka Cluster ID", "Principal", "Permission", "Operation", "Host", "Resource Type", "Resource Name", "Pattern Type"}

It looks like the regular fields variable is being used for the listLabels and humanLabels

outputWriter, err := output.NewListOutputWriter(cmd, fields, fields, structuredRenames)

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.

None yet

3 participants