Skip to content
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

Tagged commit for 0.2.14 does not match artifacts #4474

Closed
zanieb opened this issue Jun 24, 2024 · 1 comment
Closed

Tagged commit for 0.2.14 does not match artifacts #4474

zanieb opened this issue Jun 24, 2024 · 1 comment
Labels
releases Related to building and distributing release artifacts of uv

Comments

@zanieb
Copy link
Member

zanieb commented Jun 24, 2024

I'm not sure if there's anything we can do here (now that it's happened), but our release tooling tagged f073088 instead of e0ad649 during the re-run of the failed 0.2.14 release.

The artifacts were all built for the proper commit, but the git tag points to an incorrect source.

See #4432 for details on the original problem.

@zanieb zanieb added the releases Related to building and distributing release artifacts of uv label Jun 24, 2024
zanieb added a commit that referenced this issue Jun 24, 2024
Releasing 0.2.15 with a few additions over 0.2.14. Motivated by the
incorrect tagging of 0.2.14 (#4474).

Generated the changelog with a small patch to Rooster allowing me to
force the previous commit to be correct.

```diff
diff --git a/src/rooster/_cli.py b/src/rooster/_cli.py
index 2a4f61b..4ec1299 100644
--- a/src/rooster/_cli.py
+++ b/src/rooster/_cli.py
@@ -38,6 +38,7 @@ def release(
     without_sections: list[str] = typer.Option(
         [], help="Sections to exclude from the changelog"
     ),
+    previous_commit: str = None,
 ):
     """
     Create a new release.
@@ -58,7 +59,11 @@ def release(
         typer.echo("It looks like there are no version tags for this project.")
 
     # Get the commits since the last release
-    changes = list(get_commits_between(config, repo, last_version))
+    changes = list(
+        get_commits_between(
+            config, repo, last_version, force_first_commit=previous_commit
+        )
+    )
     since = "since last release" if last_version else "in the project"
     typer.echo(f"Found {len(changes)} commits {since}.")
 
diff --git a/src/rooster/_git.py b/src/rooster/_git.py
index 597bb88..66bc54e 100644
--- a/src/rooster/_git.py
+++ b/src/rooster/_git.py
@@ -29,12 +29,13 @@ def get_commits_between(
     target: Path,
     first_version: Version | None = None,
     second_version: Version | None = None,
+    force_first_commit: str | None = None,
 ) -> Generator[git.Commit, None, None]:
     """
     Yield all commits between two tags
     """
     repo = git.repository.Repository(target.absolute())
-    first_commit = (
+    first_commit = force_first_commit or (
         repo.lookup_reference(
             TAG_PREFIX + config.version_tag_prefix + str(first_version)
         )
```
@zanieb
Copy link
Member Author

zanieb commented Jun 24, 2024

We're releasing 0.2.15 now to minimize the effect of this.

@zanieb zanieb closed this as completed Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
releases Related to building and distributing release artifacts of uv
Projects
None yet
Development

No branches or pull requests

1 participant