-
Notifications
You must be signed in to change notification settings - Fork 9
docs(deploy): document by_ref's unpushed-commit warning #617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: claude/two-phase-deploy-docs
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -162,7 +162,7 @@ harper deploy ref=9f8c2a1 restart=true replicated=true | |
|
|
||
| **A reference is pinned to a SHA, not to the name you typed.** Tags and branches are resolved locally and the full commit SHA is what ships. This matters on a cluster: peers resolve the package independently, so a tag that moves mid-deploy — or a branch that advances — could otherwise leave nodes running different code. | ||
|
|
||
| **Commit and push first.** The cluster clones from the remote, so it only sees commits that have been pushed. `by_ref` warns when the working tree is dirty, since uncommitted changes won't be part of the deploy. | ||
| **Commit and push first.** The cluster clones from the remote, so it only sees commits that have been pushed. `by_ref` warns in both directions: when the working tree is dirty (those changes won't be part of the deploy) and when the commit being deployed isn't on any remote branch (the cluster won't be able to clone it). The second check reads your local remote-tracking refs, so run `git fetch` if you get it for a commit you know you pushed. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Medium: the adjacent SHA-pinning guarantee (line 163) is not absolute, and this PR doesn't flag the gap The unpushed-commit warning added here is accurate to But the sentence right above this one (line 163) states unconditionally: "A reference is pinned to a SHA, not to the name you typed. Tags and branches are resolved locally and the full commit SHA is what ships." That's only true when try {
return runGit(['rev-parse', `${refStr}^{commit}`]);
} catch {
// Not resolvable locally (e.g. a ref that only exists on the remote). Pass it through
// and let the cluster resolve it — losing the pin, ...
return refStr;
}So a — |
||
|
|
||
| #### Private repositories | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When documenting behavior changes to an existing surface (such as the new unpushed-commit warning for
by_ref), please include a to denote the change, as prescribed in the repository's guidelines.Example:
Commit and push first. The cluster clones from the remote, so it only sees commits that have been pushed.
by_refwarns in both directions: when the working tree is dirty (those changes won't be part of the deploy) and when the commit being deployed isn't on any remote branch (the cluster won't be able to clone it). The second check reads your local remote-tracking refs, so rungit fetchif you get it for a commit you know you pushed.References
<VersionBadge type="changed" version="vX.Y.0" />format when documenting behavior changes to existing surface, as prescribed in the repository's guidelines.