Repository navigation
configtxgen: remove the dead -asOrg flag - #5668
Open
amalsaidov wants to merge 1 commit into
Open
amalsaidov wants to merge 1 commit into
amalsaidov wants to merge 1 commit into
Conversation
The -asOrg flag is declared in cmd/configtxgen/main.go but its value is never read. The only code that consumed it was doOutputAnchorPeersUpdate, which went away together with the -outputAnchorPeersUpdate flag in hyperledger#4809, so -asOrg has had no effect since then. The help text and the command reference still describe it as if it works, which is misleading. Remove the flag, drop the -asOrg argument from the TestConfigTxFlags invocation (it was only there to exercise the flag and the test does not depend on it), and regenerate docs/source/commands/configtxgen.md so check-help-docs stays green. Fixes hyperledger#5602 Signed-off-by: amalsaidov <amalsaidov@users.noreply.github.com>
|
Tick the box to add this pull request to the merge queue (same as
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Type of change
Description
cmd/configtxgen/main.godeclares the-asOrgflag but never reads the value.The only code that used
asOrgwasdoOutputAnchorPeersUpdate, which was removedtogether with the
-outputAnchorPeersUpdateflag in #4809. Since then-asOrghas had no effect: passing it (even with an org that does not exist) changes
nothing and produces no error, while the
--helpoutput and the commandreference still describe it as a working option. That is misleading for anyone
reading the help or the docs.
This removes the flag, so the tool and its documentation match what it actually
does.
Issue #5602 asks whether maintainers prefer to remove the flag (option a) or keep
it with a deprecation warning (option b). I went with removal because the flag is
already dead and the project removed its only consumer outright in #4809 rather
than deprecating it. Scripts that still pass
-asOrgalmost always pass-outputAnchorPeersUpdatenext to it, which already fails on currentmain, sothey are not newly broken by this change. If you would rather keep the flag and
print a deprecation warning instead, I am happy to switch the PR to that.
Additional details
-asOrg=argument fromTestConfigTxFlagsincmd/configtxgen/main_test.go. It was only there to exercise the flag; thetest asserts the output file is written and does not depend on it.
docs/source/commands/configtxgen.mdwithscripts/help_docs.shso
check-help-docsstays green.go build ./cmd/configtxgen/...,go vet ./cmd/configtxgen/...,go test ./cmd/configtxgen/...,gofmt -l, andscripts/help_docs.sh check.All pass.
AI-assisted; directed, reviewed and tested by the author.
Related issues
Fixes #5602