Giter Site home page Giter Site logo

Can't run action on GHES about pmd-github-action HOT 9 CLOSED

pmd avatar pmd commented on June 15, 2024
Can't run action on GHES

from pmd-github-action.

Comments (9)

mvcmania avatar mvcmania commented on June 15, 2024 1

By the way, i have already tried the fix that you have just created, it is working like a charm. Thank you. All errors are gone!

from pmd-github-action.

mvcmania avatar mvcmania commented on June 15, 2024

analyzeModifiedFilesOnly : false

from pmd-github-action.

adangel avatar adangel commented on June 15, 2024

I think the message "Error: Not Found" is the response from github API when determining the latest PMD version.

The action tries to request https://api.github.com/repos/pmd/pmd/releases/latest - which seems to have failed.

We definitely can improve the error message here...

Does this problem persist? Maybe it was just a temporary problem....

from pmd-github-action.

mvcmania avatar mvcmania commented on June 15, 2024

Hey @adangel thanks for quick response, unfortunately it seems like a persistent but what you have said triggered a point, so im running the github action on enterprise instance where we have self-hosted runners , im suspecting , maybe the endpoint that you mentioned is not reachable under the self-hosted runner. Sounds quite unlikely but , it might be the root cause.

from pmd-github-action.

adnansakel avatar adnansakel commented on June 15, 2024

Hi @adangel I could curl the url https://api.github.com/repos/pmd/pmd/releases/latest from our self hosted runner. But we get that Not Found error persistently.

from pmd-github-action.

adangel avatar adangel commented on June 15, 2024

Hm... I'm having a suspicion, what's happening here: We use the "hydrated" github client from the actions-toolkit. "hydrated" means, it uses not necessarily api.github.com as baseurl, but your GHES url - and on your github enterprise server, there is no pmd/pmd repository.

I think, we use this url: https://github.com/actions/toolkit/blob/457303960f03375db6f033e214b9f90d79c3fe5c/packages/github/src/internal/utils.ts#L23-L25

In case of GHES, the environment variable GITHUB_API_URL will be set and we don't query api.github.com anymore....

from pmd-github-action.

mvcmania avatar mvcmania commented on June 15, 2024

Hi @adangel , latest update :)
We have mirrored pmd/pmd repo along with releases and tags into our GHES and we were able to pass ther "Error : NOT found" problem, we ended up another problem though which completely different. Im posting here in case you might need to fix the problem
Screenshot 2023-03-17 at 16 46 43

from pmd-github-action.

adangel avatar adangel commented on June 15, 2024

It seems, the downloaded releases zip file is corrupt. You can try to download manually the URL, that is printed in the debug output (##[debug]Downloading https....) and verify e.g. with zipinfo that this is indeed a PMD releases archive.
You can also compare this file with the one on https://github.com/pmd/pmd/releases/download/pmd_releases%2F6.55.0/pmd-bin-6.55.0.zip

The sha256sum of that file should be 1acf96d43cb40d591cacccc1c20a66fc796eaddf69ea61812594447bac7a11d pmd-bin-6.55.0.zip.

Maybe something went wrong when mirroring pmd/pmd?

Anyway, my PR #175 will use api.github.com to access the latest release.
If you want, you can try out the fix:

- uses: adangel/pmd-github-action@issue-173

from pmd-github-action.

adangel avatar adangel commented on June 15, 2024

By the way, i have already tried the fix that you have just created, it is working like a charm. Thank you. All errors are gone!

Thanks for testing! 👍

from pmd-github-action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.