Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.
https://aka.ms/azd
MIT License
377 stars 173 forks source link

Run `azd pipeline config --provider azdo` pipeline missing Java SDK #3520

Open v-jiaodi opened 3 months ago

v-jiaodi commented 3 months ago

Describe the issue: Test todo-java-mongo template. Run azd pipeline config --provider azdo, get error as follow: image

Repro Steps:

  1. Login in with command: azd auth login.
  2. Execute command: azd init -t todo-java-mongo -b staging.
  3. Run azd pipeline config --provider azdo.

Environment:

Expected behavior: Run azd pipeline config --provider azdo, pipeline log can pass.

@rajeshkamal5050 for notification.

rajeshkamal5050 commented 3 months ago

@vhvb1989 can you triage this?

vhvb1989 commented 3 months ago

the pipeline definition uses:

  - task: JavaToolInstaller@0
    inputs:
      versionSpec: '17'
      jdkArchitectureOption: 'x64'
      jdkSourceOption: 'PreInstalled'

By using jdkSourceOption: 'PreInstalled', it relies on JAVA SDK to be already pre-installed on the agent, which is the case for Microsoft-hosted agents (https://learn.microsoft.com/azure/devops/pipelines/tasks/reference/java-tool-installer-v0?view=azure-pipelines#inputs)

It looks like the agent, in this case, doesn't have a pre-install JAVA sdk.

@v-jiaodi , can you show the output from JavaToolInstaller?:

image

Note: This is not azd or template's issue. This looks like an issue with the Azure DevOps instace configuration.

v-jiaodi commented 3 months ago

@vhvb1989 Output from JavaToolInstaller: image

zhangjiale-64 commented 2 months ago

We also encountered the same problem in this manual test.

Environment:

v-xuto commented 1 month ago

@rajeshkamal5050 In the latest round of azd manual testing (1.9.2), this issue still exists.