Skip to content

Commit

Permalink
Merge branch 'main' into retry-submission
Browse files Browse the repository at this point in the history
  • Loading branch information
nid90 authored Jan 16, 2025
2 parents 54506ea + b9fd35d commit 0395d1c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
4 changes: 2 additions & 2 deletions app/components/v2/release_list_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ def semver_options(major_subtitle, minor_subtitle)
[
{
title: "Minor",
subtitle: major_subtitle,
subtitle: minor_subtitle,
icon: "v2/play_fill.svg",
opt_name: "has_major_bump",
opt_value: "false",
options: {checked: true, data: {action: REVEAL_HIDE_ACTION}}
},
{
title: "Major",
subtitle: minor_subtitle,
subtitle: major_subtitle,
icon: "v2/forward_step_fill.svg",
opt_name: "has_major_bump",
opt_value: "true",
Expand Down
2 changes: 0 additions & 2 deletions app/libs/coordinators/start_release.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def call
raise "Could not kickoff a hotfix because the source tag does not exist" if hotfix_from_new_branch? && !hotfix_tag_exists?
raise "Could not kickoff a hotfix because the source release branch does not exist" if hotfix_from_previous_branch? && !hotfix_branch_exists?
raise "Cannot start a train that is not active!" if train.inactive?
raise "No more releases can be started until the ongoing release is finished!" if train.ongoing_release.present? && automatic
raise "No more releases can be started until the ongoing release is finished!" if train.upcoming_release.present? && !hotfix?
raise "Upcoming releases are not allowed for your train." if train.ongoing_release.present? && !train.upcoming_release_startable? && !hotfix?
raise "App is in draft mode, cannot start a release to public channels!" if train.app.in_draft_mode? && train.has_restricted_public_channels?
Expand All @@ -44,7 +43,6 @@ def call
def kickoff
train.with_lock do
raise AppInDraftMode.new("App is in draft mode, cannot start a release!") if train.app.in_draft_mode?
raise ReleaseAlreadyInProgress.new("No more releases can be started until the ongoing release is finished!") if train.ongoing_release.present? && automatic
raise ReleaseAlreadyInProgress.new("No more releases can be started until the ongoing release is finished!") if train.upcoming_release.present? && !hotfix?
raise UpcomingReleaseNotAllowed.new("Upcoming releases are not allowed for your train.") if train.ongoing_release.present? && !train.upcoming_release_startable? && !hotfix?
raise NothingToRelease.new("No diff since last release") if regular_release? && !train.diff_since_last_release?
Expand Down
7 changes: 0 additions & 7 deletions spec/libs/coordinators/start_release_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,6 @@
}.to raise_error("Cannot start a train that is not active!")
end

it "raises an error when there is an existing ongoing release and the release is automatic" do
_existing_release = create(:release, :on_track, train:)
expect {
described_class.call(train, automatic: true)
}.to raise_error("No more releases can be started until the ongoing release is finished!")
end

it "raises an error when there is an existing upcoming release and the release is not a hotfix" do
_ongoing_release = create(:release, :on_track, train:)
_upcoming_release = create(:release, :on_track, train:)
Expand Down

0 comments on commit 0395d1c

Please sign in to comment.