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

Backport GH Actions to rhel8-branch #371

Merged
merged 9 commits into from May 11, 2021

Conversation

bcl
Copy link
Collaborator

@bcl bcl commented Jan 13, 2021

No description provided.

@VladimirSlavik
Copy link
Collaborator

Looks like you're getting the same pylint-only errors as #343, so I think it's good?

Copy link
Collaborator

@jkonecny12 jkonecny12 left a comment

Choose a reason for hiding this comment

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

Looks good to me otherwise.

- python-version: 3.7
tox-env: py37
steps:
- name: "Clone Repository"
Copy link
Collaborator

Choose a reason for hiding this comment

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

You should also rebase the PR on top of the target branch. Something like:
https://github.com/rhinstaller/anaconda/blob/master/.github/workflows/validate-rhel-8.yml#L70

However, you need to get target branch for the given PR which should be doable by https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables#default-environment-variables .

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think so. This runs in pull_request, and the clone step gets the right code. IIRC it was pull_request_target where you have to rebase things. https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#pull_request

Copy link
Collaborator

Choose a reason for hiding this comment

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

No, with pull_request_target you will have the same code as pull_request. However, this is not what I meant. When you look on checkout action you will find:

Only a single commit is fetched by default, for the ref/SHA that triggered the workflow.

What triggered this code is SHA of the PR not rebase of the PR on the target branch.

The point is, that you are testing exact code which you have on PR. However, the target HEAD of the PR is moving, so you are not testing what will be there after the merge will happen but before the merge. This could be problematic and could miss problems especially when the PR in question is old.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah! I see. That's not usually a problem for me, and when it is I just rebase the PR and force-push it to run it against the new HEAD.

I'm not sure if I like the idea of doing that automatically -- when I write the PR I write it against a specific branching point, if the GH test then tests it against a different point that seems unexpected to me. I'll have to think about that.

@bcl bcl force-pushed the rhel8-gh-actions branch 2 times, most recently from 945433c to 1e71b5f Compare January 14, 2021 00:28
@bcl
Copy link
Collaborator Author

bcl commented Jan 14, 2021

Note that this needs a rhbz in order to be merged. I'll open one today and add it to the commits.

Related: rhbz#1916487
This switches to using actions via tox, it currently runs for python
versions: 3.6, 3.7

It uploads the coverage report from the python 3.6 run.

Resolves: rhbz#1916487
xsc27 and others added 7 commits January 15, 2021 16:03
The switch to setuptools dropped this, breaking script installation.

Related: rhbz#1916487
Related: rhbz#1916487

Test class names are split on _ so the leading _ resulted in a '' which
caused the test to fail.

I am not sure why this wasn't caught by the nosetests.
@bcl bcl merged commit a100b00 into pykickstart:rhel8-branch May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants