-
Notifications
You must be signed in to change notification settings - Fork 142
Fix slot deploy context value not being used #4617
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: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,7 +106,11 @@ | |
} | ||
|
||
public async getBackupTemplateVersion(): Promise<string> { | ||
return (await AzExtFsExtra.readFile(await this.getBackupVersionPath())).toString().trim(); | ||
const versionContent = await AzExtFsExtra.readFile(await this.getBackupVersionPath()); | ||
if (!versionContent) { | ||
throw new Error(localize('backupVersionFileEmpty', 'Backup template version file is empty or could not be read')); | ||
Check failure on line 111 in src/templates/TemplateProviderBase.ts
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Missing import for localize function The code uses This will cause a compilation error. You need to add: import { localize } from '../localize'; at the top of the file with the other imports. Review generated with Copilot |
||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good: Fixed template version file error handling This change properly addresses Issue #4599 where The fix adds appropriate null/undefined checking before calling The error handling follows good practices:
Review generated with Copilot |
||
return versionContent.toString().trim(); | ||
} | ||
|
||
public async updateBackupTemplateVersion(version: 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.
Good: Fixed slot deploy context value usage
The PR correctly addresses the deploy command logic by using
expectedContextValue
when it's provided andarg1
is undefined. This ensures that slot deploys properly filter to show only deployment slots rather than all function apps.The addition of
pickFunctionApp
import and the conditional logic properly implements the intended behavior:expectedContextValue
is provided), use the filtered pickerThis fixes the issue where
deploySlot
command wasn't using its context filtering capability.Review generated with Copilot