azure-dev icon indicating copy to clipboard operation
azure-dev copied to clipboard

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

Open v-jiaodi opened this issue 1 year ago • 4 comments

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:

  • Template: todo-java-mongo.
  • OS: Windows, Mac, Codespace, Linux, DevContainer
  • Azd version : 1.7.0-beta.1-daily.3582348 (commit https://github.com/Azure/azure-dev/commit/9a0cef9c79d83a5f3fe8cb8bc407a200139da62b)

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

@rajeshkamal5050 for notification.

v-jiaodi avatar Mar 12 '24 10:03 v-jiaodi

@vhvb1989 can you triage this?

rajeshkamal5050 avatar Mar 12 '24 13:03 rajeshkamal5050

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.

vhvb1989 avatar Mar 12 '24 19:03 vhvb1989

@vhvb1989 Output from JavaToolInstaller: image

v-jiaodi avatar Mar 13 '24 02:03 v-jiaodi

We also encountered the same problem in this manual test.

Environment:

  • Template: todo-java-postgresql-terraform.
  • OS: DevContainer
  • Azd version: azd version 1.8.0-beta.1-daily.3649348 (commit https://github.com/Azure/azure-dev/commit/85f86be69c647f62cab6f5e42988d19df8bff03f)

zhangjiale-64 avatar Apr 03 '24 08:04 zhangjiale-64

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

  • Templates+OS: todo-java-postgresql-terraform (Devcontainer), ASA-Samples-Event-Driven-Application (Devcontainer), todo-java-mongo (Codespace)
  • Branch: staging
  • Azd version: azd version 1.10.0-beta.1-daily.3792048 (commit 13a7dd52710daa4ac5f0c17be6a77244005ac76e)

v-xuto avatar May 16 '24 09:05 v-xuto

@jongio For the full regression test of PR3976, this issue still exists.

  • Templates: todo-java-mongo
  • OS: Windows, Codespaces, Devcontainer, Linux, Mac
  • Branch: staging and pr/3976
  • Azd version: azd version 1.10.0-beta.1-daily.3947259 (commit 5bf8568b1566723be8bc2259c578df4f931cf430)

Menghua1 avatar Jul 11 '24 07:07 Menghua1

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

  • Templates+OS: todo-java-mogno(Cloud Shell and Codespaces), ASA-Samples-Event-Driven-Application (Devcontainer).
  • Branch: staging.
  • Azd version: azd version 1.10.0-beta.1-daily.4086794 (commit 9445b193c91acfa2d4bcae129cb7471ecc101e11).

Menghua1 avatar Aug 30 '24 08:08 Menghua1

@jongio For the full regression test of PR4258, this issue still exists.

  • Templates: todo-java-mongo
  • OS: Windows, Codespaces, Devcontainer, Linux, Mac
  • Branch: staging
  • Azd version: azd version 1.11.0-beta.1-pr.4140256 (commit b6402defbf4c4210855e14c114988010e0a51ed7) and azd version 1.11.0-beta.1-daily.4152592 (commit e2ff8ba7dcc5b3f7e883213a2315a8b275294def)

Menghua1 avatar Sep 19 '24 10:09 Menghua1

Does this repro in main?

jongio avatar Sep 20 '24 16:09 jongio

@jongio Yes, this issue can also be reproduced in main. We tested the following four scenarios and they can all be reproduced:

  • Templates: todo-java-mongo
  • OS: Windows, Codespaces, Devcontainer, Linux, Mac
  • Test Scenario:
  1. Templates under the main branch + azd version 1.11.0-beta.1-daily.4152592 (commit e2ff8ba7dcc5b3f7e883213a2315a8b275294def).
  2. Templates under the main branch + azd version 1.11.0-beta.1-pr.4140256 (commit b6402defbf4c4210855e14c114988010e0a51ed7).
  3. Templates under the staging branch + azd version 1.11.0-beta.1-daily.4152592 (commit e2ff8ba7dcc5b3f7e883213a2315a8b275294def).
  4. Templates under the staging branch + azd version 1.11.0-beta.1-pr.4140256 (commit b6402defbf4c4210855e14c114988010e0a51ed7).

Menghua1 avatar Sep 23 '24 09:09 Menghua1

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

  • Templates+OS: todo-java-mogno(Cloud Shell and Codespaces), ASA-Samples-Event-Driven-Application (Devcontainer).
  • Branch: staging.
  • Azd version: azd version 1.11.0-beta.1-daily.4152592 (commit e2ff8ba7dcc5b3f7e883213a2315a8b275294def).

Menghua1 avatar Sep 27 '24 06:09 Menghua1

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

  • Templates: todo-java-mogno.
  • OS: Cloud Shell, Codespaces.
  • Branch: Staging.
  • Azd version: azd version 1.11.0-beta.1-daily.4247716 (commit https://github.com/Azure/azure-dev/commit/f4695c408eab9ea3cdedd1c3cb39aa01ad90123e).

Menghua1 avatar Oct 31 '24 07:10 Menghua1

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

  • Templates: todo-java-mogno.
  • OS: Cloud Shell, Codespaces.
  • Branch: Staging.
  • Azd version: azd version 1.12.0-beta.1-daily.4359062 (commit https://github.com/Azure/azure-dev/commit/6cd82ae9ff02e156a0056e994215191469442ab3).

Menghua1 avatar Nov 28 '24 09:11 Menghua1

It cannot be reproduced, I will close this issue.

Menghua1 avatar Jan 23 '25 10:01 Menghua1