CC-6178: Modify SR CLI grammar - #278
Conversation
Codecov Report
@@ Coverage Diff @@
## lint_cli #278 +/- ##
============================================
- Coverage 43.05% 42.88% -0.17%
============================================
Files 63 62 -1
Lines 4775 4689 -86
============================================
- Hits 2056 2011 -45
+ Misses 2457 2422 -35
+ Partials 262 256 -6
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #278 +/- ##
==========================================
+ Coverage 41.02% 43.36% +2.33%
==========================================
Files 62 62
Lines 4739 4707 -32
==========================================
+ Hits 1944 2041 +97
+ Misses 2550 2400 -150
- Partials 245 266 +21
Continue to review full report at Codecov.
|
2d95308 to
68519f3
Compare
c7431ee to
8ea6146
Compare
c645dc0 to
9189e3b
Compare
Cody A. Ray (codyaray)
left a comment
There was a problem hiding this comment.
looking pretty good. mostly small stuff
| Key string | ||
| Description string | ||
| UserId int32 | ||
| apiKeys, err = c.client.List(context.Background(), &authv1.ApiKey{AccountId: accId, LogicalClusters: []*authv1.ApiKey_Cluster{{Id: clusterId, Type: resourceType}}}) |
There was a problem hiding this comment.
i was reviewing this code with Chris Sreesangkom (@csreesan) the other day and realized that this API call probably doesn't actually work with the real API server today. Can you confirm that you tested this manually?
this isn't sending the cluster_id field to the API correctly, i believe
There was a problem hiding this comment.
I did manually test it.. api-key list prints something like
dist/ccloud/ccloud_darwin_amd64/ccloud api-key list --resource lsrc-dgq91
Key | Owner | Description
+--------------------+-------+-------------+
- DULRGWWC46UVAUMI | 10875 |
In the unit test, we cover if cluster_id is being sent to the API. Should I be checking elsewhere?
There was a problem hiding this comment.
Interesting. I don't understand how/where this is being sent from then. Chris just merged this, which I think fixes this issue: https://github.com/confluentinc/ccloud-sdk-go/pull/58
But if the issue doesn't actually exist... ?
There was a problem hiding this comment.
I do remember using List a week ago before I pushed the initial changes. Not sure what could've happened in between 🤔
There was a problem hiding this comment.
but list didn't use to filter by clusterId, right?
that's what Chris Sreesangkom (@csreesan) is adding. Its in PR now though, should be done soon.
There was a problem hiding this comment.
Oh, right. I see what you mean! Yeah it didn't
b605699 to
a00f6a4
Compare
| ID: cluster.Id, | ||
| URL: cluster.Endpoint, | ||
| } | ||
| _ = printer.RenderTableOut(cluster, []string{"Id", "Endpoint"}, map[string]string{"ID": "Cluster ID", "URL": "Endpoint URL"}, os.Stdout) |
There was a problem hiding this comment.
you can move these to the top of the file and call them enableLabels and enableRenames so you don't have to duplicate them twice
There was a problem hiding this comment.
This looks good to me now!
I didn't go through the full checklist of UX changes we discussed, but the code it looks like its doing all the right things.
I think as long as you update to ccloud-sdk-go v0.0.12 and do a full end to end test again, I'm happy! :)
Pass AccountID from environment to create API key Mark current context API key in list of API keys Revert changes to API key delete Remove extra import WIP API key tests WIP Refactored Fix tests Refactor and cleanup Pass account ID to retrieve SR correctly update docs description Error handling and Cleanup fmt Add parameter for flag in GetKafkaConfig Address comments Remove unnecessary err check Modify integration test lint Locl commit Clean up Remove unit test (temp) Fix tests Fix tests i WIP Remove unit test . lint Modify resource scoped commands Add unit test Cleanup Integration test Clean fix WIP WIP Integration test clean wip Fix IT Clean up Fix fixture i nit Error test case Fixture spacing Remove ID check address comments Rebase on master Address comments Mock tests Improve unit test validation
# This is the 1st commit message: Add subject commands # This is the commit message #2: Docs Unhide SR make deps
Address comments Update comment Mark geo flag required
1f20665 to
b6e391e
Compare
|
Thanks Cody A. Ray (@codyaray) for the review! :) Updated ccloud sdk and ran the tests. |
fmt Fmt
b6e391e to
43f330e
Compare
This PR changes command usage grammar to
schema-registry cluster enableschema-registry cluster describeschema-registry cluster update --mode=READWRITEschema-registry cluster update --compatibility=BACKWARDschema-registry subject describe subjectnameschema-registry subject update subjectname --mode=READWRITEschema-registry subject update subjectname --compatibility=BACKWARDThis PR also contains commits from #258 for
api-key create --resource=resource-idapi-key list --resource=resource-idJIRA issue: https://confluentinc.atlassian.net/browse/CC-6178
1-pager: https://confluentinc.atlassian.net/wiki/spaces/PM/pages/878445212/1-pager+CLI+CCloud+Schema+Registry+support
Slack conversation: https://confluent.slack.com/archives/C9Y6NAM6X/p1567115005035600