-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add extension version support to Azure App Service Manage task #21038
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
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: miricdavid <[email protected]>
Co-authored-by: miricdavid <[email protected]>
@@ -67,6 +67,7 @@ async function run() { | |||
let targetSlot: string = tl.getInput('TargetSlot', false); | |||
let preserveVnet: boolean = tl.getBoolInput('PreserveVnet', false); | |||
let extensionList = tl.getInput('ExtensionsList', false); | |||
let extensionVersions = tl.getInput('ExtensionVersions', false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Let's not add ExtensionVersions and extend ExtensionsList instead by supporting version suffix in brackets.
Like this: ExtensionsList: 'Microsoft.AspNetCore.AzureAppServices.SiteExtension(latest),AspNetCoreRuntime.6.0.x64(6.0.5)'. Also make suffix optional and keep old logic to be executed in that case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the ExtensionVersions input and updated the implementation to support version suffix in brackets: Microsoft.AspNetCore.AzureAppServices.SiteExtension(latest),AspNetCoreRuntime.6.0.x64(6.0.5)
. I've also maintained backward compatibility for extensions without version suffix. This change is implemented in commit d4cb851.
siteExtensionDetails = await this._appServiceKuduService.installSiteExtension(extensionID, version); | ||
} catch (error) { | ||
// If version parameter is not supported, try without it | ||
console.log(`Installing extension with version specification failed. Attempting without version specification.`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add telemetry log here in case of an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added telemetry logging in catch blocks when extension installation with version specification fails. The telemetry includes the extension ID and version that failed to install. This change is in commit d4cb851.
outputVariables = outputVariables ? outputVariables : []; | ||
extensionVersions = extensionVersions ? extensionVersions : []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cover all changes with feature flag named "AzureAppServiceManageV0.ExtensionVersionSupport"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added the feature flag "AzureAppServiceManageV0.ExtensionVersionSupport" and wrapped all extension version support functionality with conditional checks based on this flag. This ensures the new behavior is only enabled when the feature flag is active. This change is in commit d4cb851.
Co-authored-by: miricdavid <[email protected]>
@@ -67,7 +67,7 @@ async function run() { | |||
let targetSlot: string = tl.getInput('TargetSlot', false); | |||
let preserveVnet: boolean = tl.getBoolInput('PreserveVnet', false); | |||
let extensionList = tl.getInput('ExtensionsList', false); | |||
let extensionVersions = tl.getInput('ExtensionVersions', false); | |||
let extensionVersions = undefined; // ExtensionVersions removed as requested in PR feedback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line as unused now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the unused line as requested in commit 4315c9e.
@@ -43,7 +44,7 @@ export class KuduServiceUtils { | |||
|
|||
public async installSiteExtensions(extensionList: Array<string>, outputVariables?: Array<string>, extensionVersions?: Array<string>): Promise<void> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove extensionVersions as we don't use that parameter and info about version will optionally provided within extensionList in brackets so extract it from there. And update all added code so far according to that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the extensionVersions parameter and updated the code to extract version information only from the extension IDs using the bracket format in commit 4315c9e. I've removed the parameter from the function signature and the function call, while maintaining all the version parsing logic that extracts versions from extension IDs.
Co-authored-by: miricdavid <[email protected]>
Hi @copilot Task Name: AzureAppServiceManageV0 Feature Request Summary:
Additional Requirements:
Implementation Guidelines:
|
Co-authored-by: rm-dmiri <[email protected]>
Co-authored-by: rm-dmiri <[email protected]>
... I've implemented the extension version support from scratch based on your updated requirements. The implementation:
The changes are available in commits 46d6b07 and 91e3326. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Changes
This PR adds the ability to specify extension versions when using the "Install Extensions" action in the AzureAppServiceManageV0 task. This allows users to:
Implementation Details
extensionId@version
latest
keyword which will always update to the latest versionExample Usage
Fixes #21004.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
cdn.fwupd.org
/usr/bin/fwupdmgr refresh
(dns block)pkgs.dev.azure.com
npm install
(dns block)npm install minimist
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.