Release runs create no Git tags since 3.34.3

未关闭
#4,167 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

@anth-volk 已经在做这个了。

开始于 2026年11月3日。

  • #4168 来自 @anth-volk —— 未关闭

评估

难度
3/5
预计耗时
半天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
bash, git, github-actions, python, yaml
领域
ci-cd, cloud

调研方向

Start with .github/publish-git-tag.sh and the "Publish Git Tag" job in push.yml, then read pyproject.toml for the [project] version. The .github/scripts ci-scripts guard shows how the new script and its tests in tests/unit must be set up. Done when the script reads the version from pyproject.toml, creates and pushes only the tag for this commit, and a rerun on the same commit passes.

由索引模型根据 Issue 内容生成。

描述

Problem

The "Publish Git Tag" job in push.yml runs .github/publish-git-tag.sh on each release commit:

git tag `python setup.py --version`
git push --tags || true  # update the repository version

It hasn't created a tag since 3.34.3 (release e81ed3db, 2026-02-24), but the job passes on every release. On release run 41723443801 it logged:

python: can't open file '/home/runner/work/policyengine-api/policyengine-api/setup.py': [Errno 2] No such file or directory
Everything up-to-date
  • setup.py was removed on 2026-03-06 (#3319); the version is in [project] in pyproject.toml.
  • With no version, the script runs a bare git tag, which lists tags and exits 0. git push --tags then has nothing to push, and || true would hide a failure anyway. The script has no set -e, so it exits 0.
  • Tagging stopped before setup.py was removed. Commit 1e182346 (2026-02-24) moved the step to Python 3.12, which setup-python ships without setuptools, and setup.py began with from setuptools import setup. The job installs nothing before the step. (Inferred: the February job logs are no longer available.)

The script is outside .github/scripts, so the ci-scripts guard doesn't run shellcheck on it or require a test for it.

Proposal

  • Move the script to .github/scripts/publish_git_tag.sh, so the ci-scripts guard covers it, with tests in tests/unit.
  • Read the version from [project] in pyproject.toml, and fail if it's missing or isn't a release version.
  • Create a tag on the release commit named after the version, as the existing tags are (3.34.3), and push only that tag.
  • If the tag already exists on the remote and names this commit, succeed without changes, so a rerun of a release passes. If it names a different commit, fail.
  • Run with set -euo pipefail, without || true.

The releases from 3.35.0 to the current version have no tags. Whether to create those afterwards is a separate decision.

主要语言
Python
星标
18
派生
33
平均合并
2 天 21 小时
30 天内合并 PR
88

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

PolicyEngine/policyengine-api 的其他 Issue

查看 PolicyEngine/policyengine-api 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。