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

[Issue] Service skipped during azd deploy and not sure why #4605

Open
jongio opened this issue Dec 4, 2024 · 9 comments
Open

[Issue] Service skipped during azd deploy and not sure why #4605

jongio opened this issue Dec 4, 2024 · 9 comments

Comments

@jongio
Copy link
Member

jongio commented Dec 4, 2024

Output from azd version
Run azd version and copy and paste the output here:

1.11

Describe the bug

One of my services is being skipped, but I'm not sure why.

Image

To Reproduce

Run azd deploy with this

 

# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json

name: src
metadata:
  template: [email protected]
services:
  api:
    project: api
    host: containerapp
    language: dotnet
    docker:
      path: Dockerfile

  web:
    project: web
    host: containerapp
    language: ts
    dist: dist
    docker:
      path: Dockerfile
      buildArgs:
        - "VITE_API_URI"

Expected behavior

I expect it to deploy both. And if it skips one, it should tell me why.

Notes

If I manually run azd deploy api, it will deploy. but it doesn't work if I just run azd deploy.

Environment
Information on your environment:
* Language name and version
* IDE and version : [e.g. Visual Studio 16.3]

Additional context
Add any other context about the problem here.

@weikanglim
Copy link
Contributor

@jongio I'm wondering if you're seeing the CWD-sensitive behavior taking place here, i.e. when azd deploy is ran inside the web directory, azd deploy web will occur. I will admit that the UX here is confusing when the "skipped" is displayed.

@kristenwomack
Copy link
Collaborator

Thank you for logging this, I agree on the UX, we need more helpful guidance on why. @SophCarp - will you take a look at this?

@jongio
Copy link
Member Author

jongio commented Dec 6, 2024

FYI, I likely was running azd deploy from the /web dir.

@SophCarp
Copy link
Collaborator

SophCarp commented Dec 6, 2024

Thank you for logging this, I agree on the UX, we need more helpful guidance on why. @SophCarp - will you take a look at this?

Sure thing Kristen! What are the possible reasons for getting the "skipped" outcome? This time it looks like there was an issue with the directory, and that should probably be communicated to the user. Is that the only scenario or are there multiple? This doesn't look like it is an error, but maybe a warning could be used?

@SophCarp
Copy link
Collaborator

SophCarp commented Dec 6, 2024

Noting Wei brought up this conversation back in September: #4333

@jongio
Copy link
Member Author

jongio commented Dec 10, 2024

How about something like "**You ran azd from a subfolder, therefore other services were skipped".

@SophCarp
Copy link
Collaborator

Had a chat with @wbreza about the skipped scenarios:

Intended use case:

  • when a customer indicates they only want specific steps in a process to happen, all other steps are labeled "skipped".
  • When there are no changes in infrastructure to provision, the step may be labeled as "skipped"

Commands that this could happen in:

  • deploy
  • provision
  • package
  • restore
  • destroy

How to indicate you want items skipped:

  • pass in a specific service to deploy (i.e azd deploy api) and all other services are skipped.
  • Run command within the subfolder of the specific service rather than the root folder.

UX issue: customers might not realize that being in the subfolder affects the command.

Potential wordings:

  • Note: Command run from a subfolder, therefore all other services were skipped.
  • Note: Some services were skipped because command ran in a subfolder
  • Note: If you want all services to be processed, use the --all flag or run from the root folder
  • Note: [command] ran from subfolder [subfolder], so only services within the subfolder were processed.
  • Note: All services not in this subfolder were skipped. If you want these services processed, rerun the command either in the projects' root directory or with the '--all' flag
  • Note: Only services within this subfolder were processed. If you want all services processed, rerun the command either in the projects' root directory or with the '--all' flag

I think the last one is the most direct. @wbreza @ccbarragan any thoughts? I think this note only needs to be run during the subfolder scenario. If a service is being specified in the command the customer doesn't need the note.

@ccbarragan
Copy link
Member

@SophCarp One consideration: Because 'Skipped' is the label that specifically triggers the confusion, could be helpful to call it out explicitly so that users are able to better infer that the note relates to seeing '(Skipped)'. I like this first bit:

Note: Some services were skipped because the command ran in a subfolder....

otherwise I think your last edit speaks more directly to happened, so I think either way is good!

@weikanglim
Copy link
Contributor

weikanglim commented Dec 10, 2024

Love the conversation here @SophCarp @ccbarragan !

Looking at the overall scenario, I would love for us to treat azd package web (or azd package in ./web) as an equally important happy path (single service path) as azd package in root (all services path). The backstory here is that the single service path was introduced to support cases where a developer only works on web and doesn't touch other services. I have always wondered if we should structure the UX to reflect the fact that both are equally happy paths.

A small suggestion of mine below if it helps.

First, notice that when azd package executes on all services, we list each service in the command output indented:

Image

I wonder if we can simplify and lift this overall pattern of "Packaging service X" to become the full command output:

Image

The success message would also need slight tweaking -- this is where we could say something like: "Packaged api in the current directory", that provides more context here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants