Skip to content

[Maintenance] Lint Protos #1748

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

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- (Feature) Helm Client Support
- (Feature) Helm Client Extension
- (Feature) (Integration) SchedulerV2 Definition
- (Maintenance) Proto Lint

## [1.2.43](https://github.com/arangodb/kube-arangodb/tree/1.2.43) (2024-10-14)
- (Feature) ArangoRoute CRD
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,6 @@ sync-charts:
sync: sync-charts

ci-check:
@$(MAKE) tidy vendor generate update-generated synchronize-v2alpha1-with-v1 sync fmt yamlfmt license
@$(MAKE) tidy vendor generate update-generated synchronize-v2alpha1-with-v1 sync fmt yamlfmt license protolint
@git checkout -- go.sum # ignore changes in go.sum
@if [ ! -z "$(git status --porcelain)" ]; then echo "There are uncommited changes!"; git status; exit 1; fi
75 changes: 37 additions & 38 deletions integrations/config/v1/definition/config.pb.go

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

7 changes: 5 additions & 2 deletions integrations/config/v1/definition/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ option go_package = "github.com/arangodb/kube-arangodb/integrations/config/v1/de

// ConfigV1 Service implementation
service ConfigV1 {
// Returns list of registered modules
rpc Modules(shared.Empty) returns (ConfigV1ModulesResponse);
// Returns details of the module
rpc ModuleDetails(ConfigV1ModuleDetailsRequest) returns (ConfigV1ModuleDetailsResponse);
// Returns file details
rpc FileDetails(ConfigV1FileDetailsRequest) returns (ConfigV1FileDetailsResponse);
}

Expand Down Expand Up @@ -99,8 +102,8 @@ message ConfigV1File {
optional string checksum = 3;

// Timestamp of the file creation
google.protobuf.Timestamp created_at = 4;
google.protobuf.Timestamp created = 4;

// Timestamp of the file update
google.protobuf.Timestamp updated_at = 5;
google.protobuf.Timestamp updated = 5;
}
6 changes: 6 additions & 0 deletions integrations/config/v1/definition/config_grpc.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 integrations/config/v1/impl_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ func (i *impl) fileDetails(module ModuleDefinition, file string, checksum bool)

f.Path = strings.TrimPrefix(expectedPath, fmt.Sprintf("%s/", module.Path))
f.Size = finfo.Size
f.CreatedAt = timestamppb.New(time.Unix(finfo.Ctimespec.Sec, finfo.Ctimespec.Nsec))
f.UpdatedAt = timestamppb.New(time.Unix(finfo.Mtimespec.Sec, finfo.Mtimespec.Nsec))
f.Created = timestamppb.New(time.Unix(finfo.Ctimespec.Sec, finfo.Ctimespec.Nsec))
f.Updated = timestamppb.New(time.Unix(finfo.Mtimespec.Sec, finfo.Mtimespec.Nsec))

if checksum {
c, err := util.SHA256FromFile(expectedPath)
Expand Down
4 changes: 2 additions & 2 deletions integrations/config/v1/impl_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ func (i *impl) fileDetails(module ModuleDefinition, file string, checksum bool)

f.Path = strings.TrimPrefix(expectedPath, fmt.Sprintf("%s/", module.Path))
f.Size = finfo.Size
f.CreatedAt = timestamppb.New(time.Unix(finfo.Ctim.Sec, finfo.Ctim.Nsec))
f.UpdatedAt = timestamppb.New(time.Unix(finfo.Mtim.Sec, finfo.Mtim.Nsec))
f.Created = timestamppb.New(time.Unix(finfo.Ctim.Sec, finfo.Ctim.Nsec))
f.Updated = timestamppb.New(time.Unix(finfo.Mtim.Sec, finfo.Mtim.Nsec))

if checksum {
c, err := util.SHA256FromFile(expectedPath)
Expand Down
1 change: 1 addition & 0 deletions integrations/pong/v1/definition/pong.proto
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ option go_package = "github.com/arangodb/kube-arangodb/integrations/pong/v1/defi

// PongV1 Service implementation
service PongV1 {
// Sends ping to the server
rpc Ping(shared.Empty) returns (PongV1PingResponse);
}

Expand Down
2 changes: 2 additions & 0 deletions integrations/pong/v1/definition/pong_grpc.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 integrations/scheduler/v1/definition/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ message StatusMetadata {
bool created = 1;

// Defines checksum
optional string checksum =2;
optional string checksum = 2;

// Defines uid
optional string uid =3;
optional string uid = 3;

// Defiles list of applied profiles
repeated string profiles = 4;
Expand Down
14 changes: 7 additions & 7 deletions integrations/scheduler/v1/definition/cronjob.pb.go

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

2 changes: 1 addition & 1 deletion integrations/scheduler/v1/definition/cronjob.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ syntax = "proto3";

package scheduler;

import "integrations/scheduler/v1/definition/common.proto";
import "integrations/scheduler/v1/definition/batchjob.proto";
import "integrations/scheduler/v1/definition/common.proto";

option go_package = "github.com/arangodb/kube-arangodb/integrations/scheduler/v1/definition";

Expand Down
4 changes: 2 additions & 2 deletions integrations/scheduler/v1/definition/definition.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ option go_package = "github.com/arangodb/kube-arangodb/integrations/scheduler/v1
// Definition of the ServiceInterface for Scheduler V1
service SchedulerV1 {
// BatchJob

// Creates BatchJob from specification
rpc CreateBatchJob(CreateBatchJobRequest) returns (CreateBatchJobResponse) {};

Expand All @@ -44,7 +44,7 @@ service SchedulerV1 {

// Deletes BatchJob. If job does not exists, Exists flag is set to false
rpc DeleteBatchJob(DeleteBatchJobRequest) returns (DeleteBatchJobResponse) {};

// CronJob

// Creates CronJob from specification
Expand Down
2 changes: 1 addition & 1 deletion integrations/scheduler/v1/definition/deployment.proto
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ message DeploymentSpec {
message DeploymentStatus {

// Total number of non-terminated pods targeted by this deployment (their labels match the selector).
int32 replicas=1;
int32 replicas = 1;

// Total number of non-terminated pods targeted by this deployment that have the desired template spec.
int32 updated_replicas = 2;
Expand Down