Skip to content

Adding apiManagementConfig to connect function/web apps#1403

Merged
weikanglim merged 11 commits intoAzure:mainfrom
pamelafox:apim-config
Feb 7, 2023
Merged

Adding apiManagementConfig to connect function/web apps#1403
weikanglim merged 11 commits intoAzure:mainfrom
pamelafox:apim-config

Conversation

@pamelafox
Copy link
Member

@pamelafox pamelafox commented Jan 17, 2023

Web Apps and Functions both have an "API Management" link in the left sidebar in Azure Portal that can optionally embed a connected API Management instance.

Screenshot of APIM embedded

That link is set by the apiManagementConfig property on the Web/Function app.

This PR adds that configuration to all the samples with a Web/Function App backend. The samples that use Azure Container Apps should not be affected by the change.

I have verified this works on todo-python-mongo-swa-func and will test a few others as well. I am hoping there's an automated build for all the TODO apps once I make a pull request, but that may be wishful thinking. I'll find out soon!

@pamelafox
Copy link
Member Author

Update: I've tested with a function app with and without useApim and also tested an ACA app with and without useApim (where I would expect the setting to get ignored). Things looks good.

@jongio
Copy link
Member

jongio commented Jan 17, 2023

LGTM, @rajeshkamal5050 do we want to run automation or manual tests on this?

@rajeshkamal5050
Copy link
Contributor

rajeshkamal5050 commented Jan 19, 2023

@pamelafox you can run the template tests automation pipeline with/without APIM. It should cover for any regressions.
https://dev.azure.com/azure-sdk/internal/_build?definitionId=5002

@weikanglim please add if any additional testing needs to be done.

@pamelafox
Copy link
Member Author

@rajeshkamal5050 Thanks, I'm trying to figure out how to trigger that pipeline for my branch, I haven't used ADO pipelines before and am wondering if I'm lacking permissions or just don't know what to click. Here's what I see:

Screenshot 2023-01-19 at 10 16 18 AM

Screenshot 2023-01-19 at 10 17 38 AM

I thought I'd find a manual trigger option in the branches tab, but don't see anything there or in the menu on it. Can you advise?

@rajeshkamal5050
Copy link
Contributor

/azp run azure-dev - template - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pamelafox
Copy link
Member Author

Hm, the "install azd" task failed on that job. The output shows it trying to download from a different URL than previous jobs.

This job:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=2128637&view=logs&j=295b8682-616f-500d-bd95-0eb28c188b5c&t=3ae82285-cad6-5d09-a239-e1a494dd79f8

install-azd: Downloading [https://***.blob.core.windows.net/azd/standalone/pr/1403/azd-linux-amd64.tar.gz](https://%2A%2A%2A.blob.core.windows.net/azd/standalone/pr/1403/azd-linux-amd64.tar.gz) to /tmp/tmp.ilQODVfDLa
install-azd: ERROR: Could not download from [https://***.blob.core.windows.net/azd/standalone/pr/1403/azd-linux-amd64.tar.gz,](https://%2A%2A%2A.blob.core.windows.net/azd/standalone/pr/1403/azd-linux-amd64.tar.gz,) ensure platform and architecture are supported

Previous job:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=2126583&view=logs&j=5cf76c9a-598b-5efe-8084-d68089812150&t=18eb66fc-b621-5bc1-fbd0-59349a1d5a57

install-azd: Downloading https://azure-dev.azureedge.net/azd/standalone/release/daily/azd-linux-amd64.tar.gz to /tmp/tmp.YQ2hl2Yf2S
azd-linux-amd64

@rajeshkamal5050
Copy link
Contributor

rajeshkamal5050 commented Jan 19, 2023

@danieljurek @weikanglim can you help in running the template test pipelines with/without APIM?

@danieljurek
Copy link
Member

/azp run azure-dev - repoman

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@danieljurek
Copy link
Member

We've got two pipeline runs verifying this:

@rajeshkamal5050
Copy link
Contributor

/azp run azure-dev - repoman

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@weikanglim
Copy link
Contributor

Running with APIM enabled: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=2152232&view=results

Going to quickly verify this before merging.

Copy link
Contributor

@wbreza wbreza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - added one suggestion around dependsOn usage.

@weikanglim
Copy link
Contributor

/azp run azure-dev - repoman

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pamelafox
Copy link
Member Author

@wbreza Not sure why I had the dependsOn originally, I sometimes put it to be better "safe than sorry" or while working around Bicep issues. However, I just tried removing it from todo-python and it seemed to deploy fine. Hopefully the template tests all pass! Thanks for the help.

@weikanglim
Copy link
Contributor

/azp run azure-dev - repoman

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-sdk
Copy link
Collaborator

Repoman Generation Results

Repoman pushed changes to remotes for the following projects:

Project: todo-csharp-cosmos-sql

Remote: azure-samples-staging

Branch: pr/1403

You can initialize this project with:

azd init -t Azure-Samples/todo-csharp-cosmos-sql -b pr/1403

View Changes | Compare Changes


Project: todo-csharp-sql-swa-func

Remote: azure-samples-staging

Branch: pr/1403

You can initialize this project with:

azd init -t Azure-Samples/todo-csharp-sql-swa-func -b pr/1403

View Changes | Compare Changes


Project: todo-csharp-sql

Remote: azure-samples-staging

Branch: pr/1403

You can initialize this project with:

azd init -t Azure-Samples/todo-csharp-sql -b pr/1403

View Changes | Compare Changes


Project: todo-java-mongo-aca

Remote: azure-samples-staging

Branch: pr/1403

You can initialize this project with:

azd init -t Azure-Samples/todo-java-mongo-aca -b pr/1403

View Changes | Compare Changes


Project: todo-java-mongo

Remote: azure-samples-staging

Branch: pr/1403

You can initialize this project with:

azd init -t Azure-Samples/todo-java-mongo -b pr/1403

View Changes | Compare Changes


Project: todo-nodejs-mongo-aca

Remote: azure-samples-staging

Branch: pr/1403

You can initialize this project with:

azd init -t Azure-Samples/todo-nodejs-mongo-aca -b pr/1403

View Changes | Compare Changes


Project: todo-nodejs-mongo-swa-func

Remote: azure-samples-staging

Branch: pr/1403

You can initialize this project with:

azd init -t Azure-Samples/todo-nodejs-mongo-swa-func -b pr/1403

View Changes | Compare Changes


Project: todo-nodejs-mongo

Remote: azure-samples-staging

Branch: pr/1403

You can initialize this project with:

azd init -t Azure-Samples/todo-nodejs-mongo -b pr/1403

View Changes | Compare Changes


Project: todo-python-mongo-aca

Remote: azure-samples-staging

Branch: pr/1403

You can initialize this project with:

azd init -t Azure-Samples/todo-python-mongo-aca -b pr/1403

View Changes | Compare Changes


Project: todo-python-mongo-swa-func

Remote: azure-samples-staging

Branch: pr/1403

You can initialize this project with:

azd init -t Azure-Samples/todo-python-mongo-swa-func -b pr/1403

View Changes | Compare Changes


Project: todo-python-mongo

Remote: azure-samples-staging

Branch: pr/1403

You can initialize this project with:

azd init -t Azure-Samples/todo-python-mongo -b pr/1403

View Changes | Compare Changes


@weikanglim weikanglim merged commit f9ffe94 into Azure:main Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants