generated from amazon-archives/__template_Apache-2.0
    
        
        - 
                Notifications
    You must be signed in to change notification settings 
- Fork 27
Cherry-pick changes for v0.12.2 patch release #506
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
          
     Merged
      
      
            jj22ee
  merged 10 commits into
  aws-observability:release/v0.12.x
from
jj22ee:0.12.2_release
  
      
      
   
  Oct 22, 2025 
      
    
                
     Merged
            
            Cherry-pick changes for v0.12.2 patch release #506
                    jj22ee
  merged 10 commits into
  aws-observability:release/v0.12.x
from
jj22ee:0.12.2_release
  
      
      
   
  Oct 22, 2025 
              
            Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    …rvability#497) _decode_tool_use was only used when _tool_json_input_buf was found, but we were decoding the entire _content_block after adding _tool_json_input_buf to it. The _content_block overall which could contain non-JSON elements (e.g. {}), causing failures. To fix this, we have removed _decode_tool_use helper function and inlined JSON decoding logic directly into content_block_stop handler in _process_anthropic_claude_chunk, where we only use it to decode _tool_json_input_buf before appending to _content_block. Patch based on open-telemetry/opentelemetry-python-contrib#3875 with code copied directly from https://github.com/open-telemetry/opentelemetry-python-contrib/blob/v0.54b1/instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/extensions/bedrock_utils.py#L289 Repeated testing in open-telemetry/opentelemetry-python-contrib#3875 to confirm this works By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
e682c1a    to
    93a3526      
    Compare
  
    | Note to reviewer: 
 | 
…lity#475) Add validation step to require commit SHAs instead of version tags for third-party GitHub actions in workflow files. Also fix the one we missed: `aquasecurity/trivy-action` - depending on `master` is pretty unusual and not trivial to catch, ultimately the Repo config `Require actions to be pinned to a full-length commit SHA` will protect against this if we missed any others. ### Testing done * `Python Instrumentation PR Build / static-code-checks (pull_request)` passes * `Check CHANGELOG` fails, causing PR-build to fail, but `Check for versioned GitHub action` passes: https://github.com/aws-observability/aws-otel-python-instrumentation/actions/runs/17924516041/job/50967250100?pr=475 * Added various [`@v` in code](aws-observability@f2f0523), only finds uncommented ones: https://github.com/aws-observability/aws-otel-python-instrumentation/actions/runs/17925754982/job/50971348934?pr=475 ``` Found versioned GitHub actions. Use commit SHAs instead: .github/actions/lambda_artifacts_build/action.yml:30: - uses: actions/checkout@v4 .github/actions/lambda_artifacts_build/action.yml:42: - uses: actions/checkout@v4 #v4 .github/workflows/daily-scan.yml:54: - uses: actions/checkout@v4 #v4 .github/workflows/daily-scan.yml:106: - uses: actions/checkout@v4 ``` By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Add gate jobs that fail if any workflow job fails OR if any job is missing from the gate's needs array. Prevents both job failures and configuration drift when adding new workflow jobs. Callout: I don't think it's possible to have one gate for both workflows, but it should not be the case that we add more over time. ### Testing: * Confirmed if even one subjob in a matrix fails, the job fails: [PASS](https://github.com/aws-observability/aws-otel-python-instrumentation/actions/runs/17930014615/job/50985189015?pr=477) * lint(lint) passes, but lint (spellcheck) fails, and all-pr-checks-pass fails. * Confirmed if a job is missing, the job fails: [PASS](https://github.com/aws-observability/aws-otel-python-instrumentation/actions/runs/17930365916/job/50986188220?pr=477) By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
423c9cb    to
    abfb4d5      
    Compare
  
    
              
                    thpierce
  
              
              approved these changes
              
                  
                    Oct 22, 2025 
                  
              
              
            
            
  This was referenced Oct 23, 2025 
      
    
  jj22ee 
      added a commit
      that referenced
      this pull request
    
      Oct 24, 2025 
    
    
      
  
    
      
    
  
*Issue #, if available:* Address release failure: https://github.com/aws-observability/aws-otel-python-instrumentation/actions/runs/18734463348/job/53438678131 1. hatchling is responsible for generating a metadata file included in the wheel file. 2. twine will validate this metadata before publishing to PyPI. According to the release failure, the metadata's `license-expression` field is malformed. Yet I tried [testing an artifact in a fork](https://github.com/jj22ee/aws-otel-python-instrumentation/releases/tag/v0.12.2), 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: ``` twine==5.1.1 hatchling==1.25.0 ``` The latest versions are not compatible with the release process, but note that - last twine release was on September 4th, 2025 - https://pypi.org/project/twine/#history - last hatchling release was on December 15th, 2024 - https://pypi.org/project/hatchling/#history - Our latest ADOT Python release was on September 16th, 2025. 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-python` upgrade in #506, an older `pip` version was installed, which installed older compatible versions of twine/hatchling. Probably since we upgraded `actions/setup-python`, `pip` might 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): - failure with only pinning twine: https://github.com/aws-observability/aws-otel-python-instrumentation/actions/runs/18762260003/job/53529721289 - failure with only pinning hatchling: https://github.com/aws-observability/aws-otel-python-instrumentation/actions/runs/18762938622/job/53531893352 - success by pinning both twine and hatchling: https://github.com/aws-observability/aws-otel-python-instrumentation/actions/runs/18763023516/job/53532160232 ----------- 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): ``` > [builder 5/6] RUN if [ amd64 = "amd64" ]; then cargo install cargo-audit && cargo audit ; fi: 3.631 Downloaded allocator-api2 v0.2.21 3.635 Downloaded ahash v0.8.12 3.639 Downloaded addr2line v0.25.1 3.696 error: failed to compile `cargo-audit v0.21.2`, intermediate artifacts can be found at `/tmp/cargo-installifwHEz`. 3.696 To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path. 3.696 3.696 Caused by: 3.696 rustc 1.87.0 is not supported by the following package: 3.696 [email protected] requires rustc 1.89 3.696 Try re-running `cargo install` with `--locked`` ``` This is fixed by following the guidance to use `--locked`. Looks like the `Cargo.lock` file, which pins dependencies, wasn't actually being used. `cargo-audit` is also [updated to be pinned](https://crates.io/crates/cargo-audit/versions) 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.
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  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:
Cherry-picks:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.