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

AzureFunctionAppContainer@1 sets WEBSITES_ENABLE_APP_SERVICE_STORAGE to false even if user provides 'appSettings: -WEBSITES_ENABLE_APP_SERVICE_STORAGE true' #14857 #15252

Merged
merged 8 commits into from
Oct 19, 2021

Conversation

PhilipsonJoseph
Copy link
Contributor

…provides on AppSettings is fixes

Task name: AzureFunctionAppContainerV1

Description: When user tries to set website enable app service storage in app setting is failed due to default setting on code. now it was changed to check if the default setting is overridden by customer. if overridden then we consider that as priority

Documentation changes required: (Y/N) N

Added unit tests: (Y/N) N

Attached related issue: (Y/N) N

Checklist:

  • Task version was bumped - please check instruction how to do it
  • Checked that applied changes work as expected

@ghost
Copy link

ghost commented Sep 3, 2021

CLA assistant check
All CLA requirements met.

@PhilipsonJoseph PhilipsonJoseph changed the title Users/v phiv/task issue fix 14857 Users/v phiv/task issue fix 14857 #14857 Sep 13, 2021
@PhilipsonJoseph PhilipsonJoseph changed the title Users/v phiv/task issue fix 14857 #14857 AzureFunctionAppContainer@1 sets WEBSITES_ENABLE_APP_SERVICE_STORAGE to false even if user provides 'appSettings: -WEBSITES_ENABLE_APP_SERVICE_STORAGE true' #14857 Sep 13, 2021
@@ -48,8 +49,10 @@ export class AzureFunctionOnContainerDeploymentProvider{

let containerDeploymentUtility: ContainerBasedDeploymentUtility = new ContainerBasedDeploymentUtility(this.appService);
await containerDeploymentUtility.deployWebAppImage(this.taskParams);

this.taskParams.AppSettings = this.taskParams.AppSettings ? this.taskParams.AppSettings.trim() + " " + linuxFunctionStorageSetting : linuxFunctionStorageSetting;
const linuxFunctionStorageSetting: string = `${linuxFunctionStorageSettingName} ${linuxFunctionStorageSettingValue}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: You can set value of linuxFunctionStorageSetting based on this.taskParams.AppSettings.indexOf(linuxFunctionStorageSettingName) < 0

const linuxFunctionStorageSetting: string = '';
if (this.taskParams.AppSettings.indexOf(linuxFunctionStorageSettingName) < 0) {
    linuxFunctionStorageSetting = `${linuxFunctionStorageSettingName} ${linuxFunctionStorageSettingValue}`;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@AmrutaKawade As suggested Changed the code to set linuxFunctionStorageSetting based on condition

@PhilipsonJoseph PhilipsonJoseph merged commit 8934f16 into master Oct 19, 2021
@PhilipsonJoseph PhilipsonJoseph deleted the users/v-phiv/task_issue_fix_14857 branch October 19, 2021 06:13
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.

3 participants