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

Integrate the add_header script in the CI/CD #4980

Closed
joeldierkes opened this issue Nov 5, 2021 · 0 comments · Fixed by #5109
Closed

Integrate the add_header script in the CI/CD #4980

joeldierkes opened this issue Nov 5, 2021 · 0 comments · Fixed by #5109
Assignees
Milestone

Comments

@joeldierkes
Copy link
Contributor

Motivation

Since the PR #4903 the add_header script can check for changes and return a non-zero exit code if there would be any changes in the header comment. We can include the script in the workflow and check for inconsistent headers automatically.

Modification

Run the add_header script with the --dry-run and --check option on changed python files in the workflow.

@joeldierkes joeldierkes self-assigned this Nov 5, 2021
@bari12 bari12 added Testing and removed enhancement labels Nov 8, 2021
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Dec 13, 2021
The `add_header` script needs to be run after an edit to determine the status of
the header and, if necessary, change the header.

This commit adds the check for the header to the CI/CD. This enforces the usage
of the `add_header` script and ensures a healthy code base.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Dec 13, 2021
The headers in this project are automatically generated. A script uses the git
history to determine the current header.

Since a lot of developers did not run the script, the current state of the
repository and the desired one are different. This commit sets all the headers
to the desired state.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Dec 13, 2021
The `add_header` sript prints the correct header for a file if the `--in-place`
argument is not provided. This is a good way to see changes, however due to this
the output of the CI/CD is too verbose.

This commit disables the output of the output of the correct header, if the
`--check` option is provided. It also displays the number of files checked.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Dec 16, 2021
The `add_header` script needs to be run after an edit to determine the status of
the header and, if necessary, change the header.

This commit adds the check for the header to the CI/CD. This enforces the usage
of the `add_header` script and ensures a healthy code base.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Dec 16, 2021
The `add_header` sript prints the correct header for a file if the `--in-place`
argument is not provided. This is a good way to see changes, however due to this
the output of the CI/CD is too verbose.

This commit disables the output of the output of the correct header, if the
`--check` option is provided. It also displays the number of files checked.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Dec 16, 2021
The headers in this project are automatically generated. A script uses the git
history to determine the current header.

Since a lot of developers did not run the script, the current state of the
repository and the desired one are different. This commit sets all the headers
to the desired state.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Dec 16, 2021
The headers in this project are automatically generated. A script uses the git
history to determine the current header.

Since a lot of developers did not run the script, the current state of the
repository and the desired one are different. This commit sets all the headers
to the desired state.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Dec 16, 2021
The `add_header` script needs to be run after an edit to determine the status of
the header and, if necessary, change the header.

This commit adds the check for the header to the CI/CD. This enforces the usage
of the `add_header` script and ensures a healthy code base.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Dec 16, 2021
The `add_header` sript prints the correct header for a file if the `--in-place`
argument is not provided. This is a good way to see changes, however due to this
the output of the CI/CD is too verbose.

This commit disables the output of the output of the correct header, if the
`--check` option is provided. It also displays the number of files checked.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Dec 16, 2021
The headers in this project are automatically generated. A script uses the git
history to determine the current header.

Since a lot of developers did not run the script, the current state of the
repository and the desired one are different. This commit sets all the headers
to the desired state.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Dec 16, 2021
The `add_header` script needs to be run after an edit to determine the status of
the header and, if necessary, change the header.

This commit adds the check for the header to the CI/CD. This enforces the usage
of the `add_header` script and ensures a healthy code base.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Dec 16, 2021
The `add_header` sript prints the correct header for a file if the `--in-place`
argument is not provided. This is a good way to see changes, however due to this
the output of the CI/CD is too verbose.

This commit disables the output of the output of the correct header, if the
`--check` option is provided. It also displays the number of files checked.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Dec 16, 2021
The headers in this project are automatically generated. A script uses the git
history to determine the current header.

Since a lot of developers did not run the script, the current state of the
repository and the desired one are different. This commit sets all the headers
to the desired state.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 12, 2022
The `add_header` script needs to be run after an edit to determine the status of
the header and, if necessary, change the header.

This commit adds the check for the header to the CI/CD. This enforces the usage
of the `add_header` script and ensures a healthy code base.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 12, 2022
The `add_header` sript prints the correct header for a file if the `--in-place`
argument is not provided. This is a good way to see changes, however due to this
the output of the CI/CD is too verbose.

This commit disables the output of the output of the correct header, if the
`--check` option is provided. It also displays the number of files checked.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 12, 2022
The `add_header` script needs to be run after an edit to determine the status of
the header and, if necessary, change the header.

This commit adds the check for the header to the CI/CD. This enforces the usage
of the `add_header` script and ensures a healthy code base.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 12, 2022
The `add_header` sript prints the correct header for a file if the `--in-place`
argument is not provided. This is a good way to see changes, however due to this
the output of the CI/CD is too verbose.

