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

mgmt, support function app on ACA #37890

Merged

Conversation

XiaofeiCao
Copy link
Contributor

@XiaofeiCao XiaofeiCao commented Dec 1, 2023

Description

address #37156

This PR adds support for Function App hosted on ACA(Azure Container App) environment.

FunctionApp functionApp = appServiceManager
    .functionApps()
    .define(webappName1)
    .withRegion(region)
    .withExistingResourceGroup(resourceGroup)
    // specifies the Azure Container Apps environment id
    .withManagedEnvironmentId(managedEnvironmentId)
    // scale settings
    .withMaxReplicas(10)
    .withMinReplicas(3)
    // docker image settings
    .withPublicDockerHubImage("mcr.microsoft.com/azure-functions/dotnet7-quickstart-demo:1.0")
    .create();

Above code corresponds to the http-trigger scenario.

managedEnvironmentName can't be modified once Function App's created.

docs:

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@XiaofeiCao XiaofeiCao added Mgmt This issue is related to a management-plane library. Mgmt - Track 2 labels Dec 1, 2023
@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-resourcemanager-appservice


private <T> Mono<T> pollResult(Mono<Response<T>> responseMono, Class<T> responseBodyType) {
return responseMono.flatMap((Function<Response<T>, Mono<T>>) response -> {
if (response.getStatusCode() == 200) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there constants for the status codes somewhere and if not wouldn't it make sense to introduce them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Switched to use directive and this method is no longer needed.

Yeah, it's a valid point. Will consider introducing if encountered next time, thanks!

Copy link
Member

@weidongxu-microsoft weidongxu-microsoft left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@weidongxu-microsoft weidongxu-microsoft left a comment

Choose a reason for hiding this comment

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

Approved to unblock.

Please check comment.

Also prefer to have tooling team take a look as well.

Copy link

@Flanker32 Flanker32 left a comment

Choose a reason for hiding this comment

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

LGTM

@XiaofeiCao XiaofeiCao merged commit 1a75d51 into Azure:main Dec 5, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mgmt - Track 2 Mgmt This issue is related to a management-plane library.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants