Skip to content

Wire comparator CI to call run-comparator.sh and attach files to email#1463

Open
sreekanth-db wants to merge 5 commits into
comparator-v2from
comparator-v2-ci-workflow
Open

Wire comparator CI to call run-comparator.sh and attach files to email#1463
sreekanth-db wants to merge 5 commits into
comparator-v2from
comparator-v2-ci-workflow

Conversation

@sreekanth-db
Copy link
Copy Markdown
Collaborator

Summary

  • Replaces the inline mvn invocation with run-comparator.sh, so CI and local dev share one execution path.
  • Updates run-comparator.sh to read all config from env vars (with v6-derived defaults baked in: getFunctions skip, threads=50, full FILTER_JSON with documented exclusions), validate required env, and exit with mvn's actual status.
  • Switches the email step from inline HTML body (which depended on the missing bin/format-comparator-email.sh) to plain-text + attachments (report TXT + CSV + log).
  • Adds workflow_dispatch inputs (suites, metadata_methods, connection_config) with restrictive defaults for fast manual testing; weekly cron is unaffected.
  • Internal-runner ready: includes the JFrog OIDC token exchange + ~/.m2/settings.xml configuration block from main's workflow.

Test plan

  • actionlint clean
  • Bash output-detection step exercised across 4 scenarios
  • Full stub run via act succeeds end-to-end (checkout → setup-java → fake comparator → locate-files → skip-email-under-act → artifact zip with all 3 files)
  • Manual workflow_dispatch on this branch with restricted defaults + EMAIL_RECIPIENTS set to me
  • Verify real email + attachments arrive

NO_CHANGELOG=true

This pull request and its description were written by Isaac.

Co-authored-by: Isaac
Signed-off-by: Sreekanth Vadigi <sreekanth.vadigi@databricks.com>
@sreekanth-db sreekanth-db requested a review from a team as a code owner May 21, 2026 13:01
Restrictive defaults (DATABASE_METADATA / getCatalogs / DEFAULT_PARAMS)
would silently scope down every manual run, diverging from cron behavior.
Empty defaults align manual dispatch with the weekly schedule; users can
still type restrictive values into the dispatch form when they want a
quick run.

Co-authored-by: Isaac
Signed-off-by: Sreekanth Vadigi <sreekanth.vadigi@databricks.com>
CI runners have no global git user.name/user.email, so the
`git merge --no-ff` step inside the script fails with "empty
ident name not allowed". --local scope keeps this confined to
the temp clone; caller's global config is untouched.

Co-authored-by: Isaac
Signed-off-by: Sreekanth Vadigi <sreekanth.vadigi@databricks.com>
`ref: comparator-v2` was hardcoded, so a workflow_dispatch on any
PR branch would still pull the script from comparator-v2 (the stale
base copy), bypassing changes under review. Using `github.ref`
resolves to the PR branch for PR dispatches and to comparator-v2
for base-branch dispatches.

Co-authored-by: Isaac
Signed-off-by: Sreekanth Vadigi <sreekanth.vadigi@databricks.com>
If this workflow ever moves to main to enable cron, schedule events
fire with github.ref=refs/heads/main, which would checkout main and
miss the comparator framework. The conditional ensures cron always
tests comparator-v2 while preserving PR-branch testing via dispatch.

Co-authored-by: Isaac
Signed-off-by: Sreekanth Vadigi <sreekanth.vadigi@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant