-
Notifications
You must be signed in to change notification settings - Fork 747
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
Bicep Deploy: add support to name deployments #8717
Conversation
@@ -124,6 +124,12 @@ export class DeployCommand implements Command { | |||
context | |||
); | |||
|
|||
const options = { | |||
title: `Please enter name for deployment`, | |||
value: "bicep_deployment_".concat(Date.now().toString()), |
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.
why not using "bicep_deployment_" + DateTime.UtcNow.ToString("yyyyMMddHHmmss") ?
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.
Also, can we add the bicep filename to start of this (trimmed and escaped if needed)?
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 updated to specify 'YYYYMMDDHHmmss' format. I checked az cli experience and looks like it just uses the file name for deployment. The changes in this PR match the existing behavior, except an option to accept name from the user.
I would like to keep this as is and wait for customer feedback. @StephenWeatherford, do you have any concerns?
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.
PC, Stephen and I discussed this offline and came up with <bicep_filename>_timestamp.
@bmoore-msft, could you please provide some input? I am trying to add support to accept deployment name from the user. By default, we want to prefil the input box with <bicep_filename>_timestamp. User can either use it or update the name. Does <bicep_filename>_timestamp sound like a good idea? Should we append timestamp to user provided input for uniqueness?
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.
This is for deploying directly from VSCode?
I think the main thing when deploying from the dev env is "debugging" so I would worry less about uninqueness (e.g. a really long timestamp) and more about ease of getting the results if needed. So might go with something like <filename>-MMDD-HHMM
but in general I think looks good.
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.
Thanks for the input @bmoore-msft. Yes, this is for deploying directly from VSCode.
I'll go ahead with <filename>-MMDD-HHMM
then. @StephenWeatherford, @puicchan, could you please +1?
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.
Looks good to me, or else <filename>-YYMMDD-HHMM
(added year)
You'll need to remove or substitute invalid characters from filename and trim if too long. Don't know max deployment name length.
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.
64 chars is the limit
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 logic to replace special characters with _ and trim here:
e3e1110
Please test that pressing escape correctly cancels the deployment. |
Tested this. Thanks! |
6cd354e
to
3daa366
Compare
Adds support to name deployments
Microsoft Reviewers: Open in CodeFlow