This commit disables the output of the output of the correct header, if the
`--check` option is provided. It also displays the number of files checked.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 12, 2022
The `add_header` script needs to be run after an edit to determine the status of
the header and, if necessary, change the header.

This commit adds the check for the header to the CI/CD. This enforces the usage
of the `add_header` script and ensures a healthy code base.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 12, 2022
The `add_header` sript prints the correct header for a file if the `--in-place`
argument is not provided. This is a good way to see changes, however due to this
the output of the CI/CD is too verbose.

This commit disables the output of the output of the correct header, if the
`--check` option is provided. It also displays the number of files checked.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 12, 2022
The `add_header` script needs to be run after an edit to determine the status of
the header and, if necessary, change the header.

This commit adds the check for the header to the CI/CD. This enforces the usage
of the `add_header` script and ensures a healthy code base.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 12, 2022
The `add_header` sript prints the correct header for a file if the `--in-place`
argument is not provided. This is a good way to see changes, however due to this
the output of the CI/CD is too verbose.

This commit disables the output of the output of the correct header, if the
`--check` option is provided. It also displays the number of files checked.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 12, 2022
The `add_header` script needs to be run after an edit to determine the status of
the header and, if necessary, change the header.

This commit adds the check for the header to the CI/CD. This enforces the usage
of the `add_header` script and ensures a healthy code base.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 12, 2022
The `add_header` sript prints the correct header for a file if the `--in-place`
argument is not provided. This is a good way to see changes, however due to this
the output of the CI/CD is too verbose.

This commit disables the output of the output of the correct header, if the
`--check` option is provided. It also displays the number of files checked.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 12, 2022
The `add_header` script needs to be run after an edit to determine the status of
the header and, if necessary, change the header.

This commit adds the check for the header to the CI/CD. This enforces the usage
of the `add_header` script and ensures a healthy code base.
@joeldierkes joeldierkes linked a pull request Jan 14, 2022 that will close this issue
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 17, 2022
The `add_header` script needs to be run after an edit to determine the status of
the header and, if necessary, change the header.

This commit adds the check for the header to the CI/CD. This enforces the usage
of the `add_header` script and ensures a healthy code base.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 17, 2022
The `add_header` sript prints the correct header for a file if the `--in-place`
argument is not provided. This is a good way to see changes, however due to this
the output of the CI/CD is too verbose.

This commit disables the output of the output of the correct header, if the
`--check` option is provided. It also displays the number of files checked.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 17, 2022
The `add_header` script needs to be run after an edit to determine the status of
the header and, if necessary, change the header.

This commit adds the check for the header to the CI/CD. This enforces the usage
of the `add_header` script and ensures a healthy code base.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 17, 2022
The `add_header` sript prints the correct header for a file if the `--in-place`
argument is not provided. This is a good way to see changes, however due to this
the output of the CI/CD is too verbose.

This commit disables the output of the output of the correct header, if the
`--check` option is provided. It also displays the number of files checked.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 17, 2022
The `add_header` script needs to be run after an edit to determine the status of
the header and, if necessary, change the header.

This commit adds the check for the header to the CI/CD. This enforces the usage
of the `add_header` script and ensures a healthy code base.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 17, 2022
The `add_header` sript prints the correct header for a file if the `--in-place`
argument is not provided. This is a good way to see changes, however due to this
the output of the CI/CD is too verbose.

This commit disables the output of the output of the correct header, if the
`--check` option is provided. It also displays the number of files checked.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 17, 2022
The `add_header` script needs to be run after an edit to determine the status of
the header and, if necessary, change the header.

This commit adds the check for the header to the CI/CD. This enforces the usage
of the `add_header` script and ensures a healthy code base.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 17, 2022
The `add_header` sript prints the correct header for a file if the `--in-place`
argument is not provided. This is a good way to see changes, however due to this
the output of the CI/CD is too verbose.

This commit disables the output of the output of the correct header, if the
`--check` option is provided. It also displays the number of files checked.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 17, 2022
The `add_header` script needs to be run after an edit to determine the status of
the header and, if necessary, change the header.

This commit adds the check for the header to the CI/CD. This enforces the usage
of the `add_header` script and ensures a healthy code base.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 17, 2022
The `add_header` sript prints the correct header for a file if the `--in-place`
argument is not provided. This is a good way to see changes, however due to this
the output of the CI/CD is too verbose.

This commit disables the output of the output of the correct header, if the
`--check` option is provided. It also displays the number of files checked.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 17, 2022
The `add_header` script needs to be run after an edit to determine the status of
the header and, if necessary, change the header.

This commit adds the check for the header to the CI/CD. This enforces the usage
of the `add_header` script and ensures a healthy code base.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 17, 2022
The `add_header` sript prints the correct header for a file if the `--in-place`
argument is not provided. This is a good way to see changes, however due to this
the output of the CI/CD is too verbose.

This commit disables the output of the output of the correct header, if the
`--check` option is provided. It also displays the number of files checked.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 17, 2022
The `add_header` script needs to be run after an edit to determine the status of
the header and, if necessary, change the header.

This commit adds the check for the header to the CI/CD. This enforces the usage
of the `add_header` script and ensures a healthy code base.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 17, 2022
The `add_header` sript prints the correct header for a file if the `--in-place`
argument is not provided. This is a good way to see changes, however due to this
the output of the CI/CD is too verbose.

This commit disables the output of the output of the correct header, if the
`--check` option is provided. It also displays the number of files checked.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 17, 2022
The `add_header` script needs to be run after an edit to determine the status of
the header and, if necessary, change the header.

This commit adds the check for the header to the CI/CD. This enforces the usage
of the `add_header` script and ensures a healthy code base.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 17, 2022
The `add_header` sript prints the correct header for a file if the `--in-place`
argument is not provided. This is a good way to see changes, however due to this
the output of the CI/CD is too verbose.

This commit disables the output of the output of the correct header, if the
`--check` option is provided. It also displays the number of files checked.
bari12 pushed a commit that referenced this issue Jan 20, 2022
* Add a header check to the CI Fix #4980

The `add_header` script needs to be run after an edit to determine the status of
the header and, if necessary, change the header.

This commit adds the check for the header to the CI/CD. This enforces the usage
of the `add_header` script and ensures a healthy code base.

* Change the output of the `add_header` script Fix #4980

The `add_header` sript prints the correct header for a file if the `--in-place`
argument is not provided. This is a good way to see changes, however due to this
the output of the CI/CD is too verbose.

This commit disables the output of the output of the correct header, if the
`--check` option is provided. It also displays the number of files checked.
bari12 pushed a commit that referenced this issue Jan 20, 2022
* Add a header check to the CI Fix #4980

The `add_header` script needs to be run after an edit to determine the status of
the header and, if necessary, change the header.

This commit adds the check for the header to the CI/CD. This enforces the usage
of the `add_header` script and ensures a healthy code base.

* Change the output of the `add_header` script Fix #4980

The `add_header` sript prints the correct header for a file if the `--in-place`
argument is not provided. This is a good way to see changes, however due to this
the output of the CI/CD is too verbose.

This commit disables the output of the output of the correct header, if the
`--check` option is provided. It also displays the number of files checked.
@bari12 bari12 added this to the 1.23.18 milestone Jan 20, 2022
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Jan 21, 2022
The `header-lint` job of the github actions reports "You have divergent
branches". This is a side effect of pulling the master branch into an already
checked-out repository. Since we have not specified the merge strategy, the job
fails.

We do not need to pull the master branch directly, since the `checkout` github
action automatically pulls the entire history for **all** branches. [1]

This commit removes the pull of the master branch, thus

[1] https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches
@bari12 bari12 modified the milestones: 1.23.18, 1.27.4 Feb 1, 2022
piperov pushed a commit to piperov/rucio that referenced this issue Feb 25, 2022
* Add a header check to the CI Fix rucio#4980

The `add_header` script needs to be run after an edit to determine the status of
the header and, if necessary, change the header.

This commit adds the check for the header to the CI/CD. This enforces the usage
of the `add_header` script and ensures a healthy code base.

* Change the output of the `add_header` script Fix rucio#4980

The `add_header` sript prints the correct header for a file if the `--in-place`
argument is not provided. This is a good way to see changes, however due to this
the output of the CI/CD is too verbose.

This commit disables the output of the output of the correct header, if the
`--check` option is provided. It also displays the number of files checked.
joeldierkes pushed a commit to joeldierkes/rucio that referenced this issue Mar 9, 2022
The `add_header` GitHub Acitons job is running on every pull request. While this
enforces the usage of the script, it most of the times creates a lot of noise,
since the developer has to change the PR after the test fails. We should have a
more intermediate feedback. Running the job on every push seems reasonable.
joeldierkes added a commit to joeldierkes/documentation that referenced this issue Mar 16, 2022
With the introduction of rucio/rucio#4980, the pyhton file headers get checked
on every PR. This means, that the `add-header` script has to be run on every
PR. This commit documents the usage of the `add-header` script.
joeldierkes added a commit to joeldierkes/documentation that referenced this issue Mar 16, 2022
With the introduction of rucio/rucio#4980, the pyhton file headers get checked
on every PR. This means, that the `add-header` script has to be run on every
PR. This commit documents the usage of the `add-header` script.
joeldierkes added a commit to joeldierkes/documentation that referenced this issue Mar 16, 2022
With the introduction of rucio/rucio#4980, the pyhton file headers get checked
on every PR. This means, that the `add-header` script has to be run on every
PR. This commit documents the usage of the `add-header` script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants