graalvm / setup-graalvm

GitHub Action for setting up GraalVM distributions.
https://www.graalvm.org
Universal Permissive License v1.0
195 stars 28 forks source link

1.1.8 not updating the Windows environment variables #88

Closed ArloL closed 8 months ago

ArloL commented 8 months ago

I am using the action like this on windows-latest:

- uses: graalvm/setup-graalvm@v1.1.7
  with:
    version: 22.2.0
    java-version: 17
    components: 'native-image'
    github-token: ${{ secrets.GITHUB_TOKEN }}
    cache: 'maven'

and now with 1.1.8 my windows setup stopped working.

My guess is that something is tripping up the required update to the environment variables which is still required with these older version graal versions I am sadly still stuck on.

The 1.1.7 log contains

Updating Windows environment...

while 1.1.8 does not.

Please let me know if I can provide more info.

PS Thanks for all the hard work maintaining open source software πŸ™πŸΌ

fniephaus commented 8 months ago

Thanks for the report, @ArloL!

and now with 1.1.8 my windows setup stopped working.

Could you provide us with a link to a failing build so that we can take a closer look?

fniephaus commented 8 months ago

Forgot to mention that there are some significant Windows enhancement since 22.2.0, so I recommend you upgrade to GraalVM for JDK like this:

- uses: graalvm/setup-graalvm@v1.1.7
  with:
    distribution: 'graalvm' # for Oracle GraalVM, 'graalvm-community' for CE
    java-version: '17'
    github-token: ${{ secrets.GITHUB_TOKEN }}
    cache: 'maven'
fniephaus commented 8 months ago

It seems this could be related to https://github.com/graalvm/setup-graalvm/commit/0fee1abbca81264b6090dedc29ae89311bb9185b. I will try and come up with a fix tomorrow.

fniephaus commented 8 months ago

I just pushed a fix for this to dev, you can try it out via uses: graalvm/setup-graalvm@dev.

ArloL commented 8 months ago

Thanks for the quick reply ☺️

This is the build in question: https://github.com/ArloL/chorito/actions/runs/8016511422/job/21923586863?pr=320

I would love to use the latest graalvm and java 21 but I am sadly hitting this issue https://github.com/oracle/graal/issues/6793

Sadly @dev also does not update the windows environment: https://github.com/ArloL/chorito/actions/runs/8244996369/job/22548159025

fniephaus commented 8 months ago

I think I found the issue: javaVersion === javaVersion is always true: https://github.com/graalvm/setup-graalvm/blob/5393c3d80982e8a7fa61005137824ef53731ff9a/src/msvc.ts#L35

Will fix...

fniephaus commented 8 months ago

Ok, I think I got it. Could you please restart your build that runs against @dev?

bhavikp19 commented 8 months ago

@fniephaus I can confirm that my windows build was also failing but now it is working if I use @dev. Thank you so much for looking into this and providing the fix.

ArloL commented 8 months ago

Thanks, @fniephaus and @bhavikp19. I too can confirm that it works: https://github.com/ArloL/chorito/actions/runs/8244996369/job/22571412312

fniephaus commented 8 months ago

The fix is merged and available via v1.1.8.2 and v1.

ArloL commented 8 months ago

Thanks, @fniephaus. I am not sure but I think dependabot will not update to 1.1.8.2. I tried recreating the PR: https://github.com/ArloL/chorito/pull/320#issuecomment-1992097884 but the build still just used 1.1.8. I will wait and see if dependabot will open a new PR.

fniephaus commented 8 months ago

Why will dependabot not update to that version? Do we need to bump the patch version?

fniephaus commented 8 months ago

I just bumped the version to v1.1.9. Let me know if dependabot picks it up :)

ArloL commented 8 months ago

Thanks. Now dependabot closed the 1.1.8 issue and opened another PR for 1.1.9: https://github.com/ArloL/chorito/pull/333

I am not sure why exactly that is necessary to be honest. My guess is that they only check for x.y.z version schemes and not x.y.z.a

fniephaus commented 8 months ago

Thanks for confirming! We'll keep this in mind and always push patch updates.