-
Notifications
You must be signed in to change notification settings - Fork 447
Add stolonctl clusterdata write sub command #578
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
Conversation
e2da564
to
3790a15
Compare
@dineshba Thanks for the PR! Let me know when it's ready for review. |
It's ready for review @sgotti. Please have a look and provide your feedbacks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dineshba Did an initial review.
In addition you should manage dependencies using go.mod (please use latest go1.11.2) and also vendor them so they could work also with go 1.10 (go mod vendor
).
3790a15
to
93bd141
Compare
Hi @sgotti, Added dependencies in go.mod also (used latest go1.11.2). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fetched your PR. Some notes:
-
Please use latest go1.11.2 to generate go.mod and go.sum since previous versions had bugs generating the wrong sum.
-
Semaphore k8s test is failing because the
clusterdata
command has changed. These lines:
stolon/scripts/semaphore-k8s.sh
Line 64 in 2536d50
OUT=$(./bin/stolonctl --cluster-name kube-stolon --store-backend kubernetes --kube-resource-kind configmap clusterdata | jq .cluster.status.phase)
stolon/scripts/semaphore-k8s.sh
Line 77 in 2536d50
./bin/stolonctl --cluster-name kube-stolon --store-backend kubernetes --kube-resource-kind configmap clusterdata | jq .
require an additional read
argument.
-
The commands doc should be updated to reflect this behavior and the generated doc should be regenerated (calling
scripts/gen_commands_doc.sh
and committing changes). -
Add a breaking change note to the CHANGELOG.md describing this
breaking
change in thestolonctl clusterdata
command since this will break some current user workflow and needs to be documented. -
Let's add a
go generate
comments to generate the mocks (see inline comment). So we know which source is mocked and they can be created/updated with a simplego generate ./...
. Of course they should be committed like you did, just use go generate and related comments so everyone knows how to generate them. In future a script could be added to automate/test this.
265d168
to
349959b
Compare
Hi @sgotti
Please have a look and provide your inputs. On side note, as we are having 9 commits as of now for this PR, shall we squash commits and make it one or two ? |
0554638
to
234f59e
Compare
@sgotti If possible, please have a look at this PR. We wanted this feature badly in our production. |
@dineshba PR looks good to me. Please also add a BIG warning in the |
405e333
to
9a71214
Compare
353deab
to
a06da63
Compare
a06da63
to
54470a6
Compare
Hi @sgotti builds were failing for |
@dineshba Sorry for the delay. LGTM. Merging. |
This PR fixes #577
This PR will:
write can read cluser data from stdin as well from file. In this way we can combine both read and write operations using
|