Azure / Azure/azure-functions-core-tools

No function published after run the `publish` command

Open
#3,257 17 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: publish bug HUMAN_REVIEW_REQUESTED language: python Needs: Attention :wave: Needs: Engineering Follow-up
Dominant language
C#
Stars
1.5k
Forks
498
Avg merge
6d 7h
Merged PRs (30d)
16

Description

Problem

Hi, we are using the Azure function service for a new feature of our product. After testing the code locally using the func start command I tried to publish the code to the Azure function that I previously created in my resource group but it didn't work.

In order to avoid problems with my code I took the example code from the official Azure docu

After running the command func azure functionapp publish gpd2 I was expecting the same result as in the official docu (changing my domain name).

...

Getting site publishing info...
Creating archive for current directory...
Performing remote build for functions project.

...

Deployment successful.
Remote build succeeded!
Syncing triggers...
Functions in msdocs-azurefunctions-qs:
    HttpExample - [httpTrigger]
        Invoke url: https://msdocs-azurefunctions-qs.azurewebsites.net/api/httpexample

However, there are no functions created:

Deployment successful. deployer = Push-Deployer deploymentPath = Functions App ZipDeploy. Extract zip. Remote build.
Remote build succeeded!
Syncing triggers...
Functions in gpd2:

Extra info

  • azure-functions-core-tools version
$ func version
4.0.4915
  • full output of the publish command:
$ func azure functionapp publish gpd2
Getting site publishing info...
Creating archive for current directory...
Performing remote build for functions project.
Deleting the old .python_packages directory
Uploading 1,75 KB [###############################################################################]
Remote build in progress, please wait...
Updating submodules.
Preparing deployment for commit id 'd7676f48-3'.
PreDeployment: context.CleanOutputPath False
PreDeployment: context.OutputPath /home/site/wwwroot
Repository path is /tmp/zipdeploy/extracted
Running oryx build...
Command: oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform python --platform-version 3.10.4 -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.20220815.2, Commit: 35e9c4851aba1f7b9c0516dbd202084022e653f2, ReleaseTagName: 20220815.2

Build Operation ID: |r/FfTl917Po=.3a9743c0_
Repository Commit : d7676f48-389d-42b9-ac0b-1cde649ddd8d

Detecting platforms...
Detected following platforms:
  python: 3.10.4
Version '3.10.4' of platform 'python' is not installed. Generating script to install it...


Source directory     : /tmp/zipdeploy/extracted
Destination directory: /home/site/wwwroot


Downloading and extracting 'python' version '3.10.4' to '/tmp/oryx/platforms/python/3.10.4'...
Detecting image debian flavor: bullseye.
Downloaded in 1 sec(s).
Verifying checksum...
Extracting contents...
performing sha512 checksum for: python...
Done in 5 sec(s).

Python Version: /tmp/oryx/platforms/python/3.10.4/bin/python3.10
Creating directory for command manifest file if it does not exist
Removing existing manifest file

Running pip install...
Done in 26 sec(s).
[18:07:45+0000] Collecting azure-functions
[18:07:45+0000]   Downloading azure_functions-1.12.0-py3-none-any.whl (160 kB)
[18:07:45+0000] Collecting web3==5.29.1
[18:07:45+0000]   Downloading web3-5.29.1-py3-none-any.whl (500 kB)
[18:07:46+0000] Collecting eth-typing<3.0.0,>=2.0.0
[18:07:46+0000]   Downloading eth_typing-2.3.0-py3-none-any.whl (6.2 kB)
[18:07:47+0000] Collecting aiohttp<4,>=3.7.4.post0
[18:07:47+0000]   Downloading aiohttp-3.8.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB)
[18:07:48+0000] Collecting ipfshttpclient==0.8.0a2
[18:07:48+0000]   Downloading ipfshttpclient-0.8.0a2-py3-none-any.whl (82 kB)
[18:07:49+0000] Collecting protobuf<4,>=3.10.0
[18:07:49+0000]   Downloading protobuf-3.20.3-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.1 MB)
[18:07:49+0000] Collecting eth-account<0.6.0,>=0.5.7
[18:07:49+0000]   Downloading eth_account-0.5.9-py3-none-any.whl (101 kB)
[18:07:49+0000] Collecting hexbytes<1.0.0,>=0.1.0
[18:07:49+0000]   Downloading hexbytes-0.3.0-py3-none-any.whl (6.4 kB)
[18:07:49+0000] Collecting jsonschema<5,>=3.2.0
[18:07:49+0000]   Downloading jsonschema-4.17.3-py3-none-any.whl (90 kB)
[18:07:50+0000] Collecting eth-hash[pycryptodome]<1.0.0,>=0.2.0
[18:07:50+0000]   Downloading eth_hash-0.5.1-py3-none-any.whl (9.0 kB)
[18:07:50+0000] Collecting lru-dict<2.0.0,>=1.1.6
[18:07:50+0000]   Downloading lru_dict-1.1.8-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (28 kB)
[18:07:50+0000] Collecting requests<3.0.0,>=2.16.0
[18:07:50+0000]   Downloading requests-2.28.2-py3-none-any.whl (62 kB)
[18:07:50+0000] Collecting eth-utils<2.0.0,>=1.9.5
[18:07:50+0000]   Downloading eth_utils-1.10.0-py3-none-any.whl (24 kB)
[18:07:51+0000] Collecting websockets<10,>=9.1
[18:07:51+0000]   Downloading websockets-9.1.tar.gz (76 kB)
[18:07:51+0000] Collecting eth-abi<3.0.0,>=2.0.0b6
[18:07:51+0000]   Downloading eth_abi-2.2.0-py3-none-any.whl (28 kB)
[18:07:52+0000] Collecting multiaddr>=0.0.7
[18:07:52+0000]   Downloading multiaddr-0.0.9-py2.py3-none-any.whl (16 kB)
[18:07:52+0000] Collecting frozenlist>=1.1.1
[18:07:52+0000]   Downloading frozenlist-1.3.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (149 kB)
[18:07:52+0000] Collecting aiosignal>=1.1.2
[18:07:52+0000]   Downloading aiosignal-1.3.1-py3-none-any.whl (7.6 kB)
[18:07:52+0000] Collecting charset-normalizer<3.0,>=2.0
[18:07:52+0000]   Downloading charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
[18:07:54+0000] Collecting multidict<7.0,>=4.5
[18:07:54+0000]   Downloading multidict-6.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (114 kB)
[18:07:55+0000] Collecting yarl<2.0,>=1.0
[18:07:55+0000]   Downloading yarl-1.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (264 kB)
[18:07:55+0000] Collecting async-timeout<5.0,>=4.0.0a3
[18:07:55+0000]   Downloading async_timeout-4.0.2-py3-none-any.whl (5.8 kB)
[18:07:55+0000] Collecting attrs>=17.3.0
[18:07:55+0000]   Downloading attrs-22.2.0-py3-none-any.whl (60 kB)
[18:07:55+0000] Collecting parsimonious<0.9.0,>=0.8.0
[18:07:55+0000]   Downloading parsimonious-0.8.1.tar.gz (45 kB)
[18:07:56+0000] Collecting eth-rlp<2,>=0.1.2
[18:07:56+0000]   Downloading eth_rlp-0.3.0-py3-none-any.whl (5.0 kB)
[18:07:56+0000] Collecting eth-keys<0.4.0,>=0.3.4
[18:07:56+0000]   Downloading eth_keys-0.3.4-py3-none-any.whl (21 kB)
[18:07:56+0000] Collecting eth-keyfile<0.6.0,>=0.5.0
[18:07:56+0000]   Downloading eth_keyfile-0.5.1-py3-none-any.whl (8.3 kB)
[18:07:56+0000] Collecting rlp<3,>=1.0.0
[18:07:56+0000]   Downloading rlp-2.0.1-py2.py3-none-any.whl (20 kB)
[18:07:57+0000] Collecting bitarray<3,>=1.2.1
[18:07:57+0000]   Downloading bitarray-2.6.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (242 kB)
[18:07:57+0000] Collecting pycryptodome<4,>=3.6.6
[18:07:57+0000]   Downloading pycryptodome-3.17-cp35-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB)
[18:07:58+0000] Collecting cytoolz<1.0.0,>=0.9.0
[18:07:58+0000]   Downloading cytoolz-0.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.8 MB)
[18:07:58+0000] Collecting toolz>=0.8.0
[18:07:58+0000]   Downloading toolz-0.12.0-py3-none-any.whl (55 kB)
[18:07:58+0000] Collecting eth-rlp<2,>=0.1.2
[18:07:58+0000]   Downloading eth_rlp-0.2.1-py3-none-any.whl (5.0 kB)
[18:07:58+0000] Collecting eth-utils<2.0.0,>=1.9.5
[18:07:58+0000]   Downloading eth_utils-1.9.5-py3-none-any.whl (23 kB)
[18:07:59+0000] Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0
[18:07:59+0000]   Downloading pyrsistent-0.19.3-py3-none-any.whl (57 kB)
[18:07:59+0000] Collecting six
[18:07:59+0000]   Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
[18:07:59+0000] Collecting varint
[18:07:59+0000]   Downloading varint-1.0.2.tar.gz (1.9 kB)
[18:08:00+0000] Collecting base58
[18:08:00+0000]   Downloading base58-2.1.1-py3-none-any.whl (5.6 kB)
[18:08:00+0000] Collecting netaddr
[18:08:00+0000]   Downloading netaddr-0.8.0-py2.py3-none-any.whl (1.9 MB)
[18:08:00+0000] Collecting certifi>=2017.4.17
[18:08:00+0000]   Downloading certifi-2022.12.7-py3-none-any.whl (155 kB)
[18:08:00+0000] Collecting idna<4,>=2.5
[18:08:00+0000]   Downloading idna-3.4-py3-none-any.whl (61 kB)
[18:08:01+0000] Collecting urllib3<1.27,>=1.21.1
[18:08:01+0000]   Downloading urllib3-1.26.14-py2.py3-none-any.whl (140 kB)
[18:08:01+0000] Building wheels for collected packages: parsimonious, websockets, varint
[18:08:01+0000]   Building wheel for parsimonious (setup.py): started
[18:08:01+0000]   Building wheel for parsimonious (setup.py): finished with status 'done'
[18:08:01+0000]   Created wheel for parsimonious: filename=parsimonious-0.8.1-py3-none-any.whl size=42708 sha256=1dfd16b7c0585da32fa555883b157487ab0b0712d35bdb68986b81092a7c450d
[18:08:01+0000]   Stored in directory: /usr/local/share/pip-cache/wheels/b1/12/f1/7a2f39b30d6780ae9f2be9a52056595e0d97c1b4531d183085
[18:08:01+0000]   Building wheel for websockets (setup.py): started
[18:08:02+0000]   Building wheel for websockets (setup.py): finished with status 'done'
[18:08:02+0000]   Created wheel for websockets: filename=websockets-9.1-cp310-cp310-linux_x86_64.whl size=96795 sha256=6b4b9471b95508be586927f00586fa4b6dd5300f4a501b9e86d9afe3059ec520
[18:08:02+0000]   Stored in directory: /usr/local/share/pip-cache/wheels/79/f7/4e/873eca27ecd6d7230caff265283a5a5112ad4cd1d945c022dd
[18:08:02+0000]   Building wheel for varint (setup.py): started
[18:08:03+0000]   Building wheel for varint (setup.py): finished with status 'done'
[18:08:03+0000]   Created wheel for varint: filename=varint-1.0.2-py3-none-any.whl size=1962 sha256=f0f43c080ee73bf3952faec4a4ab0628e74d9f7bbb48002cfe49fb47d2e96810
[18:08:03+0000]   Stored in directory: /usr/local/share/pip-cache/wheels/39/48/5e/33919c52a2a695a512ca394a5308dd12626a40bbcd288de814
[18:08:03+0000] Successfully built parsimonious websockets varint
[18:08:04+0000] Installing collected packages: toolz, eth-typing, eth-hash, cytoolz, six, eth-utils, varint, urllib3, rlp, pycryptodome, parsimonious, netaddr, multidict, idna, hexbytes, frozenlist, eth-keys, charset-normalizer, certifi, base58, yarl, requests, pyrsistent, multiaddr, eth-rlp, eth-keyfile, eth-abi, bitarray, attrs, async-timeout, aiosignal, websockets, protobuf, lru-dict, jsonschema, ipfshttpclient, eth-account, aiohttp, web3, azure-functions
[18:08:10+0000] Successfully installed aiohttp-3.8.3 aiosignal-1.3.1 async-timeout-4.0.2 attrs-22.2.0 azure-functions-1.12.0 base58-2.1.1 bitarray-2.6.2 certifi-2022.12.7 charset-normalizer-2.1.1 cytoolz-0.12.1 eth-abi-2.2.0 eth-account-0.5.9 eth-hash-0.5.1 eth-keyfile-0.5.1 eth-keys-0.3.4 eth-rlp-0.2.1 eth-typing-2.3.0 eth-utils-1.9.5 frozenlist-1.3.3 hexbytes-0.3.0 idna-3.4 ipfshttpclient-0.8.0a2 jsonschema-4.17.3 lru-dict-1.1.8 multiaddr-0.0.9 multidict-6.0.4 netaddr-0.8.0 parsimonious-0.8.1 protobuf-3.20.3 pycryptodome-3.17 pyrsistent-0.19.3 requests-2.28.2 rlp-2.0.1 six-1.16.0 toolz-0.12.0 urllib3-1.26.14 varint-1.0.2 web3-5.29.1 websockets-9.1 yarl-1.8.2
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 21.2.4; however, version 23.0 is available.
You should consider upgrading via the '/tmp/oryx/platforms/python/3.10.4/bin/python3.10 -m pip install --upgrade pip' command.
Not a vso image, so not writing build commands
Preparing output...

