Skip to content

feat(cli): update default revision comment to use HEAD commit's shortsha and subject - #98

Merged
volkanarisli merged 2 commits into
mainfrom
feature/eco-1255-a-revisions-comment-says-what-was-deployed-from-a-laptop-or
Oct 23, 2026
Merged

volkanarisli merged 2 commits into
mainfrom
feature/eco-1255-a-revisions-comment-says-what-was-deployed-from-a-laptop-or

Conversation

@volkanarisli

Copy link
Copy Markdown
Contributor

Related Issues

  • fixes ECO-1255

Proposed Changes?

Without -m, the revision comment is now the HEAD commit's short sha and subject
(a1b2c3d Add retry to retriever), so each revision says what changed. Outside git it is
Deployed <file> via haystack-enterprise CLI. Branch and commit link are dropped, along with the
URL helpers.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  haystack_enterprise_sdk/_service
  deployment_service.py
Project Total  

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

@mrchtr

mrchtr commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Thanks @volkanarisli. Looks good already, I was just thinking about the UX again.

Two suggestions:

1. Mark uncommitted changes. On a laptop, the deployed YAML comes from the working tree, but the comment names HEAD. Deploy with local edits and the revision says a1b2c3d Add retry to retriever while running something else. One more best-effort call would cover it:

comment = _git(target_dir, "log", "-1", "--format=%h %s")
if comment is None:
    return f"Deployed {target.name} via haystack-enterprise CLI"
if _git(target_dir, "status", "--porcelain"):
    comment += " (dirty)"
return comment

(_git returns None for empty output, so a clean tree gets no suffix.)

2. Document -m for CI. In GitHub Actions pull_request runs, actions/checkout checks out a synthetic merge commit, so the default becomes e4f5a6b Merge 1234abc into 9876fed. Detecting that via HEAD^2 doesn't work with the default fetch-depth: 1, so I'd add a line to the deploy guide instead:

- run: haystack-enterprise deploy pipeline.py svc -m "$(git log -1 --format='%h %s' ${{ github.event.pull_request.head.sha || github.sha }})"

Non-blocking, happy for 2 to be a follow-up.

…ent -m for PR runs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@volkanarisli

Copy link
Copy Markdown
Contributor Author

Thanks! Did both. (1) (dirty) suffix, ignoring untracked files so a stray scratch file doesn't flag every deploy. (2) Added a PR-run note to the deploy guide, but used -m "$PR_TITLE" via env: instead of git log <head.sha>: the head sha usually isn't fetched with fetch-depth: 1, and an inline ${{ github.event.pull_request.title }} would be a script-injection hole.

@volkanarisli
volkanarisli merged commit 979108c into main Oct 23, 2026
8 checks passed
@volkanarisli
volkanarisli deleted the feature/eco-1255-a-revisions-comment-says-what-was-deployed-from-a-laptop-or branch October 23, 2026 08:54
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.

2 participants