Discussion:
[openstack-dev] Is there any way to recheck only one job?
Slawomir Kaplonski
2018-04-30 07:12:38 UTC
Permalink
Hi,

I wonder if there is any way to recheck only one type of job instead of rechecking everything.
For example sometimes I have to debug some random failure in specific job type, like „neutron-fullstack” and I want to collect some additional data or test something. So in such case I push some „Do not merge” patch and waits for job result - but I really don’t care about e.g. pep8 or UT results so would be good is I could run (recheck) only job which I want. That could safe some resources for other jobs and speed up my tests a little as I could be able to recheck only my job faster :)

Is there any way that I can do it with gerrit and zuul currently? Or maybe it could be consider as a new feature to add? What do You think about it?


Best regards
Slawek Kaplonski
***@redhat.com
Lenny Berkhovsky
2018-04-30 07:32:58 UTC
Permalink
If your CI is using zuul, then you can try updating your zuul gerrit event comment in /etc/zuul/layout/layout.yaml accordingly.
Since most ( if not all ) Cis are triggered by 'recheck' comment you can use your custom one.

precedence: low
trigger:
gerrit:
- event: patchset-created
- event: change-restored
- event: comment-added
comment: <REGEX>

Lenny

-----Original Message-----
From: Slawomir Kaplonski [mailto:***@redhat.com]
Sent: Monday, April 30, 2018 10:13 AM
To: OpenStack Development Mailing List (not for usage questions) <openstack-***@lists.openstack.org>
Subject: [openstack-dev] Is there any way to recheck only one job?

Hi,

I wonder if there is any way to recheck only one type of job instead of rechecking everything.
For example sometimes I have to debug some random failure in specific job type, like „neutron-fullstack” and I want to collect some additional data or test something. So in such case I push some „Do not merge” patch and waits for job result - but I really don’t care about e.g. pep8 or UT results so would be good is I could run (recheck) only job which I want. That could safe some resources for other jobs and speed up my tests a little as I could be able to recheck only my job faster :)

Is there any way that I can do it with gerrit and zuul currently? Or maybe it could be consider as a new feature to add? What do You think about it?


Best regards
Slawek Kaplonski
***@redhat.com


__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.openstack.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fopenstack-dev&data=02%7C01%7Clennyb%40mellanox.com%7C2e90994f3c63470d179108d5ae69da93%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636606692019701457&sdata=pd7%2FN8Tlpsxo7fYW7bbyy1UV4JlRTT6OWlnVp6qMZ44%3D&reserved=0
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/
Jens Harbott
2018-04-30 08:41:09 UTC
Permalink
Post by Slawomir Kaplonski
Hi,
I wonder if there is any way to recheck only one type of job instead of rechecking everything.
For example sometimes I have to debug some random failure in specific job type, like „neutron-fullstack” and I want to collect some additional data or test something. So in such case I push some „Do not merge” patch and waits for job result - but I really don’t care about e.g. pep8 or UT results so would be good is I could run (recheck) only job which I want. That could safe some resources for other jobs and speed up my tests a little as I could be able to recheck only my job faster :)
Is there any way that I can do it with gerrit and zuul currently? Or maybe it could be consider as a new feature to add? What do You think about it?
This is intentionally not implemented as it could be used to trick
patches leading to unstable behaviour into passing too easily, hiding
possible issues.

As an alternative, you could include a change to .zuul.yaml into your
test patch, removing all jobs except the one you are interested in.
This would still run the jobs defined in project-config, but may be
good enough for your scenario.

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listi
Slawomir Kaplonski
2018-05-03 09:57:40 UTC
Permalink
Thanks for help.
Post by Jens Harbott
Post by Slawomir Kaplonski
Hi,
I wonder if there is any way to recheck only one type of job instead of rechecking everything.
For example sometimes I have to debug some random failure in specific job type, like „neutron-fullstack” and I want to collect some additional data or test something. So in such case I push some „Do not merge” patch and waits for job result - but I really don’t care about e.g. pep8 or UT results so would be good is I could run (recheck) only job which I want. That could safe some resources for other jobs and speed up my tests a little as I could be able to recheck only my job faster :)
Is there any way that I can do it with gerrit and zuul currently? Or maybe it could be consider as a new feature to add? What do You think about it?
This is intentionally not implemented as it could be used to trick
patches leading to unstable behaviour into passing too easily, hiding
possible issues.
As an alternative, you could include a change to .zuul.yaml into your
test patch, removing all jobs except the one you are interested in.
This would still run the jobs defined in project-config, but may be
good enough for your scenario.
I did exactly that currently and it’s exactly what I expected. Thanks :)
Post by Jens Harbott
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Best regards
Slawek Kaplonski
***@redhat.com
Martin André
2018-05-03 13:01:59 UTC
Permalink
Post by Jens Harbott
Post by Slawomir Kaplonski
Hi,
I wonder if there is any way to recheck only one type of job instead of rechecking everything.
For example sometimes I have to debug some random failure in specific job type, like „neutron-fullstack” and I want to collect some additional data or test something. So in such case I push some „Do not merge” patch and waits for job result - but I really don’t care about e.g. pep8 or UT results so would be good is I could run (recheck) only job which I want. That could safe some resources for other jobs and speed up my tests a little as I could be able to recheck only my job faster :)
Is there any way that I can do it with gerrit and zuul currently? Or maybe it could be consider as a new feature to add? What do You think about it?
This is intentionally not implemented as it could be used to trick
patches leading to unstable behaviour into passing too easily, hiding
possible issues.
Perhaps for these type of patches aimed at gathering data in CI, we
could make it easier for developers to selectively trigger jobs while
still retaining the "all voting jobs must pass in the same run" policy
in place.

I'm thinking maybe a specially formatted line in the commit message
could do the trick:

Trigger-Job: neutron-fullstack

Even better if we can automatically put a Workflow -1 on the patches
that contains a job triggering marker to prevent them from
accidentally merging, and indicate to reviewers they can skip these
patches.
It's not uncommon to see such DNM patches, so I imagine we can save
quite a lot of CI resource by implementing a system like that. And
devs will be happier too because it can also be tricky at times to
find what triggers a given job.

Martin

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-b
Slawomir Kaplonski
2018-05-03 13:54:38 UTC
Permalink
Hi,
Post by Martin André
Post by Jens Harbott
Post by Slawomir Kaplonski
Hi,
I wonder if there is any way to recheck only one type of job instead of rechecking everything.
For example sometimes I have to debug some random failure in specific job type, like „neutron-fullstack” and I want to collect some additional data or test something. So in such case I push some „Do not merge” patch and waits for job result - but I really don’t care about e.g. pep8 or UT results so would be good is I could run (recheck) only job which I want. That could safe some resources for other jobs and speed up my tests a little as I could be able to recheck only my job faster :)
Is there any way that I can do it with gerrit and zuul currently? Or maybe it could be consider as a new feature to add? What do You think about it?
This is intentionally not implemented as it could be used to trick
patches leading to unstable behaviour into passing too easily, hiding
possible issues.
Perhaps for these type of patches aimed at gathering data in CI, we
could make it easier for developers to selectively trigger jobs while
still retaining the "all voting jobs must pass in the same run" policy
in place.
I'm thinking maybe a specially formatted line in the commit message
Trigger-Job: neutron-fullstack
Yes, IMO it would be great to have something like that available :)
Post by Martin André
Even better if we can automatically put a Workflow -1 on the patches
that contains a job triggering marker to prevent them from
accidentally merging, and indicate to reviewers they can skip these
patches.
It's not uncommon to see such DNM patches, so I imagine we can save
quite a lot of CI resource by implementing a system like that. And
devs will be happier too because it can also be tricky at times to
find what triggers a given job.
That was my initial though when I wrote email about it :)
Solution proposed by Jens is (almost) fine for me as it allows me to skip many tests but there is bunch of jobs defined in zuul directly (like openstack-tox-py27 or tempest-full) which are still running for my DNM patch.
Post by Martin André
Martin
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Best regards
Slawek Kaplonski
***@redhat.com




__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org

Loading...