#Node v4. Function App not visible

1 messages ยท Page 1 of 1 (latest)

hazy arch
#

I recently created an Azure Function App using the node v4 programming model. I chose node version as 20.*. While creating the function I associated a storage account with it. Now after deployment I cannot see the functions on the Azure Portal under the function App, beside the content of src folder I can see all other files in the parent directory which include host.json, .funcignore, .gitignore, Readme.md e.t.c. The thing which is more bothering is in the storage account I can locate the app but the wwwroot is empty. Here are screenshot of both function app page and storage account.

fallen iron
#

They moved the functions to the bottom of the overview page

#

So could you check if you can see them there or try to create one there

hazy arch
#

Yes I have seen that but there isn't any function section in my case.

#

I have deployed an app which has functions in it, I need to know what has happened. I was going through the github workflow file. I am suspicious about this, jobs -> build-and-deploy -> steps -> name: Setup Node ${{ env.NODE_VERSION }}, uses : actions/setup-node@v3.
When I have specified that I am using node@v4 why there is setup-node@v3 in the workflow file?

fallen iron
#

There are a few things running through each other here I think

#

There are a couple of version you need to consider:

  • The function runtime version, with it's tools and properties you can call and it's orchestration support (that's v4 atm, you can see it on your overview page)

  • The Node version that your app uses, you can see that in the Function App at Configuration ==> General settings

  • You showed a github pipeline/workflow, to allow for innovation of pipeline steps (like actions/checkout or actions/setup-node), they implemented semver for the actions (the named of the combined steps you specify in your pipeline). So that's a construct in GitHub (https://github.com/actions/setup-node)

GitHub

Set up your GitHub Actions workflow with a specific version of node.js - actions/setup-node

hazy arch
#

I checked that, and found them according to my need.

fallen iron
#

Ok, but you also push your functions to your function app right/

#

You are 100% sure that the package that you create is correct and works on your machine?

#

Because then it's just a matter of uploading the ZIP

#

is it windows or a Linux host?

hazy arch
#

I created the fuction using vs code via the extension provided by Azure, then I pushed my function app on Github. then created a function app on Azure and connected my GitHub repository via it. I chose linux as my host

#

I didn't manually uploaded any zip, I believe GitHub workflow manages the necessities.

#

If I am not wrong.

fallen iron
#

I think it's the same looking at your screenshot

hazy arch
#

I also came across a strange thing. I have .env listed in my .gitignore file but still I can see .env in the Azure portal with the exact same content that I have on my pc.

fallen iron
#

You need to put it into funcignore ๐Ÿ˜‰

hazy arch
fallen iron
#

Yes ๐Ÿ™‚ but functions don't honor your git, it just takes the directory as is

#

It just tars the directory and uploads everything not ignored by funcignore

#

But if you rightclick deploy on the function app it doesn't work? (from VSCode)

hazy arch
#

No I didnt' deployed the function using VSCode,

#

GitHub workflow does that for me. On every push, CI/CD gets executed.

#

.gitignore is something whcih live in the realm of Git and GitHub and funcignore belongs to the Azure universe. Technically speaking when Azure will consult with a GitHub repository it won't find all the files which .gitignore blocked from getting pushed onto GitHub. isn't so?

#

Here is my github repo
and you can see there is no .env file. and in the previos screen shot you can see there is a .env file in the Azure portal in my function.

#

And strangely the content of both .env files on computer and on Azure portal are exactly same.

#

Look here I have everything visible on my VS Code

fallen iron
#

Yes that's right, but if you uploaded it once with rightclick deploy or if it's generated during build then it won't be in your repo or your pc, but it will be uploaded ๐Ÿ˜›

#

So if you put it into funcignore and it wasn't present prior (not sure when it was uploaded) it shouldn't be there

hazy arch
fallen iron
#

Well if you did right click deploy from your machine (where .env is present) it'll upload it to the function if it's not in funcignore

#

The same applies to the github agent where your workflow jobs will run upon, if the env is generated in any step it'll be present in the agent, but not in the repo. If it's not in funcignore it'll upload it anyway

#

If you did enter it in funcignore and it's still there I'd try to manually delete it and push your code again, then it really shouldn't be there

hazy arch
#

Right I got it.

hazy arch
#

What does this mean ?

#

and here is my trigger

#

Then why it says no trigger found?

#

@fallen iron