This reverts commit 5db1d05b70.
I should have thought about this more before approving, it naively
assumes project short names match between Gerrit and Launchpad, but
the gerrit/projects.yaml file in openstack/project-config allows to
remap projects in Gerrit to different names in LP. See the
process_bugtask function for an example of dereferencing this.
Change-Id: I3af965d705f032ffad30f65e4bd5e16c926dda14
Noticed recently that update_bug.py can end up updating the wrong
project's task to Fix Committed on a bug affecting multiple projects
because only the series is being checked.
This adds an additional check to make sure the project also matches
before setting the task to Fix Committed.
Change-Id: I817535bd84f76780be44ad21a7e4bb4abbda0135
Depends-On: https://review.opendev.org/883664
Update the callers of update_bug.set_in_progress() to drop the
uploader parameter which was removed previously in change
I1e08ed0dfa62a1d59084a19d87e3af317dabad04.
Change-Id: I966ecfdf634009e8c2ba89bb5c52d9e4df1e73e4
As of Gerrit 3.2, some hook command lines now include username
parameters of various sorts in addition to the IDs. Also
patchset-created no longer passes an --is-draft parameter, as that
is now no longer a Gerrit feature. Add the missing new parameters
and remove the defunct one.
Change-Id: I5808e1b3398926810ba0e54bf132a0adeac5d2ac
Gerrit 2.15 and later no longer stores account information in an
RDBMS, so querying it to determine potential mapping to Launchpad
accounts is not possible. As a stopgap, just stop trying to assign
bugs when setting their state to in-progress, but still perform the
other expected tasks.
This functionality should be considered deprecated, and would be
better replaced with a Zuul job for future maintainability and
extensibility.
Change-Id: I1e08ed0dfa62a1d59084a19d87e3af317dabad04
Depends-On: https://review.opendev.org/782603
The OpenDev Manual (formerly OpenStack Infra Manual) has moved to
opendev.org, so update the link for it in the welcome message
accordingly. Do the same for the pull request closer utility, and
also reword it for better generality (a bit of de-OpenStacking).
While we're here, update outdated URLs for other content and
services which have moved to opendev.org, refresh some configuration
examples, and correct some lingering OpenStack LLC copyrights to
OpenStack Foundation per the guidance at
https://wiki.openstack.org/wiki/LegalIssuesFAQ#Copyright_Headers
(though I did not touch scripts we no longer use, like create
cgitrepos or openstackwatch).
Change-Id: Ibb34d1ab8ab58dee653c51141a871834b93cd54b
Depends-On: https://review.opendev.org/729362
We use subprocess.Popen directly in these scripts rather than
run_command. We need to decode the output so that we get strings
back and not bytes.
Change-Id: Ie967ceac77ecb898cab24827644b981eed22e141
We need to be able to set the location of GERRIT_GIT_DIR via
env vars. And we need to turn off strict for config parser.
Change-Id: I9d511caa6db6f958a215f131692e185c717b66d5
When determining the LP assignee for a bug, constrain the Gerrit DB
query to only active accounts. Otherwise an incorrect OpenId for a
defunct account may be selected instead of the intended one.
Change-Id: I34e64362dd89c1d678a1f641244274fe27b5bdca
It's the same site, but login.ubuntu.com is the 'real' one and
launchpad.net is an alias. login.launchpad.net seems to be less
important to the admins.
Change-Id: Ic3a68886fb846699860a58ea76c16f2749f05897
Change the default behavior to update the status of the bug to fix
released instead of fix committed.
Change-Id: Id08565d54646cee6ce8262e0ef5cd63bf4f3dc7c
In I128b48d it was assumed that the series variable was already set
to a default boolean false value before testing it, but this was not
the case. Add that initial false state as a None default.
Change-Id: Ifddd9ad150aaec2db375f44f2d62fe69f6684e52
Projects like stackforge/os-ansible-deployment don't use stable/ in
their supported branches. The branch names, however, do correspond to
the series name on Launchpad. Without these updates, the series needs to
be updated entirely by hand.
Change-Id: I128b48ddfe0eb9a062c796828dded1b8ebb241bf
Closes-bug: 2000150
We didn't update update_bug.py when we switched from milestone-proposed
to proposed/* branches, so it currently doesn't update bugs correctly
when a backport is merged to proposed/*. This fixes it.
Change-Id: Ifb8f5e71475d6b0be5e3e958c021d013a34bc0a1
Jeepyb now pulls all project groups listed in review.projects.yaml
to check for bugs or blueprints. This is to support multiple
project group membership in storyboard. If 'groups' is not found,
it will fallback to the legacy 'group' or the short project name,
wrapped in an array.
Change-Id: I5f6d09fce609f387b089840f3903303869f33767
This change allows jeepyb to update LP bugs associated
to Gerrit changesets when those changesets
are abandoned.
Another change in openstack-infra/config will be needed
to configure review.openstack.org appropriately.
Partial-Bug: 1248813
Change-Id: I51ab97f240d161704fb323787fb54ee1814bd7fa
In anticipation of storyboard, which has project groups, support
a field called 'group' for each project, which will match that project
to the appropriate group. For launchpad, use group designation as a
mapping to the bug tracker, if it is different.
Change-Id: Ied726fece9f32b8417e18c50ad52ae9279778399
* jeepyb/cmd/update_bug.py: Formerly URLs were provided to
github.com but we have somewhere better to send browsers now.
Change-Id: I2d738f163374324241b15aef285f126f85ddc5d2
Currently, the flags do nothing, except allow gerrit 2.5 to use
update-bugs again.
Change-Id: If6e17766bd5719af7739c546bbb764e2f797c601
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
* git2lp and is_direct_release are now functions extracted to the projects.py;
* git2lp and is_direct_release mappings are now loaded from projects.yaml;
* temporarily old mappings are used if no info found in projects.yaml.
Fixes: bug #1202820
Fixes: bug #1202800
Fixes: bug #1082792
Change-Id: I487761d110cf781acea26b997486ea24a7deb25e
This reverts commit e127f9a88a.
After a recent discussion during the QA weekly irc meeting it was
decided that that tempest bugs should be marked as fixed released
immediately after the fix is merged.
Change-Id: I3a55552ec03114f63f8a694060388ae40de55d64
Avoid posting confusing 'Fix proposed' or 'Fix merged' comments for
'Related' bugs.
This also fixes a latent bug (the 'add_comment' task was not really
taken into consideration before actually adding a comment).
Fixes bug: #1218044
Change-Id: Ic287050cf5dcf690239484038fb957e897df886f
Since we've decided to split puppet-openstack launchpad page into
several sub-projects, this patch update the configuration to
support both blueprints & bugs for all current puppet modules
in StackForge.
Change-Id: Iaef1de681507e9de9d80d6fecd2e5e56ca960a1a
I've reworked a few items here, so I will describe them in as much a
linear fashion as possible. Keep in mind that one of the primary goals
for these changes is to allow us to "trigger more magic from Gerrit".
And it is to that end that I've implemented these changes.
In find_bugs(), I've tightened-up the regular expression being used so
that it will parse-out any prefixes associated with the bug reference.
I've tested the regular expression against the most common bug
references that I've seen in commit logs, as well as against the
styles described in our documentation. The sources that I've drawn
from are:
https://etherpad.openstack.org/drive-automation-from-commitmsghttps://wiki.openstack.org/wiki/GitCommitMessageshttps://wiki.openstack.org/wiki/Gerrit_Workflow
Moreover, I'm using re.finditer() which allows for more direct
access to the text that was matched. Lastly, I've tried to keep the
expression as flexible as possible so that it will match even if the
developer references the bug in a funky way.
In order to keep the prefix and lp_task associated with each other,
I've created a class called "Task" which is simply an interface to
determine what sort of automation needs to take place for the given
bugtask. This being the case, I've taken the liberty of renaming a few
variables to make this more clear.
In "Task", a basic level of processing is performed on the prefix to
determine what changes need to be made on launchpad. A method called
needs_change() returns a boolean indicating if the supplied argument
is a change which needs to be made.
Lastly, yet most importantly for this bug fix, process_bugtsk() is
utilizing needs_change(), as mentioned above, to ensure that the
bugtask's status is not erroneously changed in the case of a bug fix
which spans multiple commits.
Closes-Bug: 1018013
Change-Id: Ibd84d3c6edcf104afe3211fb55ea531efa92d20e
This commit removes tempest from the list of projects that are
direct release. No when a tempest bug's fixing commit gets merged it
will be set to fix committed instead of fix released.
Change-Id: Iad9f2203e6694a428a7e4ab5be80c74a1fbb2016
Reviewed-on: https://review.openstack.org/36908
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
Migrate to pbr, flake8 and hacking. Clean up hacking warnings. Rename
requirements files. Remove cruft from tox.ini.
Change-Id: Ide78ad47de7f275240f729a2bc02745063b084ac
Reviewed-on: https://review.openstack.org/31439
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Gracefully handle the Launchpad project rename from Quantum to Neutron,
by redirecting changes to not-yet-renamed openstack/quantum repo to the
already-renamed "neutron" LP project (same for python-*client projects).
This should be accepted once the following LP support request is done:
https://answers.launchpad.net/launchpad/+question/231396
Change-Id: Ib47970716d6aef54d6a641bb78f966d5feb1e3bb
Reviewed-on: https://review.openstack.org/34549
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
Change-Id: Iedd869f02ee51f286a91ce5f64a4a826e567ea4f
Reviewed-on: https://review.openstack.org/32782
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
Bug reports on the openstack-infra/publications project in Gerrit
should map to the openstack-ci project in Launchpad and be marked
fix-released on merge.
Change-Id: I3caea11c36270db2e5d7587f09cff150b80e8afa
Reviewed-on: https://review.openstack.org/31864
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
Change-Id: I79a300be354f57d02919121488cf9d5f6add1d2c
Reviewed-on: https://review.openstack.org/30197
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
Change-Id: I539094a6fee562fdfe204c33ade191dbc649c5f7
Reviewed-on: https://review.openstack.org/30374
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
* jeepyb/cmd/update_bug.py(git2lp): Sorted project entries
alphabetically for ease of maintenance.
(is_direct_release): Updated list of openstack-infra projects which
don't tag formal releases, and sorted project entries alphabetically
for ease of maintenance.
Change-Id: I181a32239db6e6dd247db9670b8735cddc7fb56f
Reviewed-on: https://review.openstack.org/30035
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Add bug tracking to superproject openstack-chef
for all stackforge chef cookbooks and chef-repo.
Sets all above repos to be Fix Released, not Fix
Committed, when patches received and merged.
Change-Id: Idbc234a552ec11b4dad145d867ec60b1a568720f
Reviewed-on: https://review.openstack.org/29973
Reviewed-by: John Dewey <john@dewey.ws>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
The puppet-openstack project wishes to manage all puppet modules
hosted on stackforge in the same Launchpad project to ease management.
This patch adds the required mapping for Gerrit to find and update bugs
in the appropriate Launchpad project.
Change-Id: I59cf52ba22e0e16fdceb15f790487c62ec77d144
Reviewed-on: https://review.openstack.org/29404
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
* jeepyb/cmd/update_bug.py: Update the gerrit to Launchpad project
name mapping for all projects in the openstack-infra org to
correspond to openstack-ci bugs, except those which have their own
separate LP projects already. Also alphabetize the list for easier
maintenance.
Change-Id: Ie910068839361b1ebbeb6ef2b530d9d599301694
Reviewed-on: https://review.openstack.org/28237
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Add a conditional check to call main() in cmd scripts if they're
being invoked directly. Some already had them, but most simply
relied on the entrypoints wrappers declared in setup.py. With this
change, users can more easily test and debug the various command
scripts directly without needing setup magic.
Change-Id: I16c26e954687de8af5f971936fb8eee2072c06bc
Reviewed-on: https://review.openstack.org/26966
Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com>
Reviewed-by: Khai Do <zaro0508@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Look for login.launchpad.net openids for the openid->username
mapping. Some users have other openids that won't work.
Change-Id: I6201d33e553120548e9d910830dfe23072b65b63
Reviewed-on: https://review.openstack.org/19502
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
* jeepyb/cmd/update_bug.py(set_in_progress): Check that the value
returned by getByOpenIDIdentifier is usable before trying to
reassign the bug.
Change-Id: Idbc03fdc0663e83d96292171bd93f5e9f4fe1adb
Reviewed-on: https://review.openstack.org/19497
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Dolph Mathews <dolph.mathews@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
* jeepyb/cmd/update_bug.py(set_in_progress): Instead of querying
Launchpad for E-mail addresses matching the change author, look in
Gerrit to find an OpenID and look the user up with the
getByOpenIDIdentifier call.
Change-Id: Ifb457237cd02f5f3db4e95f26c87c08cf698de9a
Reviewed-on: https://review.openstack.org/17488
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
Adds openstack/api-site to the list of "gets released" projects.
Fix bug 1086528
Change-Id: I8a6cfbbbb0f77b0f74be74ad647682bbbca89c20
Reviewed-on: https://review.openstack.org/17502
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Adding two entries to the git->lp project map in update_bug.py:
openstack/oslo-incubator -> oslo
openstack-ci/jeepyb -> openstack-ci
Fixes bug 1085864.
Change-Id: I9fa2631c363db72a73306ac3bdb1aed8a3beb15d
Reviewed-on: https://review.openstack.org/17342
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins