Skip to content

SEP-1840: Expose pt-table-checksum --defaults-file as a Checksums form field - #1363

Merged
olucasandrade merged 3 commits into
mainfrom
SEP-1840
Aug 19, 2026
Merged

olucasandrade merged 3 commits into
mainfrom
SEP-1840

Conversation

@olucasandrade

@olucasandrade olucasandrade commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add an optional defaults_file field on the Checksums create form (Advanced section) so a task can point pt-table-checksum at a dedicated MySQL options file instead of the executor's ~/.my.cnf.
  • Empty values omit --defaults-file (existing task args stay byte-identical). Non-empty values must be absolute POSIX paths; relative paths and ~ are rejected because they are not shell-expanded on the executor.
  • Schema, OpenAPI, payload goldens, and the generated TS client were regenerated. No hand-written frontend change.

Jira: SEP-1840

Tested

  • Open http://localhost:5174, sign in, go to Checksums → Create.
  • Expand Advanced and confirm Defaults File is last, empty by default, with help text that the path must be absolute and already exist on the executor.
  • Leave it empty, fill required Task fields, create the task. Inspect meta.args — no --defaults-file.
  • Create another task with Defaults File /etc/checksum.cnf. Inspect meta.args — contains --defaults-file=/etc/checksum.cnf.
  • Submit a relative path (rel.cnf) or ~/.my.cnf — form validation 422 with an actionable absolute-path message.
  • Edit the saved task with /etc/checksum.cnf — Defaults File is restored.

Checklist

  • New/modified functions have type hints and rST docstrings
  • New tests added for new features or bug fixes
  • All tests pass locally (make test) (checksums suite + schema/OpenAPI goldens; make lint clean)
  • Pre-commit hooks pass (make run-pre-commit) (ran on commit)
  • Database migrations generated if models changed (make makemigrations) (N/A — value lives in task data['_form'] / args only)
  • User-facing changes documented (README, inline help, UI text) (field Ui(description=...))
  • Configuration changes documented with examples (N/A)
  • Changelog fragment added under changelog.d/ if the change is user-facing (make changelog-add), or confirmed N/A (internal-only change, or a same-release-cycle fix for an unreleased sibling ticket)

@olucasandrade olucasandrade self-assigned this Aug 18, 2026
@github-actions github-actions Bot added language:python Changes a Python file, pyproject.toml or poetry.lock frontend app:checksums PR touches the checksums app slice labels Aug 18, 2026
@olucasandrade
olucasandrade marked this pull request as ready for review August 18, 2026 20:44
Copilot AI lite review requested due to automatic review settings August 18, 2026 20:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@olucasandrade olucasandrade added the qa passed Tests for this PR are completed and successful. label Aug 18, 2026
Co-authored-by: olucasandrade <64823667+olucasandrade@users.noreply.github.com>
@olucasandrade
olucasandrade enabled auto-merge (squash) August 19, 2026 13:39
@olucasandrade
olucasandrade merged commit 28bbccd into main Aug 19, 2026
22 checks passed
@olucasandrade
olucasandrade deleted the SEP-1840 branch August 19, 2026 13:50
@github-actions

Copy link
Copy Markdown
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  app/sep
  inventory.py
  app/sep/apps/checksums
  models.py
  app/sep/sync/syncers
  pmm.py
Project Total  

This report was generated by python-coverage-comment-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app:checksums PR touches the checksums app slice frontend language:python Changes a Python file, pyproject.toml or poetry.lock qa passed Tests for this PR are completed and successful.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants