Skip to content
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

Tags for resource get deleted on second azd up execution which blocks Azure Functions deploy from working #4313

Open
1 task done
nzthiago opened this issue Sep 13, 2024 · 2 comments
Assignees
Milestone

Comments

@nzthiago
Copy link
Member

Output from azd version
azd version 1.10.1 (commit 31409a3)

Describe the bug
Running azd up on a project that has a Function App (Flex Consumption) works the first time but shows the following on subsequent calls:
ERROR: error executing step command 'deploy --all': getting target resource: resource not found: unable to find a resource tagged with 'azd-service-name: processor'. Ensure the service resource is correctly tagged in your infrastructure configuration, and rerun provision

So, after running azd up the first time the app has the tags and deploys correctly:
image

But after attempting azd up the second time, it fails at the deploy stage because the tags are not there:
image

To Reproduce
This shows up from time to time. I have just reproduced this with the E2E DURABLE-FUNC-ORDER-PROCESSING sample for Azure Functions Flex Consumption when reviewing this PR so you can use that PR (or the sample from brain if the PR is already merged by the time of reviewing this).

Get the code of the sample down, run azd up, test the app as per readme, then make a small code change and run azd up again.

Expected behavior
Repeated azd up should correctly re-deploy the app.

@nzthiago nzthiago changed the title [Issue] Tags for resource get deleted on second azd up execution which blocks Azure Functions deploy from working Sep 13, 2024
@weikanglim weikanglim self-assigned this Sep 16, 2024
@weikanglim
Copy link
Contributor

I can see the resource is tagged correctly in the Bicep file. Will need to investigate further.

@rajeshkamal5050 rajeshkamal5050 added this to the On Deck milestone Sep 18, 2024
@nzthiago
Copy link
Member Author

@weikanglim - I have just run into this one again, this time with the https://github.com/Azure-Samples/azure-functions-java-flex-consumption-azd sample. I had run just earlier that sample with SKIP_VNET set to true. Then I did an 'azd down' and deleted the .azure folder. Then tried azd up again but this time without setting SKIP_VNET. Got this:

image

Then I ran azd up again and this time it publishes fine:
image

It does seem like there's something strange with the tag search.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants