Skip to content

Commit

Permalink
Add note about retriggering (#2542)
Browse files Browse the repository at this point in the history
Add note about retriggering

Fixes #2127

TODO:

 Write new tests or update the old ones to cover new functionality.
 Update doc-strings where appropriate.
 Update or write new documentation in packit/packit.dev.
 ‹fill in›



Fixes
Related to
Merge before/after

RELEASE NOTES BEGIN
We have added a note about retriggering pull from upstream.
RELEASE NOTES END

Reviewed-by: Matej Focko
  • Loading branch information
softwarefactory-project-zuul[bot] authored Sep 24, 2024
2 parents 27aca21 + bce9f84 commit aab45bf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packit_service/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
"You can retrigger the {job} by adding a comment (`{packit_comment_command_prefix} {command}`) "
"into this {place}."
)

MSG_RETRIGGER_DISTGIT = (
"You can retrigger the {job} by adding a comment (`{packit_comment_command_prefix} {command}`) "
"into any open open pull request in dist-git."
)

COPR_CHROOT_CHANGE_MSG = (
"Settings of a Copr project {owner}/{project} need to be updated, "
"but Packit can't do that when there are previous builds still in progress.\n"
Expand Down
9 changes: 9 additions & 0 deletions packit_service/worker/handlers/distgit.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
MSG_GET_IN_TOUCH,
MSG_DOWNSTREAM_JOB_ERROR_HEADER,
DEFAULT_RETRY_BACKOFF,
MSG_RETRIGGER_DISTGIT,
RETRY_LIMIT_RELEASE_ARCHIVE_DOWNLOAD_ERROR,
)
from packit_service.models import (
Expand Down Expand Up @@ -491,6 +492,14 @@ def run(self) -> TaskResults:
dist_git_url=self.packit_api.dg.local_project.git_url,
)
body_msg += f"{branch_errors}\n\n"

if self.task_name == TaskName.pull_from_upstream:
body_msg += MSG_RETRIGGER_DISTGIT.format(
job="pull_from_upstream",
packit_comment_command_prefix=self.service_config.comment_command_prefix,
command="pull-from-upstream",
)

self._report_errors_for_each_branch(body_msg)
sync_release_run_model.set_status(status=SyncReleaseStatus.error)
return TaskResults(
Expand Down

0 comments on commit aab45bf

Please sign in to comment.