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

Flex Deployment Changes #3625

Merged
merged 11 commits into from
Mar 21, 2024
Merged

Flex Deployment Changes #3625

merged 11 commits into from
Mar 21, 2024

Conversation

khkh-ms
Copy link
Contributor

@khkh-ms khkh-ms commented Mar 15, 2024

Issue describing the changes in this PR

resolves #issue_for_this_pr

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests)

string functionAppString = JsonConvert.SerializeObject(functionApp);

url = new Uri($"{managementURL}{site.SiteId}?api-version={ArmUriTemplates.FlexApiVersion}");
await ArmHttpAsyncForFlex(new HttpMethod("PATCH"), url, accessToken, functionApp);
Copy link
Contributor

Choose a reason for hiding this comment

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

AFAIK, we currently can't do a PATCH request to update attributes, we'll need to do a PUT.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @kamperiadis! Can you please share the recommended API. I got it from my local AZ CLI copy which was using Patch. Interestingly, it is actually working in beta :).

Copy link
Contributor

Choose a reason for hiding this comment

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

I just confirmed with David today - we did not do any implementation changes for PATCH, which might be missing things like blocking unsupported configs in the Site object. I would not suggest using PATCH. Instead, we should be doing a GET call to the function app and then do a PUT request with that same function app object but with the updated values.

Not sure what Az CLI copy you have but for flex specifically, the Az CLI makes PUT calls when updating the runtime.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed it to us PUT instead of PATCH.

string functionAppString = JsonConvert.SerializeObject(functionApp);

url = new Uri($"{managementURL}{site.SiteId}?api-version={ArmUriTemplates.FlexApiVersion}");
await ArmHttpAsyncForFlex(new HttpMethod("PATCH"), url, accessToken, functionApp);
Copy link
Contributor

Choose a reason for hiding this comment

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

I just confirmed with David today - we did not do any implementation changes for PATCH, which might be missing things like blocking unsupported configs in the Site object. I would not suggest using PATCH. Instead, we should be doing a GET call to the function app and then do a PUT request with that same function app object but with the updated values.

Not sure what Az CLI copy you have but for flex specifically, the Az CLI makes PUT calls when updating the runtime.

@khkh-ms khkh-ms merged commit 591b8ae into v4.x Mar 21, 2024
2 checks passed
@khkh-ms khkh-ms deleted the khkh/flex-public branch March 21, 2024 08:07
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.

2 participants