Skip to content

Commit

Permalink
chore: Format and regenerate proto files
Browse files Browse the repository at this point in the history
Signed-off-by: jay-dee7 <[email protected]>
  • Loading branch information
jay-dee7 committed Oct 12, 2024
1 parent 857be89 commit f19f016
Show file tree
Hide file tree
Showing 10 changed files with 241 additions and 698 deletions.
28 changes: 6 additions & 22 deletions common/v1/id.pb.go

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

4 changes: 0 additions & 4 deletions dfs/storj/uplink/uplink.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@ func (u *storjUplink) UploadPart(
ctx, cancel := context.WithTimeout(ctx, time.Minute*20)
defer cancel()

if partNumber > config.MaxS3UploadParts {
return s3types.CompletedPart{}, errors.New("ERR_TOO_MANY_PARTS")
}

//nolint:gosec
resp, err := u.client.UploadPart(ctx, u.bucket, key, uploadId, uint32(partNumber))
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion protos/buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: v1
name: buf.build/containerish/openregistry
lint:
use:
- DEFAULT
- STANDARD
deps:
- buf.build/googleapis/googleapis
- buf.build/envoyproxy/protoc-gen-validate
Expand Down
5 changes: 3 additions & 2 deletions protos/common/v1/id.proto
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
syntax = "proto3";

package common.v1;

option go_package = "github.com/containerish/OpenRegistry/common/v1;common_v1";

message UUID {
string value = 1;
}
string value = 1;
}
100 changes: 50 additions & 50 deletions protos/services/kon/github_actions/v1/build_job.proto
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
syntax = "proto3";

package services.kon.github_actions.v1;
option go_package = "github.com/containerish/OpenRegistry/services/kon/github_actions/v1;github_actions_v1";

import "common/v1/id.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "common/v1/id.proto";

option go_package = "github.com/containerish/OpenRegistry/services/kon/github_actions/v1;github_actions_v1";

service GithubActionsBuildService {
rpc StoreJob(StoreJobRequest) returns (StoreJobResponse) {}
Expand All @@ -17,91 +19,89 @@ service GithubActionsBuildService {
}

message BulkDeleteBuildJobsRequest {
common.v1.UUID repository_id = 1;
repeated common.v1.UUID job_ids = 2;
string repo = 3;
common.v1.UUID repository_id = 1;
repeated common.v1.UUID job_ids = 2;
string repo = 3;
}

message BulkDeleteBuildJobsResponse {
string message = 1;
string message = 1;
}

message TriggerBuildRequest {
common.v1.UUID run_id = 1;
google.protobuf.Timestamp triggered_at = 2;
common.v1.UUID repository_id = 3;
string repo = 4;
common.v1.UUID run_id = 1;
google.protobuf.Timestamp triggered_at = 2;
common.v1.UUID repository_id = 3;
string repo = 4;
}

message TriggerBuildResponse {
string message = 1;
string message = 1;
}


message CancelBuildRequest {
common.v1.UUID job_id = 1;
int64 run_id = 2;
google.protobuf.Timestamp cancelled_at = 3;
common.v1.UUID repository_id = 4;
string repo = 5;
common.v1.UUID job_id = 1;
int64 run_id = 2;
google.protobuf.Timestamp cancelled_at = 3;
common.v1.UUID repository_id = 4;
string repo = 5;
}

message CancelBuildResponse {
string message = 1;
string message = 1;
}

message GetBuildJobRequest {
common.v1.UUID job_id = 1;
common.v1.UUID repository_id = 2;
string repo = 3;
common.v1.UUID job_id = 1;
common.v1.UUID repository_id = 2;
string repo = 3;
}

message GetBuildJobResponse {
common.v1.UUID id = 1;
string logs_url = 2;
string status = 3;
string triggered_by = 4;
google.protobuf.Duration duration = 5;
string branch = 6;
string commit_hash = 7;
google.protobuf.Timestamp triggered_at = 8;
common.v1.UUID repository_id = 9;
common.v1.UUID id = 1;
string logs_url = 2;
string status = 3;
string triggered_by = 4;
google.protobuf.Duration duration = 5;
string branch = 6;
string commit_hash = 7;
google.protobuf.Timestamp triggered_at = 8;
common.v1.UUID repository_id = 9;
}

message DeleteJobRequest {
int64 run_id = 1;
common.v1.UUID repository_id = 2;
string repo = 3;
int64 run_id = 1;
common.v1.UUID repository_id = 2;
string repo = 3;
}

message DeleteJobResponse {
string message = 1;
string message = 1;
}

message StoreJobResponse {
string message = 1;
common.v1.UUID id = 2;
string message = 1;
common.v1.UUID id = 2;
}

message StoreJobRequest {
string id = 1;
string logs_url = 2;
string status = 3;
string triggered_by = 4;
google.protobuf.Duration duration = 5;
string branch = 6;
string commit_hash = 7;
google.protobuf.Timestamp triggered_at = 8;
common.v1.UUID repository_id = 9;
string id = 1;
string logs_url = 2;
string status = 3;
string triggered_by = 4;
google.protobuf.Duration duration = 5;
string branch = 6;
string commit_hash = 7;
google.protobuf.Timestamp triggered_at = 8;
common.v1.UUID repository_id = 9;
}

message ListBuildJobsRequest {
string id = 1;
common.v1.UUID repository_id = 2;
string repo = 3;
string id = 1;
common.v1.UUID repository_id = 2;
string repo = 3;
}

message ListBuildJobsResponse {
repeated GetBuildJobResponse jobs = 1;
repeated GetBuildJobResponse jobs = 1;
}

35 changes: 18 additions & 17 deletions protos/services/kon/github_actions/v1/build_logs.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
syntax = "proto3";

package services.kon.github_actions.v1;

option go_package = "github.com/containerish/OpenRegistry/services/kon/github_actions/v1;github_actions_v1";

service GitHubActionsLogsService {
Expand All @@ -9,26 +10,26 @@ service GitHubActionsLogsService {
}

message DumpLogsRequest {
string repo_owner = 1;
string repo_name = 2;
int64 run_id = 3;
bool skip_to_previous_run = 4;
string repo_owner = 1;
string repo_name = 2;
int64 run_id = 3;
bool skip_to_previous_run = 4;
}

message DumpLogsResponse {
repeated string logs = 1;
repeated string logs = 1;
}

message StreamWorkflowRunLogsRequest {
string repo_owner = 1;
string repo_name = 2;
int64 run_id = 3;
bool skip_to_previous_run = 4;
string repo_owner = 1;
string repo_name = 2;
int64 run_id = 3;
bool skip_to_previous_run = 4;
}
message StreamWorkflowDispatchLogsRequest {
string repo_owner = 1;
string repo_name = 2;
int64 dispatch_id = 3;
string repo_owner = 1;
string repo_name = 2;
int64 dispatch_id = 3;
}

message StreamWorkflowRunLogsResponse {
Expand All @@ -41,9 +42,9 @@ message StreamWorkflowDispatchLogsResponse {
}

enum StreamWorkflowRunMessageType {
STREAM_WORKFLOW_RUN_MESSAGE_TYPE_UNSPECIFIED = 0;
STREAM_WORKFLOW_RUN_MESSAGE_TYPE_WAIT = 1;
STREAM_WORKFLOW_RUN_MESSAGE_TYPE_LOG = 2;
STREAM_WORKFLOW_RUN_MESSAGE_TYPE_PROCESSING = 3;
STREAM_WORKFLOW_RUN_MESSAGE_TYPE_STEP = 4;
STREAM_WORKFLOW_RUN_MESSAGE_TYPE_UNSPECIFIED = 0;
STREAM_WORKFLOW_RUN_MESSAGE_TYPE_WAIT = 1;
STREAM_WORKFLOW_RUN_MESSAGE_TYPE_LOG = 2;
STREAM_WORKFLOW_RUN_MESSAGE_TYPE_PROCESSING = 3;
STREAM_WORKFLOW_RUN_MESSAGE_TYPE_STEP = 4;
}
Loading

0 comments on commit f19f016

Please sign in to comment.