Skip to content

Commit

Permalink
Pass sync_acls=True to sync_release (#2317)
Browse files Browse the repository at this point in the history
Pass sync_acls=True to sync_release

Followup of packit/packit#2214

RELEASE NOTES BEGIN
N/A
RELEASE NOTES END

Reviewed-by: Nikola Forró
  • Loading branch information
softwarefactory-project-zuul[bot] authored Jan 25, 2024
2 parents 5257ccd + efeed0f commit 0bbfd66
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions packit_service/worker/handlers/distgit.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ def sync_branch(
"release_monitoring_project_id"
),
pr_description_footer=CHANGED_LOADING_BEHAVIOUR_IN_DISTGIT_MESSAGE,
sync_acls=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 @@ -154,6 +154,7 @@ def test_new_hotness_update(new_hotness_update, sync_release_model):
resolved_bugs=["rhbz#2106196"],
release_monitoring_project_id=4181,
pr_description_footer=CHANGED_LOADING_BEHAVIOUR_IN_DISTGIT_MESSAGE,
sync_acls=True,
).and_return(pr).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 @@ -2688,6 +2688,7 @@ def _get_project(url, *_, **__):
resolved_bugs=["rhbz#123", "rhbz#124"],
release_monitoring_project_id=None,
pr_description_footer=CHANGED_LOADING_BEHAVIOUR_IN_DISTGIT_MESSAGE,
sync_acls=True,
).and_return(pr).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 @@ -184,6 +184,7 @@ def test_dist_git_push_release_handle(github_release_webhook, propose_downstream
resolved_bugs=[],
release_monitoring_project_id=None,
pr_description_footer=CHANGED_LOADING_BEHAVIOUR_IN_DISTGIT_MESSAGE,
sync_acls=True,
).and_return(pr).once()
flexmock(PackitAPI).should_receive("clean")

Expand Down Expand Up @@ -306,6 +307,7 @@ def test_dist_git_push_release_handle_multiple_branches(
resolved_bugs=[],
release_monitoring_project_id=None,
pr_description_footer=CHANGED_LOADING_BEHAVIOUR_IN_DISTGIT_MESSAGE,
sync_acls=True,
).and_return(pr).once()

flexmock(ProposeDownstreamJobHelper).should_receive(
Expand Down Expand Up @@ -438,6 +440,7 @@ def test_dist_git_push_release_handle_one_failed(
resolved_bugs=[],
release_monitoring_project_id=None,
pr_description_footer=CHANGED_LOADING_BEHAVIOUR_IN_DISTGIT_MESSAGE,
sync_acls=True,
).and_return(pr).once()
flexmock(ProposeDownstreamJobHelper).should_receive(
"report_status_for_branch"
Expand All @@ -459,6 +462,7 @@ def test_dist_git_push_release_handle_one_failed(
resolved_bugs=[],
release_monitoring_project_id=None,
pr_description_footer=CHANGED_LOADING_BEHAVIOUR_IN_DISTGIT_MESSAGE,
sync_acls=True,
).and_raise(Exception, f"Failed {model.branch}").once()
flexmock(ProposeDownstreamJobHelper).should_receive(
"report_status_for_branch"
Expand Down Expand Up @@ -699,6 +703,7 @@ def test_retry_propose_downstream_task(
resolved_bugs=[],
release_monitoring_project_id=None,
pr_description_footer=CHANGED_LOADING_BEHAVIOUR_IN_DISTGIT_MESSAGE,
sync_acls=True,
).and_raise(
PackitDownloadFailedException, "Failed to download source from example.com"
).once()
Expand Down Expand Up @@ -809,6 +814,7 @@ def test_dont_retry_propose_downstream_task(
resolved_bugs=[],
release_monitoring_project_id=None,
pr_description_footer=CHANGED_LOADING_BEHAVIOUR_IN_DISTGIT_MESSAGE,
sync_acls=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 @@ -168,6 +168,7 @@ def test_process_message(event, private, enabled_private_namespaces, success):
resolved_bugs=[],
release_monitoring_project_id=None,
pr_description_footer=CHANGED_LOADING_BEHAVIOUR_IN_DISTGIT_MESSAGE,
sync_acls=True,
).and_return(pr).times(1 if success else 0)
flexmock(shutil).should_receive("rmtree").with_args("")

Expand Down

0 comments on commit 0bbfd66

Please sign in to comment.