-
Notifications
You must be signed in to change notification settings - Fork 87
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
[APPSRE-11112] add verify_ondemend_tests for gitlab-housekeeping #4816
base: master
Are you sure you want to change the base?
Conversation
48862e2
to
c157a1b
Compare
c2bb888
to
88c9c8a
Compare
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.
LGTM
reconcile/gitlab_housekeeping.py
Outdated
gl_fork = GitLabApi( | ||
instance=gl_instance, | ||
project_id=mr.source_project_id, | ||
settings=gl_settings, | ||
) |
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.
any reason to create a new GitLabApi
instead of reuse current gl
, GitLabApi
instance require cleanup
.
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.
The original gl targets the upstream repo while this gl_fork targets the fork repo. We can only get the commit status from the fork repo. I have switch it using with
.
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.
you need this part
qontract-reconcile/reconcile/utils/gitlab_api.py
Lines 128 to 129 in dde29ad
gitlab_request.labels(integration=INTEGRATION_NAME).inc() | |
self.project = self.gl.projects.get(project_id) |
maybe worth extract another method get_project_by_id
, and replace prevous project_url part with current get_project
. This can save calls used to init GitLabApi
, and save those paramter passing of gl_instance
and gl_settings
.
Also need to make request counter correct as commits.get(commit.id)
has 1 request, and .statuses.list()
has another (if no pagination), need a better way to count mentioned in https://issues.redhat.com/browse/APPSRE-10450
ba6c29c
to
a164a7f
Compare
Signed-off-by: Feng Huang <fehuang@redhat.com>
allow to check if MR has passed all necessary test jobs and add comments to indicate test results.