Pin twine, hatchling versions and enforce usage of cargo.lock #513
  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.
  
    
  
    
Issue #, if available:
Address release failure: https://github.com/aws-observability/aws-otel-python-instrumentation/actions/runs/18734463348/job/53438678131
According to the release failure, the metadata's
license-expressionfield is malformed. Yet I tried testing an artifact in a fork, but the wheel file's metadata doesn't look suspicious. So the exact root cause is unknown.Description of changes:
Pins the following for the release:
The latest versions are not compatible with the release process, but note that
Since there have been no new releases from twine/hatchling recently, it is suspected (but not confirmed yet in order to get this release out asap) that before the GitHub
actions/setup-pythonupgrade in #506, an olderpipversion was installed, which installed older compatible versions of twine/hatchling. Probably since we upgradedactions/setup-python,pipmight now install the latest versions of them, in which our repo is not yet compatible according to the failed release.Reasoning why we need both (test publish to TestPyPI):
2nd Issue is related to the PR build failure (https://github.com/aws-observability/aws-otel-python-instrumentation/actions/runs/18763622170/job/53533951402?pr=512#step:3:2157):
This is fixed by following the guidance to use
--locked. Looks like theCargo.lockfile, which pins dependencies, wasn't actually being used.cargo-auditis also updated to be pinned for sanity.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.