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

fix: add trailing newlines to make end-of-file-fixer happy #3699

Merged
merged 1 commit into from
Dec 12, 2022

Conversation

ZanSara
Copy link
Contributor

@ZanSara ZanSara commented Dec 12, 2022

Related Issues

Proposed Changes:

  • Right now PRs that affect the OpenAPI schema will fail because end-of-file-fixer will add a newline that is not present in main.
  • This PR adds such newline, fixing the conflict.

How did you test it?

  • CI

Notes for the reviewer

  • The OpenAPI schema workflow will fail. That is expected as long as the diff contains only the newline inserted by this PR.

Checklist

@ZanSara ZanSara requested a review from a team as a code owner December 12, 2022 12:20
@ZanSara ZanSara requested review from julian-risch and removed request for a team December 12, 2022 12:20
@ZanSara ZanSara added type:bug Something isn't working topic:rest_api journey:advanced ignore-for-release-notes PRs with this flag won't be included in the release notes. topic:CI labels Dec 12, 2022
Copy link
Member

@julian-risch julian-risch left a comment

Choose a reason for hiding this comment

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

LGTM! 👍 If I understand correctly, the problem with the missing new lines at the end of the file comes up now because we reenabled the precommit hooks? So there is nothing else that we need to do to prevent a similar problem in future? I just want to make sure that we won't need more of such manual adjustments of new lines at the end of files in future.

@ZanSara
Copy link
Contributor Author

ZanSara commented Dec 12, 2022

LGTM! +1 If I understand correctly, the problem with the missing new lines at the end of the file comes up now because we reenabled the precommit hooks? So there is nothing else that we need to do to prevent a similar problem in future? I just want to make sure that we won't need more of such manual adjustments of new lines at the end of files in future.

Exactly. This happens because the file is generated in CI, which does not run the pre-commit hooks. So this issue can surface only on generated files, which I believe right now is only this OpenAPI spec file (JSON schemas are already sorted). If you can recall any other file that we generate in CI, let's check if they also end without a trailing newline and fix those too. In the meantime I'm merging this!

@ZanSara ZanSara merged commit eba518a into main Dec 12, 2022
@ZanSara ZanSara deleted the eof-fixer-in-openapi-specs branch December 12, 2022 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ignore-for-release-notes PRs with this flag won't be included in the release notes. topic:CI topic:rest_api type:bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants