File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Unreleased
22
3+ # 0.44.3
4+ * Handle GithubOrganizationUnknown in GithubSyncJob by logging a warning and marking the stack as inaccessible.
5+
36# 0.44.2
47* Add dry-run flag for testing environments
58
Original file line number Diff line number Diff line change 11PATH
22 remote: .
33 specs:
4- shipit-engine (0.44.2 )
4+ shipit-engine (0.44.3 )
55 active_model_serializers (~> 0.9.3 )
66 ansi_stream (~> 0.0.6 )
77 autoprefixer-rails (~> 6.4.1 )
Original file line number Diff line number Diff line change @@ -67,6 +67,9 @@ def handle_github_errors
6767 yield
6868 rescue Octokit ::NotFound
6969 stack . mark_as_inaccessible!
70+ rescue Shipit ::GithubOrganizationUnknown => e
71+ Rails . logger . warn ( "GithubSyncJob: unknown GitHub organization #{ e . message } for stack #{ stack . id } " )
72+ stack . mark_as_inaccessible!
7073 else
7174 stack . mark_as_accessible!
7275 end
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33module Shipit
4- VERSION = '0.44.2 '
4+ VERSION = '0.44.3 '
55end
Original file line number Diff line number Diff line change @@ -119,6 +119,14 @@ class GithubSyncJobTest < ActiveSupport::TestCase
119119 assert_equal true , @stack . reload . inaccessible_since?
120120 end
121121
122+ test "if the GitHub organization is unknown, the stack is marked as inaccessible and a warning is logged" do
123+ @job . expects ( :fetch_missing_commits ) . raises ( Shipit ::GithubOrganizationUnknown . new ( "shopify-playgrounds" ) )
124+ Rails . logger . expects ( :warn ) . with ( "GithubSyncJob: unknown GitHub organization shopify-playgrounds for stack #{ @stack . id } " )
125+ @job . perform ( stack_id : @stack . id )
126+
127+ assert_equal true , @stack . reload . inaccessible_since?
128+ end
129+
122130 test "#perform retries when expected_head_sha is not found in the github response" do
123131 expected_sha = "abcd1234"
124132 Stack . any_instance . expects ( :github_commits ) . returns ( @github_commits )
You can’t perform that action at this time.
0 commit comments