Add analytics-cli upload troubleshooting and update install path#170
Add analytics-cli upload troubleshooting and update install path#170samgutentag wants to merge 1 commit into
Conversation
…ias 403, validate warnings
4f3ae41 to
34de45a
Compare
|
Code verification (2026-06-01): 12 confirmed / 0 contradicted / 1 ambiguous / 0 unverifiable
Nothing contradicts source. Every flag, subcommand, env var, and error/warning string in the PR matches the analytics-cli code. One claim is ambiguous and worth a wording check before publishing: the "No tests found on upload" BEP guidance. The recommendation (produce a binary BEP via Source #1 — upload / test / validate subcommands and their semantics (confirmed)File: enum Commands {
/// Run a test command and upload results to Trunk Flaky Tests. Automatically detects and reports flaky tests.
Test(TestArgs),
/// Upload test results to Trunk Flaky Tests. Use this when you've already run tests and have result files.
Upload(UploadArgs),
/// Validate test report files for compatibility with Trunk Flaky Tests. Runs locally without uploading data.
Validate(ValidateArgs),Reasoning: All three subcommands the PR documents exist. The clap doc comments confirm the PR's Info callout: Source #2 — upload flags (--bazel-bep-path, --junit-paths, --org-url-slug, --token, --repo-url, --test-process-exit-code) (confirmed)File: pub junit_paths: Vec<String>, // --junit-paths (comma-separated globs)
pub bazel_bep_path: Option<String>, // --bazel-bep-path
pub org_url_slug: String, // --org-url-slug (env TRUNK_ORG_URL_SLUG)
pub token: Option<String>, // --token (env TRUNK_API_TOKEN)
pub repo_url: Option<String>, // --repo-url (env TRUNK_REPO_URL)
pub test_process_exit_code: Option<i32>, // --test-process-exit-code (line 221)Reasoning: Every flag used in the PR's code blocks is a real clap Source #3 — TRUNK_API_TOKEN env var (confirmed)File: pub const TRUNK_API_TOKEN_ENV: &str = "TRUNK_API_TOKEN";Reasoning: The PR uses Source #4 — "No tests were found" message (confirmed)File: "⚠️ No tests were found in the provided test results",Reasoning: The accordion title quotes "No tests were found" and the prose says "no tests found." The real message is Source #5 — validate "name too short" / "classname too short" warnings (confirmed)File: #[error("test case classname too short")]
TestCaseClassnameTooShort(String),
...
#[error("test case name too short")]
TestCaseNameTooShort(String),Reasoning: Both warnings the PR documents exist verbatim as validation issues. They live in the junit validator (the Source #6 — SSH host-alias remote causes 403 (confirmed)File: let re2 = Regex::new(r"^([^/]*?@)([^/]*):(.+)/([^/]+)")?;
...
let domain = caps.get(2).map(|m| m.as_str()).unwrap_or(""); // host = text between @ and :
...
let host = parts.0.trim().to_string();Reasoning: For an SCP-style remote ( Source #7 — binary BEP "more reliable than JSON" (ambiguous)File: pub fn fall_back_to_binary_parse(
json_parse_result: anyhow::Result<BepParseResult>,
bazel_bep_path: &String,
) -> anyhow::Result<BepParseResult> {
let mut binary_parser = BazelBepBinParser::new(bazel_bep_path);
match json_parse_result {
anyhow::Result::Ok(result) if !result.errors.is_empty() => {
let binary_result = binary_parser.parse(); // only on JSON errors
...
}
anyhow::Result::Err(json_error) => {
let binary_result = binary_parser.parse(); // only on JSON failure
...
}
just_json => just_json, // JSON wins when clean
}
}Reasoning: The |
Reopens the work from #54, which was merged then reverted on 2026-06-01 (it was not ready to merge). Content is unchanged from the original branch; needs content verification against source before re-merging. Reverted merge commit removed from main.