Copying files to destination directory '/home/site/wwwroot'...
Done in 1 sec(s).

Removing existing manifest file
Creating a manifest file...
Manifest file created.
Copying .ostype to manifest output directory.

Done in 32 sec(s).
Running post deployment command(s)...

Generating summary of Oryx build
Deployment Log file does not exist in /tmp/oryx-build.log
The logfile at /tmp/oryx-build.log is empty. Unable to fetch the summary of build
Triggering recycle (preview mode disabled).
Linux Consumption plan has a 1.5 GB memory limit on a remote build container.
To check our service limit, please visit https://docs.microsoft.com/en-us/azure/azure-functions/functions-scale#service-limits
Writing the artifacts to a squashfs file
Parallel mksquashfs: Using 1 processor
Creating 4.0 filesystem on /home/site/artifacts/functionappartifact.squashfs, block size 131072.

[=============================================================/] 2632/2632 100%

Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
	compressed data, compressed metadata, compressed fragments,
	compressed xattrs, compressed ids
	duplicates are removed
Filesystem size 12184.70 Kbytes (11.90 Mbytes)
	28.07% of uncompressed filesystem size (43409.99 Kbytes)
Inode table size 26746 bytes (26.12 Kbytes)
	29.12% of uncompressed inode table size (91852 bytes)
Directory table size 26330 bytes (25.71 Kbytes)
	36.12% of uncompressed directory table size (72901 bytes)
Number of duplicate files found 124
Number of inodes 2843
Number of files 2506
Number of fragments 162
Number of symbolic links  0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 337
Number of ids (unique uids + gids) 1
Number of uids 1
	root (0)
Number of gids 1
	root (0)
Creating placeholder blob for linux consumption function app...
SCM_RUN_FROM_PACKAGE placeholder blob scm-latest-gpd2.zip located
Uploading built content /home/site/artifacts/functionappartifact.squashfs for linux consumption function app...
Resetting all workers for gpd2.azurewebsites.net
Deployment successful. deployer = Push-Deployer deploymentPath = Functions App ZipDeploy. Extract zip. Remote build.
Remote build succeeded!
Syncing triggers...
Functions in gpd2:
  • Operating system of the service plan:
Linux
  • Azure function runtime version:
4.15.1.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing func azure functionapp publish gpd2 with the documented Python example and compare its output with func start. Read the publish flow around remote build and trigger synchronization, using the supplied Oryx log as the primary trace. Done means a successful publish lists the deployed function, including HttpExample, as in the documented output.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.