[CI]: Let a patch or minor release edit only `__about__.py`

Ouverte
#877 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
64/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
github-actions, python
Domaine
ci-cd, testing

Piste de recherche

Read RELEASING.md, the conformance package pyproject.toml files, .github/tests/otel_lifecycle_compatibility_test.py, .github/tests/otel_legacy_registration_rejection_test.py, and .github/scripts/install_otel_test_wheels.py. Trace how package versions are installed and checked, then run the acceptance commands after changing each package version independently. Done means those lanes pass without editing the version pins or assertions for patch and minor releases.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Found while reviewing PR #876: release SDK 3.0.1.

Problem

RELEASING.md says a release bumps __version__ in __about__.py. A core release must also edit five other files, or CI fails:

  • packages/aws-durable-execution-sdk-python-conformance-tests{,-otel,-telemetry}/pyproject.toml pin aws-durable-execution-sdk-python==3.0.1.
  • .github/tests/otel_lifecycle_compatibility_test.py and .github/tests/otel_legacy_registration_rejection_test.py assert that the installed core version is 3.0.1.

PR #738: release SDK 2.0.1 needed the same pin edits. The conformance packages also pin otel ==2.0.0 and telemetry-exporter ==1.0.0. The lifecycle test also asserts otel 2.0.0. So otel and telemetry-exporter releases have the same problem.

Why the exact versions add nothing

Conformance pins:

  1. The root hatch default, test and types environments install every packages/* member from the checkout.
  2. So an exact pin resolves only when it equals the checkout's version.
  3. The conformance Lambda bundles do not read the pin. Core conformance copies the SDK source into lambda-build/. OTel and telemetry conformance install the SDK from git at the commit under test.
  4. The conformance packages are not published.
  5. So the pin never selects a version. It can only fail to resolve after a bump.

Test assertions:

  1. Both tests run after .github/scripts/install_otel_test_wheels.py.
  2. That script installs the wheel whose version matches __about__.py. It then checks the installed files against that wheel.
  3. So the installed version always equals __about__.py. The assertions fail only when someone forgets to edit them.
Proposed change
  • The conformance packages use ranges, as the otel and telemetry-exporter packages already do: aws-durable-execution-sdk-python>=3.0.0,<4, aws-durable-execution-sdk-python-otel>=2.0.0,<3, aws-durable-execution-sdk-python-telemetry-exporter>=1.0.0,<2.
  • The two tests check the major version, for example Version(version("aws-durable-execution-sdk-python")).major == 3. The lifecycle test checks otel major 2 the same way.
  • The legacy test keeps otel == "1.0.0", because that environment installs that exact release from PyPI.

A major release still edits the ranges and the major checks.

Acceptance criteria
  • With only the core __about__.py set to 3.0.2, hatch run test:all, hatch run test-wheel-otel:test and hatch run test-wheel-otel-legacy:test pass. The wheel lanes need hatch build in the core and otel package directories first.
  • The same commands pass with only the otel __about__.py set to 2.0.1, and with only the telemetry-exporter __about__.py set to 1.0.1.
Langage dominant
Python
Étoiles
58
Forks
32
Merge moyen
1 j 6 h
PR mergées (30 j)
80

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de aws/aws-durable-execution-sdk-python

Toutes les issues de aws/aws-durable-execution-sdk-python

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.