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

Add extra guard clauses to deployment commands #815

Open
wants to merge 4 commits into
base: mwf/obliged-gold
Choose a base branch
from

Conversation

MicroFish91
Copy link
Contributor

@MicroFish91 MicroFish91 commented Dec 24, 2024

Close #773, #774

I think these guard clauses will improve reliability for the one click deploy commands.

Let me know if you disagree with having any of these guard clauses in place.

Update:
image
image

@MicroFish91 MicroFish91 marked this pull request as ready for review December 24, 2024 03:36
@MicroFish91 MicroFish91 requested a review from a team as a code owner December 24, 2024 03:36
@@ -25,6 +26,13 @@ export async function deployContainerApp(context: IActionContext, node?: Contain
const subscriptionContext: ISubscriptionContext = createSubscriptionContext(item.subscription);
const subscriptionActionContext: ISubscriptionActionContext = { ...context, ...subscriptionContext };

if (item.containerApp.revisionsMode === KnownActiveRevisionsMode.Multiple) {
throw new Error(localize('multipleRevisionsNotSupported', 'The container app "{0}" cannot be updated using "Deploy to Container App..." while in multiple revisions mode.', item.containerApp.name));
Copy link
Member

Choose a reason for hiding this comment

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

I think it'd be helpful to say how they can deploy it if not "Deploy to Container App." Same for the error below. I assume that you have to just right-click the specific revision or container depending on the scenario?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah good idea. I eventually would like to enable use of this command on the revisions directly, but I think that's a change for a future release

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