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

Post Setup JDK 17 takes very long time on local runner #683

Open
3 tasks
MartynasObdeleven opened this issue Sep 11, 2024 · 5 comments
Open
3 tasks

Post Setup JDK 17 takes very long time on local runner #683

MartynasObdeleven opened this issue Sep 11, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@MartynasObdeleven
Copy link

Description:
I have a build script that is run on each PR. It launches appium test suite, which takes approximately 4 minutes to complete,
but after that Post Setup JDK 17 takes more than 10 minutes which is strange, since we're using m1 mac studio.
Job looks like:

name: Appium Tests

on:
  push:
    branches:
      - "develop"
  pull_request:
    branches:
      - "main"
      - "develop"

jobs:
  appium-tests:
    runs-on: [self-hosted, macOS, ARM64]

    steps:
      - uses: actions/checkout@v4.1.7

      - name: Set up JDK 17
        uses: actions/setup-java@v4.3.0
        with:
          java-version: '17'
          distribution: 'zulu'
          cache: gradle

      - name: Grant execute permission for gradlew
        run: chmod +x gradlew

      - name: Appium Tests (E2E)
        run: |
          chmod +x run_offline_appium_tests.sh
          ./run_offline_appium_tests.sh
        working-directory: scripts

Here's timeline:
image

Task version:
4.3.0

Platform:

  • Ubuntu
  • [x ] macOS
  • Windows

Runner type:

  • Hosted
  • [ x] Self-hosted

Expected behavior:
Post Setup takes no more than minute.

Actual behavior:
Post Setup takes 10+ minutes.

@MartynasObdeleven MartynasObdeleven added bug Something isn't working needs triage labels Sep 11, 2024
@aparnajyothi-y
Copy link
Contributor

Hello @MartynasObdeleven, Thank you for creating this issue and we will look into it :)

@choppeh
Copy link

choppeh commented Sep 16, 2024

v3 is also very slow with JDK 17. Is the cache size Ok?

@choppeh
Copy link

choppeh commented Sep 16, 2024

I removed cache: gradle and the step was quickly completed

@MartynasObdeleven
Copy link
Author

I had setup java on local machine so it runs fine with:

name: Appium Tests

on:
  push:
    branches:
      - "develop"
  pull_request:
    branches:
      - "main"
      - "develop"

jobs:
  appium-tests:
    runs-on: [self-hosted, macOS, ARM64]

    steps:
      - uses: actions/checkout@v4.1.7

      - name: Grant execute permission for gradlew
        run: chmod +x gradlew

      - name: Appium Tests (E2E)
        run: |
          chmod +x run_offline_appium_tests.sh
          ./run_offline_appium_tests.sh
        working-directory: scripts

@mahalakshmi-rekadi
Copy link

Hello @MartynasObdeleven,
Thank you for bringing this issue to our attention. It appears that the post-setup step for JDK 17 is taking an unusually long time, even though the Appium test suite completes in about 4 minutes. Here are a few points to consider:

1.It looks like the cache size in your workflow is around 6GB (~6353 MB). This could be the reason why the "Post Setup JDK 17" step is taking more than 10 minutes to complete, especially since you're using an M1 Mac Studio, which should be quite fast.

2.To verify if the cache is causing the delay, I recommend running the same workflow without caching. You can do this by removing the cache configuration from the actions/setup-java step. This will help determine if the cache is indeed the factor slowing down the process. If the steps complete more quickly without the cache, you may need to optimize the caching strategy.

If the issue persists, kindly provide us with more detailed logs or a public repository to facilitate further investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants