megalinter icon indicating copy to clipboard operation
megalinter copied to clipboard

[Bug] Github Actions - 404 Network Errors Encountered with MegaLinter URLs

Open byangtri opened this issue 2 years ago • 3 comments

Describe the bug Encountered 404 network errors related to URLs when running the MegaLinter action in Github Actions workflow

To Reproduce Steps to reproduce the behavior:

  1. Go to https://github.com/oxsecurity/megalinter?tab=readme-ov-file#github-action
  2. Create a new file in your repository called .github/workflows/mega-linter.yml
  3. Copy the example workflow from below into that new file, no extra configuration required
  4. Commit that file to a new branch
  5. Open up a pull request and observe the action workingCreate a new file in your repository called .github/workflows/mega-linter.yml

Expected behavior I expected MegaLinter to successfully fetch configuration and flavor information from the URLs provided without encountering a 404 error.

Screenshots

❌ Linted [SPELL] files with [lychee]: Found 3 error(s) - (0.24s) (expand for details)
  - Using [lychee v0.15.1] https://megalinter.io/7.12.0/descriptors/spell_lychee
  - MegaLinter key: [SPELL_LYCHEE]
  - Rules config: identified by [lychee]
  - Number of files analyzed: [2]
  --Error detail:
  ✗ [404] https://megalinter.io/configuration/ | Failed: Network error: Not Found
  ✗ [404] https://megalinter.io/flavors/ | Failed: Network error: Not Found
  ✗ [404] https://megalinter.io/configuration/ | Failed: Network error: Not Found
  📝 Summary
  ---------------------
  🔍 Total............4
  ✅ Successful.......1
  ⏳ Timeouts.........0
  🔀 Redirected.......0
  👻 Excluded.........0
  ❓ Unknown..........0
  🚫 Errors...........3
  
  Errors in .github/workflows/mega-linter.yml
  ✗ [404] https://megalinter.io/flavors/ | Failed: Network error: Not Found
  ✗ [404] https://megalinter.io/configuration/ | Failed: Network error: Not Found
  
  Errors in .mega-linter.yml
  ✗ [404] https://megalinter.io/configuration/ | Failed: Network error: Not Found

Additional context MegaLinter version: v7.12.0 Operating system: Github Hosted Runner, Ubuntu 22.04

byangtri avatar Jun 24 '24 18:06 byangtri

Issue is the mega linter workflow comments are pointing to https://megalinter.io/flavors/ and https://megalinter.io/configuration/, we need to update the URL to point to latest

byangtri avatar Jun 24 '24 18:06 byangtri

@byangtri thanks for reporting :) There is a redirection from those urls... but technically it starts with a 404, that's why lychee declares them as error

We should indeed update them to use https://megalinter.io/latest/flavors/ and https://megalinter.io/latest/configuration/ :)

Would you like to make a PR ? :)

nvuillam avatar Jun 24 '24 19:06 nvuillam

Wasn't there an issue once with some churn happening in between releases, or that older versions didn't point to their version of the docs?

echoix avatar Jun 24 '24 19:06 echoix