Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
miguel-crespo-fdc committed Oct 14, 2024
1 parent aedf591 commit b57c420
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 23 deletions.
15 changes: 0 additions & 15 deletions pkg/api/v1/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -411,21 +411,6 @@ message RepositoryMetadata {
string manifest_repo_url = 3;
}

message EnvironmentGroupLite {
string environment_group_name = 1;
// note that the distance_to_upstream should usually be configured to be the same for all envs in this group, but this is not enforced.
uint32 distance_to_upstream = 3;
/*
Even though this field has the same name and type as Environment.priority, it does have difference semantics.
Environment priority is calculated based on the location of an environment in a chain. Environment group priority is calculated based on the distance to upstream **and** the maximum global distance to upstream.
This field therefore characterizes the "layer" of an environment group. The reason it is reusing the name and type of Environment.priority is to keep the calculation of environment colors in the frontend untouched.
Note: proper calculation of this field assumes there is not more than one environment group hierarchy; that is, there is only one group with distance_to_upstream = 0.
*/
Priority priority = 4;
}

//Wrapper over array of locks
message Locks {
repeated Lock locks = 2;
Expand Down
17 changes: 9 additions & 8 deletions services/rollout-service/pkg/versions/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,6 @@ func deployedAtFromApp(app *api.Environment_Application) time.Time {
return time.Time{}
}

func team(overview *api.GetOverviewResponse, app string) string {
a := overview.Applications[app]
if a == nil {
return ""
}
return a.Team
}

func sourceCommitId(appReleases []*api.Release, deployment *api.Deployment) string {
for _, rel := range appReleases {
if rel.Version == deployment.Version {
Expand Down Expand Up @@ -234,6 +226,15 @@ func (v *versionClient) ConsumeEvents(ctx context.Context, processor VersionEven
ov, err := v.overviewClient.GetOverview(ctx, &api.GetOverviewRequest{
GitRevision: "", //TODO: Overview will get smaller in the future, for now there is redundant data between appdetails and overview
})
if err != nil {
grpcErr := grpc.UnwrapGRPCStatus(err)
if grpcErr != nil {
if grpcErr.Code() == codes.Canceled {
return nil
}
}
return fmt.Errorf("overviewClient.GetOverview: %w", err)
}
fmt.Println(ov)
l := logger.FromContext(ctx)
v.cache.Add(ov.GitRevision, ov)
Expand Down

0 comments on commit b57c420

Please sign in to comment.