Skip to content

fix: Consumption tests fixes #1717

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

Draft
wants to merge 7 commits into
base: dev
Choose a base branch
from
Draft

Conversation

gavin-aguiar
Copy link
Contributor

Description

The Azure Functions Python worker Linux consumption tests were failing with 401 Unauthorized errors during container specialization. The core problem was authentication failure between the test framework and the Azure Functions host running in Docker containers.

Root Cause:
The test framework was using an old SWT (Simple Web Token) format that newer versions of the Azure Functions host no longer accepted
The Azure Functions host had migrated to expecting proper JWT (JSON Web Token) authentication, but the test framework wasn't generating valid JWTs
Issuer/Audience Validation Failures: Even when JWT tokens were attempted, they failed validation due to incorrect issuer and audience claims

Changes Made:

  • Added JWT Token Generation
  • Fixed Issuer/Audience Format
  • Fixed method to download the latest image

Fixes #


Pull Request Checklist

Host-Worker Contract

  • Does this PR impact the host-worker contract (e.g., gRPC messages, shared interfaces)?
    • If yes, have the changes been applied to:
      • azure_functions_worker (Python <= 3.12)
      • proxy_worker (Python >= 3.13)
    • If no, please explain why:

Worker Execution Logic

  • Does this PR affect worker execution logic (e.g., function invocation, bindings, lifecycle)?
    If yes, please answer the following:

Python Version Coverage

  • Does this change apply to both Python <=3.12 and 3.13+?
  • If yes, have the changes been made to:
    • azure_functions_worker (Python <= 3.12)
    • azure_functions_worker_v1 / azure_functions_worker_v2 (Python >= 3.13)
  • If no, please explain why:

Programming Model Compatibility (for Python 3.13+)

  • Does this change apply to both:
    • V1 programming model (azure_functions_worker_v1)?
    • V2 programming model (azure_functions_worker_v2)?
  • Explanation (if limited to one model):

@gavin-aguiar gavin-aguiar changed the title Gaaguiar/consumption test fix bug: Consumption tests fixes Jul 11, 2025
@gavin-aguiar gavin-aguiar changed the title bug: Consumption tests fixes fix: Consumption tests fixes Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant