-
Notifications
You must be signed in to change notification settings - Fork 115
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
Filter test collection based on files changed in upstream PRs. #14931
Conversation
8ff05a2
to
4c7079d
Compare
4c7079d
to
b1f50b8
Compare
conf/github.yaml.template
Outdated
REPO: katello | ||
RULES: | ||
- PATH: | ||
MARKER: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding reminder here that, this needs to be added in the CI code base as well.
conf/github.yaml.template
Outdated
@@ -0,0 +1,15 @@ | |||
GITHUB: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unsure of the name here. github might be a bit too vague. can you think of something more specific for this config to be called?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to github_repos
.
74c1d40
to
bfdf982
Compare
bfdf982
to
15d11d8
Compare
This pull request has not been updated in the past 45 days. |
This pull request is now being closed after stale warnings. |
Problem Statement
Filter tests based on the files modified in an upstream (foreman or katello) PR.
Solution
The new
upstream_pr
pytest plugin uses the PyGithub library to get the list of files modified by the given PR, and filters the test collection based on the mapping of upstream repo paths/filenames to test markers in robottelo.For example, with the following new settings block
settings.github
:then the following Foreman PR, which modifies files under
webpack/assets/javascripts/react_app/components/SettingUpdateModal/
, should filter the tests on theSettings
component. In this case,--upstream-pr foreman/9969
is equivalent to--component Settings
:Fixes #37013 - change the 'All hosts' menu item's url based on the new_host_page setting
theforeman/foreman#9969
Similarly, for this Katello PR:
Fixes #37394 - content_view_filter_id only works for ID-type filters
Katello/katello#10985
the file
app/controllers/katello/api/v2/errata_controller.rb
is matched exactly, and tests with theErrataManagement
component are selected: