GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing github.com — version: derive dev versions from git workspace state by shykes · Pull Request #13278 · dagger/dagger Conversation
Contributor
SummaryRefactor the
Test plan
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsThe version module used .changes/.next as the predicted next release version. That coupled build-time dev version strings to Changie release state, so changing release-note bookkeeping could change engine and CLI dev version computation. Derive the next dev-version baseline from git release tags instead. Dirty and clean untagged builds now use the latest stable v* tag with its patch component bumped. Tagged release commits still return the semver tag that points at HEAD. This keeps .changes/.next out of the version module without removing the file from the repository. Release-process cleanup can delete it separately, without mixing that workflow change into this versioning change. Signed-off-by: Solomon Hykes <[email protected]> The version module exposed an optional git *GitRepository constructor argument, but the official build paths do not pass it. Prod traces show calls to dag.Version() receiving the contextual gitParent and inputs arguments only; the module then derives its private GitRepository from gitParent.Directory(".git").AsGit() when possible.
Keeping the public git argument made the versioning model look like it was already driven by a full contextual GitRepository. In practice, that path was dead for engine-dev, cli-dev, and release callers, and it obscured the real inputs that need to be replaced by Workspace.git().
Remove the public constructor argument while preserving the private GitRepository field and the existing gitParent-derived behavior. Regenerate the version module wrapper and dependent generated clients so the removed argument no longer appears in the module API.
Signed-off-by: Solomon Hykes <[email protected]>
The version module used a contextual inputs Directory to compute dirty dev version digests. That input set had to maintain its own large ignore filter, separate from the real build inputs. In practice that made the digest contract fragile: every build-input change also required remembering to update a second filter in the version module. Remove the inputs argument and base dirty state on git instead. When local git metadata is available, dirty detection now uses GitRepository.Uncommitted and dirty dev digests use the digest of Uncommitted.AsPatch with metadata excluded. This keeps the digest tied to the actual uncommitted patch instead of a manually-maintained source snapshot. Add a small internal workspaceGit shim to isolate the module from the current GitRepository plumbing. The shim deliberately represents only local workspace git state: HEAD, branches for the legacy ImageTag path, uncommitted changes, the current semver tag, and the latest semver tag. This mirrors the shape we want from a future core Workspace.git API, so swapping the implementation later should be localized to the shim. Linked git worktrees are still a current limitation because the contextual gitParent input exposes .git as a file, not a directory. Preserve working dev builds for that case with an explicit Version-level fallback: when local git cannot be loaded, compute the next patch baseline from the upstream Dagger repo tags and emit a digestless dirty dev version like vX.Y.Z-<timestamp>-dev. Keep that fallback outside workspaceGit so the shim does not silently pretend that a hardcoded upstream repository is workspace state. Regenerate the version module bindings and the generated clients in cli-dev, engine-dev, and release so the removed inputs constructor argument is reflected in dependent modules. Signed-off-by: Solomon Hykes <[email protected]> Signed-off-by: Solomon Hykes <[email protected]>
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | ||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |