Skip to content

Commit

Permalink
Deprecate the port proto message (#4881)
Browse files Browse the repository at this point in the history
Signed-off-by: Radoslav Dimitrov <[email protected]>
  • Loading branch information
rdimitrov authored Nov 5, 2024
1 parent 95d3666 commit 0b2c412
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 45 deletions.
1 change: 0 additions & 1 deletion cmd/cli/app/provider/provider_enroll.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ func enrollUsingOAuth2Flow(
resp, err := oauthClient.GetAuthorizationURL(ctx, &minderv1.GetAuthorizationURLRequest{
Context: &minderv1.Context{Provider: &providerName, Project: &project},
Cli: true,
Port: port,
Owner: &owner,
Config: providerConfig,
ProviderClass: providerClass,
Expand Down
1 change: 0 additions & 1 deletion docs/docs/ref/proto.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions internal/controlplane/handlers_oauth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,7 @@ func TestGetAuthorizationURL(t *testing.T) {
Provider: &githubProviderClass,
Project: &projectIdStr,
},
Port: 8080,
Cli: true,
Cli: true,
},
buildStubs: func(store *mockdb.MockStore) {
store.EXPECT().
Expand Down Expand Up @@ -248,8 +247,7 @@ func TestGetAuthorizationURL(t *testing.T) {
Provider: &githubAppProviderClass,
Project: &projectIdStr,
},
Port: 8080,
Cli: true,
Cli: true,
},
buildStubs: func(store *mockdb.MockStore) {
store.EXPECT().
Expand Down Expand Up @@ -283,8 +281,7 @@ func TestGetAuthorizationURL(t *testing.T) {
Provider: &nonGithubProviderName,
Project: &projectIdStr,
},
Port: 8080,
Cli: true,
Cli: true,
},
buildStubs: func(_ *mockdb.MockStore) {},

Expand All @@ -303,8 +300,7 @@ func TestGetAuthorizationURL(t *testing.T) {
Provider: &githubProviderClass,
Project: &projectIdStr,
},
Port: 8080,
Cli: true,
Cli: true,
},
buildStubs: func(store *mockdb.MockStore) {
store.EXPECT().
Expand Down
7 changes: 0 additions & 7 deletions pkg/api/openapi/minder/v1/minder.swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 18 additions & 26 deletions pkg/api/protobuf/go/minder/v1/minder.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions proto/minder/v1/minder.proto
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,6 @@ message CheckHealthResponse {

message GetAuthorizationURLRequest {
bool cli = 3;
int32 port = 4 [(buf.validate.field).int32 = { gte: 1000, lte: 65535 }];
optional string owner = 5;
Context context = 6;
optional string redirect_url = 7;
Expand All @@ -1001,7 +1000,8 @@ message GetAuthorizationURLRequest {

string provider_class = 9;

reserved 1, 2; // deprecated provider and project_id
reserved 1, 2, 4;
reserved "provider", "project_id", "port";
}

message GetAuthorizationURLResponse {
Expand Down

0 comments on commit 0b2c412

Please sign in to comment.