Skip to content

Moved Renovate config validation to CI #931

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

jamesbraza
Copy link
Collaborator

Seen in this CI run:

[INFO] Installing environment for https://github.com/renovatebot/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/home/runner/.cache/pre-commit/repokcq29hi0/node_env-system/bin/node', '/usr/local/bin/npm', 'install', '-g', '/home/runner/.cache/pre-commit/repokcq29hi0/dummy_package-0.0.0.tgz', '[email protected]')
return code: 1
stdout: (none)
stderr:
    npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
    npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
    npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
    npm warn deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
    npm error code E403
    npm error 403 403 Forbidden - GET https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz
    npm error 403 In most cases, you or one of your dependencies are requesting
    npm error 403 a package version that is forbidden by your security policy, or
    npm error 403 on a server you do not have access to.
    npm error A complete log of this run can be found in: /home/runner/.npm/_logs/2025-04-01T16_40_57_624Z-debug-0.log
Check the log at /home/runner/.cache/pre-commit/pre-commit.log

We don't need Renovate config validation in pre-commit, let's just move to lint CI

@jamesbraza jamesbraza added the bug Something isn't working label Apr 1, 2025
@jamesbraza jamesbraza self-assigned this Apr 1, 2025
@Copilot Copilot AI review requested due to automatic review settings April 1, 2025 16:49
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Apr 1, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR moves Renovate configuration validation from pre-commit to CI to avoid issues like npm access errors during local commits.

  • Removed the Renovate config validator hook from .pre-commit-config.yaml
  • Added a new CI step in .github/workflows/tests.yml to run the Renovate config validator

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.pre-commit-config.yaml Removed the Renovate config validator hook
.github/workflows/tests.yml Added a CI step to run the Renovate config validator
Comments suppressed due to low confidence (1)

.github/workflows/tests.yml:40

  • Consider adding tests to verify the behavior of the new Renovate config validator step in CI, especially to confirm it handles failure scenarios as expected.
- uses: suzuki-shunsuke/[email protected]

@jamesbraza
Copy link
Collaborator Author

Well, we still get the 403 that I was hoping this PR would work around:

===> npx --yes --package "renovate" -c "renovate-config-validator --strict  .github/renovate.json5"
npm error code E403
npm error 403 403 Forbidden - GET https://registry.npmjs.org/camelcase
npm error 403 In most cases, you or one of your dependencies are requesting
npm error 403 a package version that is forbidden by your security policy, or
npm error 403 on a server you do not have access to.
npm error A complete log of this run can be found in: /home/runner/.npm/_logs/2025-04-01T16_[51](https://github.com/Future-House/paper-qa/actions/runs/14201365469/job/39788891207#step:8:53)_13_434Z-debug-0.log

But, let's still go with this why not

@nadolskit
Copy link
Contributor

@jamesbraza fwiw, this failure is happening from npm having issues today
npm/cli#8203

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants