Release runs create no Git tags since 3.34.3

Fechada
#4,167 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 2 dias

Um pull request relacionado já foi integrado.

  • #4168 de @anth-volk — integrado

Avaliação

Dificuldade
3/5
Tempo estimado
Meio dia
Facilidade para iniciantes
45/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
bash, git, github-actions, python, yaml
Domínio
ci-cd, cloud

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Python
Estrelas
18
Forks
33
Merge médio
2d 21h
PRs com merge (30d)
93

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de PolicyEngine/policyengine-api

Todas as issues de PolicyEngine/policyengine-api

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.