-
Notifications
You must be signed in to change notification settings - Fork 139
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
Support multiple manual approvals #2802
Conversation
The following files are not gofmt-ed. By commenting pkg/app/piped/executor/waitapproval/waitapproval.go--- pkg/app/piped/executor/waitapproval/waitapproval.go.orig
+++ pkg/app/piped/executor/waitapproval/waitapproval.go
@@ -30,9 +30,9 @@
)
const (
- approvedByKey = "ApprovedBy"
- minApproverNum = "MinApproverNum"
- approversKey = "CurrentApprovers"
+ approvedByKey = "ApprovedBy"
+ minApproverNum = "MinApproverNum"
+ approversKey = "CurrentApprovers"
)
type Executor struct {
pkg/app/piped/executor/waitapproval/waitapproval_test.go--- pkg/app/piped/executor/waitapproval/waitapproval_test.go.orig
+++ pkg/app/piped/executor/waitapproval/waitapproval_test.go
@@ -18,12 +18,13 @@
"context"
"testing"
+ "github.com/stretchr/testify/assert"
+ "google.golang.org/grpc"
+
"github.com/pipe-cd/pipe/pkg/app/api/service/pipedservice"
"github.com/pipe-cd/pipe/pkg/app/piped/executor"
"github.com/pipe-cd/pipe/pkg/app/piped/metadatastore"
"github.com/pipe-cd/pipe/pkg/model"
- "github.com/stretchr/testify/assert"
- "google.golang.org/grpc"
)
func (c *fakeAPIClient) SaveDeploymentMetadata(ctx context.Context, req *pipedservice.SaveDeploymentMetadataRequest, opts ...grpc.CallOption) (*pipedservice.SaveDeploymentMetadataResponse, error) {
pkg/config/deployment.go--- pkg/config/deployment.go.orig
+++ pkg/config/deployment.go
@@ -365,9 +365,9 @@
type WaitApprovalStageOptions struct {
// The maximum length of time to wait before giving up.
// Defaults to 6h.
- Timeout Duration `json:"timeout"`
- Approvers []string `json:"approvers"`
- MinApproverNum int `json:"minApproverNum"`
+ Timeout Duration `json:"timeout"`
+ Approvers []string `json:"approvers"`
+ MinApproverNum int `json:"minApproverNum"`
}
// AnalysisStageOptions contains all configurable values for a K8S_ANALYSIS stage.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following files are not gofmt-ed. By commenting pkg/app/piped/executor/waitapproval/waitapproval.go--- pkg/app/piped/executor/waitapproval/waitapproval.go.orig
+++ pkg/app/piped/executor/waitapproval/waitapproval.go
@@ -30,9 +30,9 @@
)
const (
- approvedByKey = "ApprovedBy"
- minApproverNum = "MinApproverNum"
- approversKey = "CurrentApprovers"
+ approvedByKey = "ApprovedBy"
+ minApproverNum = "MinApproverNum"
+ approversKey = "CurrentApprovers"
)
type Executor struct {
pkg/app/piped/executor/waitapproval/waitapproval_test.go--- pkg/app/piped/executor/waitapproval/waitapproval_test.go.orig
+++ pkg/app/piped/executor/waitapproval/waitapproval_test.go
@@ -18,12 +18,13 @@
"context"
"testing"
+ "github.com/stretchr/testify/assert"
+ "google.golang.org/grpc"
+
"github.com/pipe-cd/pipe/pkg/app/api/service/pipedservice"
"github.com/pipe-cd/pipe/pkg/app/piped/executor"
"github.com/pipe-cd/pipe/pkg/app/piped/metadatastore"
"github.com/pipe-cd/pipe/pkg/model"
- "github.com/stretchr/testify/assert"
- "google.golang.org/grpc"
)
func (c *fakeAPIClient) SaveDeploymentMetadata(_ context.Context, req *pipedservice.SaveDeploymentMetadataRequest, _ ...grpc.CallOption) (*pipedservice.SaveDeploymentMetadataResponse, error) {
|
Code coverage for golang is
|
The following files are not gofmt-ed. By commenting pkg/app/piped/executor/waitapproval/waitapproval_test.go--- pkg/app/piped/executor/waitapproval/waitapproval_test.go.orig
+++ pkg/app/piped/executor/waitapproval/waitapproval_test.go
@@ -18,12 +18,13 @@
"context"
"testing"
+ "github.com/stretchr/testify/assert"
+ "google.golang.org/grpc"
+
"github.com/pipe-cd/pipe/pkg/app/api/service/pipedservice"
"github.com/pipe-cd/pipe/pkg/app/piped/executor"
"github.com/pipe-cd/pipe/pkg/app/piped/metadatastore"
"github.com/pipe-cd/pipe/pkg/model"
- "github.com/stretchr/testify/assert"
- "google.golang.org/grpc"
)
type fakeLogPersister struct{}
@@ -67,7 +68,6 @@
c.stages[req.StageId] = md
return &pipedservice.SaveStageMetadataResponse{}, nil
}
-
func TestValidateApproverNum(t *testing.T) {
ac := &fakeAPIClient{
|
The following files are not gofmt-ed. By commenting pkg/app/piped/executor/waitapproval/waitapproval_test.go--- pkg/app/piped/executor/waitapproval/waitapproval_test.go.orig
+++ pkg/app/piped/executor/waitapproval/waitapproval_test.go
@@ -18,12 +18,13 @@
"context"
"testing"
+ "github.com/stretchr/testify/assert"
+ "google.golang.org/grpc"
+
"github.com/pipe-cd/pipe/pkg/app/api/service/pipedservice"
"github.com/pipe-cd/pipe/pkg/app/piped/executor"
"github.com/pipe-cd/pipe/pkg/app/piped/metadatastore"
"github.com/pipe-cd/pipe/pkg/model"
- "github.com/stretchr/testify/assert"
- "google.golang.org/grpc"
)
type fakeLogPersister struct{}
|
/golinter fmt |
Code coverage for golang is
|
Updated 👍 |
Code coverage for golang is
|
Thank you. Let me check it now. |
Co-authored-by: Le Van Nghia <nghialv2607@gmail.com>
The golinter build is completed with FAILURE. The build will be triggered again when you push any other commits. Or you can trigger it manually by You can check the build log from here. |
Code coverage for golang is
|
Co-authored-by: Khanh Tran <32532742+khanhtc1202@users.noreply.github.com>
The golinter build is completed with FAILURE. The build will be triggered again when you push any other commits. Or you can trigger it manually by You can check the build log from here. |
The golinter build is completed with FAILURE. The build will be triggered again when you push any other commits. Or you can trigger it manually by You can check the build log from here. |
Co-authored-by: Khanh Tran <32532742+khanhtc1202@users.noreply.github.com>
The golinter build is completed with FAILURE. The build will be triggered again when you push any other commits. Or you can trigger it manually by You can check the build log from here. |
The golinter build is completed with FAILURE. The build will be triggered again when you push any other commits. Or you can trigger it manually by You can check the build log from here. |
Code coverage for golang is
|
/golinter trigger |
Nice work, lets go with this 🚀 |
Nice. |
Holy cow! It blew my mind definitely! |
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #1569
Does this PR introduce a user-facing change?: