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

Specify add_pr_instructions in sync_release #2116

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packit_service/worker/handlers/distgit.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ def sync_branch(
local_pr_branch_suffix=branch_suffix,
use_downstream_specfile=is_pull_from_upstream_job,
sync_default_files=not is_pull_from_upstream_job,
add_pr_instructions=True,
)
except PackitDownloadFailedException as ex:
# the archive has not been uploaded to PyPI yet
Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_new_hotness_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def test_new_hotness_update(new_hotness_update, sync_release_model):
local_pr_branch_suffix="update-pull_from_upstream",
use_downstream_specfile=True,
sync_default_files=False,
add_pr_instructions=True,
).and_return(flexmock(url="some_url")).once()
flexmock(PackitAPI).should_receive("clean")

Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_pr_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -2666,6 +2666,7 @@ def test_pull_from_upstream_retrigger_via_dist_git_pr_comment(pagure_pr_comment_
local_pr_branch_suffix="update-pull_from_upstream",
use_downstream_specfile=True,
sync_default_files=False,
add_pr_instructions=True,
).and_return(flexmock(url="some_url")).once()
flexmock(PackitAPI).should_receive("clean")

Expand Down
6 changes: 6 additions & 0 deletions tests/integration/test_release_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ def test_dist_git_push_release_handle(github_release_webhook, propose_downstream
local_pr_branch_suffix="update-propose_downstream",
use_downstream_specfile=False,
sync_default_files=True,
add_pr_instructions=True,
).and_return(flexmock(url="some_url")).once()
flexmock(PackitAPI).should_receive("clean")

Expand Down Expand Up @@ -286,6 +287,7 @@ def test_dist_git_push_release_handle_multiple_branches(
local_pr_branch_suffix="update-propose_downstream",
use_downstream_specfile=False,
sync_default_files=True,
add_pr_instructions=True,
).and_return(flexmock(url="some_url")).once()

flexmock(ProposeDownstreamJobHelper).should_receive(
Expand Down Expand Up @@ -407,6 +409,7 @@ def test_dist_git_push_release_handle_one_failed(
local_pr_branch_suffix="update-propose_downstream",
use_downstream_specfile=False,
sync_default_files=True,
add_pr_instructions=True,
).and_return(flexmock(url="some_url")).once()
flexmock(ProposeDownstreamJobHelper).should_receive(
"report_status_for_branch"
Expand All @@ -424,6 +427,7 @@ def test_dist_git_push_release_handle_one_failed(
local_pr_branch_suffix="update-propose_downstream",
use_downstream_specfile=False,
sync_default_files=True,
add_pr_instructions=True,
).and_raise(Exception, f"Failed {model.branch}").once()
flexmock(ProposeDownstreamJobHelper).should_receive(
"report_status_for_branch"
Expand Down Expand Up @@ -652,6 +656,7 @@ def test_retry_propose_downstream_task(
local_pr_branch_suffix="update-propose_downstream",
use_downstream_specfile=False,
sync_default_files=True,
add_pr_instructions=True,
).and_raise(
PackitDownloadFailedException, "Failed to download source from example.com"
).once()
Expand Down Expand Up @@ -756,6 +761,7 @@ def test_dont_retry_propose_downstream_task(
local_pr_branch_suffix="update-propose_downstream",
use_downstream_specfile=False,
sync_default_files=True,
add_pr_instructions=True,
).and_raise(
PackitDownloadFailedException, "Failed to download source from example.com"
).once()
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_steve.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def test_process_message(event, private, enabled_private_namespaces, success):
local_pr_branch_suffix="update-propose_downstream",
use_downstream_specfile=False,
sync_default_files=True,
add_pr_instructions=True,
).and_return(flexmock(url="some_url")).times(1 if success else 0)
flexmock(shutil).should_receive("rmtree").with_args("")

Expand Down