docs: replace broken mcc --version check with --help - #79
Closed
dogfootman wants to merge 1 commit into
Closed
dogfootman wants to merge 1 commit into
dogfootman wants to merge 1 commit into
Conversation
Cobra never registers a --version flag on the root command (src/cmd/root.go has no Version field set), so ./mcc --version always fails with "Error: unknown flag: --version" regardless of GLIBC compatibility - the exact thing this step is meant to test. Verified live. ./mcc --help works and still fails the same way on a genuine GLIBC mismatch (the dynamic loader errors out before Cobra ever parses argv), so it's a safe drop-in replacement for the smoke test's actual purpose. Found while verifying ADMINCLI-TECH-014 after merge; the running-on- instance.md copy came from README.md's pre-existing Step 1-1, fixed both.
Collaborator
Author
|
근본 원인을 고치는 #80이 별도로 열려서 이 PR은 닫습니다. develop에는 지금 ./mcc --version이 그대로 남아 있는데, #80이 머지되면 root.go에 Version 필드가 등록되어 이 커맨드가 실제로 동작하게 됩니다. 즉 문서를 --help로 바꿀 필요 없이 기존 --version 안내가 그대로 맞아지므로, 이 PR의 우회 수정은 불필요해집니다. |
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.
배경
README.mdStep 1-1 "Verify mcc Binary"와docs/running-on-instance.md(ADMINCLI-TECH-014, PR #78)가 둘 다./mcc --version으로 사전 바이너리 동작 확인을 안내하는데, 실제로 실행하면 항상 실패한다.src/cmd/root.go가 CobraVersion필드를 설정하지 않아--version플래그 자체가 등록돼 있지 않다../mcc --version은 GLIBC 호환 여부와 무관하게 항상Error: unknown flag: --version(exit 1)을 낸다 — 라이브로 직접 재현 확인했다. 신규 설치자가 이 단계에서 항상 에러를 보게 되어, 실제 문제(GLIBC 미스매치)와 무관하게 설치가 잘못됐다고 오인하기 쉽다.변경 내용
./mcc --version→./mcc --help로 교체(양쪽 문서 모두).--help는 실제로 동작하고(exit 0, 라이브 확인), 진짜 GLIBC 미스매치가 있을 때는 Cobra가 flag를 파싱하기도 전에 동적 로더가 먼저 죽으므로--help로도 원래 의도한 GLIBC 스모크 테스트 목적은 그대로 유지된다.참고
./mcc --version이 항상 실패하는 것은docs/running-on-instance.md(ADMINCLI-TECH-014, PR #78)가 새로 만든 문제가 아니라 기존README.mdStep 1-1의 기존 버그를 옮겨적으며 그대로 전파한 것 — 이번에 원본까지 같이 고쳤다. 근본 원인(CobraVersion필드 미등록)은 코드 변경이라 이 문서 PR 범위에서 분리해 별도 이슈로 등록 예정.