Azure-Samples / Azure-Samples/sonic-brief

Python version not detected by Oryx when deploying function app

Open
#23 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
36
Forks
26
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the manual deployment commands and the az-func-audio directory, comparing the tar-created output.zip with the zip-created archive. Read the Oryx error and inspect how runtime.txt affects Python 3.10.4 detection. Re-run deployment with each archive format and verify both a successful build and creation of the blob_trigger function.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.