-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Display MySQL user defined error in API Key UI (#4590) * Display MySQL user defined error in UI Signed-off-by: Kenta Kozuka <[email protected]> * Fix Unexpected empty arrow function Signed-off-by: Kenta Kozuka <[email protected]> * Add tests Signed-off-by: Kenta Kozuka <[email protected]> * Run subtests in parallel Signed-off-by: Kenta Kozuka <[email protected]> --------- Signed-off-by: Kenta Kozuka <[email protected]> * Display MySQL user defined error of piped, command, and application (#4597) Signed-off-by: Kenta Kozuka <[email protected]> * Add service tags as takset task on create (#4598) Signed-off-by: khanhtc1202 <[email protected]> * [ECS] Fix remove all previous active tasksets on QuickSync (#4600) * Remove previous ACTIVE tasksets if present on quicksync Signed-off-by: khanhtc1202 <[email protected]> * Remove GetPrimaryTaskSet interface Signed-off-by: khanhtc1202 <[email protected]> --------- Signed-off-by: khanhtc1202 <[email protected]> * Fix unable to fetch ECS taskset tags (#4605) Signed-off-by: khanhtc1202 <[email protected]> * Support recreate for ECS tasks (#4608) * Support singleton ECS task Signed-off-by: khanhtc1202 <[email protected]> * Rename singleton to recreate Signed-off-by: khanhtc1202 <[email protected]> --------- Signed-off-by: khanhtc1202 <[email protected]> --------- Signed-off-by: Kenta Kozuka <[email protected]> Signed-off-by: khanhtc1202 <[email protected]> Co-authored-by: Kenta Kozuka <[email protected]>
- Loading branch information
1 parent
3b63fe5
commit b6f9d17
Showing
16 changed files
with
306 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright 2023 The PipeCD Authors. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package ecs | ||
|
||
import "github.com/aws/aws-sdk-go-v2/service/ecs/types" | ||
|
||
func IsPipeCDManagedTaskSet(ts *types.TaskSet) bool { | ||
for _, tag := range ts.Tags { | ||
if *tag.Key == LabelManagedBy && *tag.Value == ManagedByPiped { | ||
return true | ||
} | ||
} | ||
return false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// Copyright 2023 The PipeCD Authors. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package ecs | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/aws/aws-sdk-go-v2/aws" | ||
"github.com/aws/aws-sdk-go-v2/service/ecs/types" | ||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestIsPipeCDManagedTaskSet(t *testing.T) { | ||
t.Parallel() | ||
|
||
testcases := []struct { | ||
name string | ||
ts *types.TaskSet | ||
expected bool | ||
}{ | ||
{ | ||
name: "managed by piped", | ||
ts: &types.TaskSet{Tags: []types.Tag{ | ||
{Key: aws.String(LabelManagedBy), Value: aws.String(ManagedByPiped)}, | ||
}}, | ||
expected: true, | ||
}, | ||
{ | ||
name: "nil tags", | ||
ts: &types.TaskSet{}, | ||
expected: false, | ||
}, | ||
{ | ||
name: "not managed by piped", | ||
ts: &types.TaskSet{Tags: []types.Tag{ | ||
{Key: aws.String(LabelManagedBy), Value: aws.String("other")}, | ||
{Key: aws.String("hoge"), Value: aws.String("fuga")}, | ||
}}, | ||
expected: false, | ||
}, | ||
} | ||
|
||
for _, tc := range testcases { | ||
t.Run(tc.name, func(t *testing.T) { | ||
got := IsPipeCDManagedTaskSet(tc.ts) | ||
assert.Equal(t, tc.expected, got) | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.