Skip to content
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

Create a Bugzilla bug for a new Merge Request (Gitlab) #1087

Merged

Conversation

jpopelka
Copy link
Member

@jpopelka jpopelka commented May 4, 2021

When an "accepted" flag is added to a MR in a source-git repo, create a bug in Bugzilla against that component for the CentOS Stream version.

We already have the functionality for Pagure, but because we've moved our source-git repos to Gitlab we need support for Gitlab.
Since this MR flag -> BZ workflow is c8s specific and we won't go back to Pagure, this PR removes the relevant Pagure related pieces.

There are some refactoring commits, so it's better to check them separately.

  • The description should tell what the BZ is and why it was opened, provide guidance to the maintainer and a link to the MR with clear CLI commands how to get the patch.

@softwarefactory-project-zuul

This comment has been minimized.

Copy link
Member

@lachmanfrantisek lachmanfrantisek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

packit_service/worker/handlers/__init__.py Show resolved Hide resolved
packit_service/worker/handlers/forges_handlers.py Outdated Show resolved Hide resolved
See handlers/__init__.py to know what is where now
i.e.

from packit_service.worker.handlers.abstract import (
    Handler,
    JobHandler,
    FedmsgHandler,
)
from packit_service.worker.handlers.copr_handlers import (
    CoprBuildHandler,
    CoprBuildEndHandler,
    CoprBuildStartHandler,
)
from packit_service.worker.handlers.distgit_handlers import (
    DistGitCommitHandler,
    ProposeDownstreamHandler,
)
from packit_service.worker.handlers.forges_handlers import (
    GithubAppInstallationHandler,
    PullRequestLabelHandler,
)
from packit_service.worker.handlers.koji_handlers import (
    KojiBuildHandler,
    KojiBuildReportHandler,
)
from packit_service.worker.handlers.testing_farm_handlers import (
    TestingFarmHandler,
    TestingFarmResultsHandler,
)
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@jpopelka jpopelka changed the title WIP: Create a Bugzilla bug for a new Merge Request (Gitlab) Create a Bugzilla bug for a new Merge Request (Gitlab) May 6, 2021
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

It's been renamed from PagurePullRequestLabelHandler
and reacts to MergeRequestGitlabEvent
(which now has also source_repo_branch & target_repo_branch attributes).

Creating a Bugzilla bug is no longer a reaction to added label,
but triggered by opening a new MR and is
now restricted to set of allowed namespaces and branches.

The now unused code for handling labels on Pagure has been removed.
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

Copy link
Member

@lachmanfrantisek lachmanfrantisek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for happily reviewing the label-version of this workflow. I've thought the same.

Thanks for all the work!

@lachmanfrantisek
Copy link
Member

Do you think we will ever need to react on labels? (I am just thinking about whether it makes sense to preserve the parsing you've implemented and is now not present?)

@TomasTomecek
Copy link
Member

Do you think we will ever need to react on labels? (I am just thinking about whether it makes sense to preserve the parsing you've implemented and is now not present?)

I can easily imagine a future workflow where p-s, or probably "the-new-thing", will react to labels.

@jpopelka
Copy link
Member Author

I am just thinking about whether it makes sense to preserve the parsing you've implemented and is now not present?

It's gone, sorry :-)
One can dig it out from history if we ever need it in the future.

Thanks for review, will merge this after we move stable branches today.

@jpopelka jpopelka added the mergeit When set, zuul wil gate and merge the PR. label May 10, 2021
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit fef8409 into packit:main May 10, 2021
@jpopelka jpopelka deleted the bugzilla-from-gitlab branch May 10, 2021 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mergeit When set, zuul wil gate and merge the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants