Commit Graph

11 Commits

Author SHA1 Message Date
Niels de Vos
34ff13984a ci: prevent panic in retest action on nil strings
In case a PullRequest does not have a MergeableState set, it will be
`nil`. Dereferencing the pointer will cause a Go panic, and the action
won't work as intended.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2022-06-27 15:00:50 +00:00
Rakshith R
bf9e14d2c9 ci: retest only one pr at a time & rebase if necessary
This commit improves retest action by rebasing the pr
if it behind devel branch and adding retests to only one
pr at a time.
refer:
https://docs.github.com/en/graphql/reference/enums#mergestatestatus

Signed-off-by: Rakshith R <rar@redhat.com>
2022-06-27 06:16:13 +00:00
Niels de Vos
e8c0e75e04 ci: check more reviews in retest action
It seems PullRequests.ListReviews() returns 30 reviews by default. This
is practical for pagination, but not so much for a GitHub action. There
is the rare occasion that the number of reviews if higher than 30. If
that is the case, the retest action does not capture the latest reviews,
which is where the APPROVED status is set.

By increasing the number of results to 100 per page, we should have
sufficient space for many more reviews and automated retest-ing.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2022-06-06 04:39:37 +00:00
Madhu Rajanna
1952a9b4b3 ci: fix all linter errors found in golangci-lint
Fixing all the linter errors found in golang-ci
lint v1.46.2

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-06-03 12:55:54 +00:00
Niels de Vos
ef1d589caa ci: use requeue instead of refresh for re-adding PRs to the queue
The current version of Mergify provides a `requeue` command in addition
to `refresh`. After a CI job failed, the PR needs to be re-added to the
queue, so the `requeue` command is more appropriate.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2022-04-20 12:38:46 +00:00
Rakshith R
4e8033b762 ci: modify retest action to comment @Mergifyio refresh
When a test fails, mergifyio kicks that pr out of queue.
Retest action will now comment `@Mergifyio refresh` to
add the pr back into queue, if any test has been restarted.
This makes sure mergifyio rebases the pr automatically
according to the queue.

Signed-off-by: Rakshith R <rar@redhat.com>
2022-03-17 07:52:26 +00:00
Madhu Rajanna
9f9ef0eca5 ci: update action go.mod to 1.17
As we are updating the cephcsi main repo
to golang 1.17, updating the action package
to golang 1.17

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-12-13 07:32:54 +00:00
Rakshith R
7f13bf6c4d ci: use only latest version of test status in retest action
Github's list statuses returns list of all status, possibly
containing dupicates and previously failed statuses.
Use "UpdatedAt" timestamp to only get the latest status
for each test.

Signed-off-by: Rakshith R <rar@redhat.com>
2021-11-24 12:37:05 +00:00
Niels de Vos
fac3ef01c6 build: use golang:1.16 as runtime container for retest action
It seems that building the `retest` action makes it consume shared
libraries that are not part of the `scratch` base container layer. By
using the golang:1.16 container image as a base, all required shared
libraries are available.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2021-11-17 14:36:13 +00:00
Madhu Rajanna
c4ceadd06a ci: fix docker build issue for retest
fix docker build `cannot normalize nothing`

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-11-17 05:50:43 +00:00
Madhu Rajanna
5a53f53166 ci: add retest github action
added source code of github retest
action.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-11-16 12:03:36 +00:00