Skip to content

Python version not detected by Oryx when deploying function app #23

@karenboyle1013

Description

@karenboyle1013

As a quick summary following manual deployment, at one of the last steps "Deploying the Function app" it states to create an archive of the az-func-audio directory using the command:

tar -a -c -f ../output.zip *

And then changing back to Sonic-brief-main directory and running the command:

az functionapp deployment source config-zip --subscription --resource-group --name --src output.zip --build-remote true

The issue is in the error code below that is taken from the deployment centre of the function app service.

`Command: oryx build /tmp/zipdeploy/extracted -o /tmp/build/expressbuild --platform python --platform-version 3.10.4 -i /tmp/8ddda4707b282aa -p packagedir=.python_packages/lib/site-packages
Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
You can report issues at https://github.com/Microsoft/Oryx/issues

Oryx Version: 0.2.20250611.1+0649de32f1279969c9023dd41b389cce4bb94493, Commit: 0649de32f1279969c9023dd41b389cce4bb94493, ReleaseTagName: 20250611.1

Build Operation ID: 30637134b0f45ac0
Repository Commit : 8ba295e4-0e36-42e6-a8bc-faeb49d89333
OS Type : bullseye
Image Type : githubactions

Primary SDK Storage URL: https://oryx-cdn.microsoft.io
Error: Couldn't detect a version for the platform 'python' in the repo.
Backup SDK Storage URL: https://oryxsdks-cdn.azureedge.net
Detecting platforms...
External SDK provider is enabled.
Platform 'hugo' has been disabled, so skipping detection for it.
Could not detect any platform in the source directory.
Error: Couldn't detect a version for the platform 'python' in the repo.\n/opt/Kudu/Scripts/starter.sh oryx build /tmp/zipdeploy/extracted -o /tmp/build/expressbuild --platform python --platform-version 3.10.4 -i /tmp/8ddda4707b282aa -p packagedir=.python_packages/lib/site-packages`

When zipping the file using the command:

zip -r ../output.zip

The code compiles and oryx completes the build as python version is finally detected through a file I added in the az-func-audio directory called "runtime.txt" to specify the use of python 3.10.4. Although when doing so the blob_trigger function is not created as the documentation states.
It seems as if oryx cannot detect the python version when the output.zip is a tar archive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions