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

Remove codeowners validator from pre-commit #3762

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

sarayourfriend
Copy link
Collaborator

Fixes

Fixes and issue reported by @dhruvkb and @stacimc they had running the pre-commit hook on their local machines.

Description

The docker image has issues running on arm64, so we will instead run it in CI using the GitHub action, with an utility just recipe to run the same checks locally as needed.

I also updated the CI/CD documentation to explain the new job and document the lint-codeowners recipe.'

Marked high because it is affecting the ability for folks to work on the codebase without this tedious interruption.

Testing Instructions

CI should pass with the new job and the just lint-codeowners recipe should work, including just lint-codeowners all to enable the experimental checks.

Checklist

  • My pull request has a descriptive title (not a vague title likeUpdate index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • [N/A] I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.
  • [N/A] I ran the DAG documentation generator (if applicable).

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

The docker image has issues running on arm64, so we will instead run it in CI using the GitHub action, with an utility just recipe to run the same checks locally as needed
@sarayourfriend sarayourfriend added 🟧 priority: high Stalls work on the project or its dependents 🛠 goal: fix Bug fix 🤖 aspect: dx Concerns developers' experience with the codebase 🧱 stack: mgmt Related to repo management and automations labels Feb 7, 2024
@sarayourfriend sarayourfriend marked this pull request as ready for review February 7, 2024 00:30
@sarayourfriend sarayourfriend requested a review from a team as a code owner February 7, 2024 00:30
Copy link

github-actions bot commented Feb 7, 2024

Full-stack documentation: https://docs.openverse.org/_preview/3762

Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again.

You can check the GitHub pages deployment action list to see the current status of the deployments.

Changed files 🔄:

Copy link
Collaborator

@AetherUnbound AetherUnbound left a comment

Choose a reason for hiding this comment

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

LGTM and runs locally! Thanks for adding the documentation too.

Copy link
Contributor

@obulat obulat left a comment

Choose a reason for hiding this comment

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

Thank you for the workaround, documentation and separate just command.

just lint-codeowners does not work for me for the same reasons:

just lint-codeowners                                                                  1 ✘  06:53:54 
docker run --rm -u 1000:1000 -v $PWD:/src:rw,Z --workdir=/src -e REPOSITORY_PATH="." -e CHECKS="files,duppaterns,syntax"  ghcr.io/mszostok/codeowners-validator:v0.7.4
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
qemu: uncaught target signal 11 (Segmentation fault) - core dumped

@sarayourfriend
Copy link
Collaborator Author

Yes, that's precisely the issue with arm64 that Staci and Dhruv ran into that caused us to need to switch away from running it locally in pre-commit. The recipe is there for folks who can run it to be able to easily do so, which the documentation notes:

It is still possible to run this hook locally, assuming the docker image works on your computer’s architecture, by invoking the lint-codeowners just recipe:

(Emphasis mine)

In other words, that's intended behaviour :)

Thanks for the reviews, y'all!

@sarayourfriend sarayourfriend merged commit dcbee23 into main Feb 7, 2024
74 checks passed
@sarayourfriend sarayourfriend deleted the change/codeowners-ci-only branch February 7, 2024 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 aspect: dx Concerns developers' experience with the codebase 🛠 goal: fix Bug fix 🟧 priority: high Stalls work on the project or its dependents 🧱 stack: mgmt Related to repo management and automations
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants