This repository was archived by the owner on Jul 24, 2024. It is now read-only.
cmd,task: disable stray command line args, and log the command in LogArguments#579
Merged
Merged
Conversation
Member
Member
|
/run-integration-tests |
1 similar comment
Member
|
/run-integration-tests |
Collaborator
Author
|
/rebuild |
Member
|
/run-integration-tests Tests fail due to recent change in TiKV which has been fixed by tikv/tikv#8971 |
Collaborator
Author
|
/run-integration-test |
Contributor
|
cherry pick to release-4.0 in PR #588 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
It was confusing that
--checksum falsedoes not actually disable checksum, because--checksumas a boolean flag already means--checksum=true. So--checksum falsebecomes--checksum=true false, and that extrafalsebecomes a stray argument, which is ignored before this PR.LogArgumentsdid not record whether it is a "backup" or "restore" making it a bit hard to determine the data direction when reading logs.What is changed and how it works?
Added
Args: cobra.NoArgsto all leaf commands so using--checksum falsewill result inrather than silently keeping checksum.
Record the command being executed inside
LogArguments.Note that I changed
LogArgumentsfrom usingVisitAlltoVisit. Originally in add log for cmd arguments and duration for checksum #55 it was usingVisitAllto print all args, however it was changed in Don't log secret of s3. #292 to condition onf.Changed, so perhaps let's just useVisitdirectly 🙃.Check List
Tests
Code changes
Side effects
Related changes
Release Note
--checksum falsein command line, which did not disable checksum. The correct usage always include the=sign:--checksum=false.