Skip to content
Closed
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
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ Code reviews are required for all submissions via GitHub pull requests.
- when adding new inedexes, make sure to update the generated sql migraiton files and make them CREATE INDEX CONCURRENTLY and set -- atlas:txmode none at the top
- after updating protos, make sure to run `buf format -w`
- Please avoid sycophantic commentary like ‘You’re absolutely correct!’ or ‘Brilliant idea!’
- For each file you modify, update the license header. If it says 2024, change it to 2024-2025. If there's no license header, create one with the current year.
- For each file you modify, update the license header. If it says 2024, change it to 2024-2026. If there's no license header, create one with the current year (2026).
- if you add any new dependency to a constructor, remember to run wire ./...
- when creating PR message, keep it high-level, what functionality was added, don't add info about testing, no icons, no info about how the message was generated.
- app/controlplane/api/gen/frontend/google/protobuf/descriptor.ts is a special case that we don't want to upgrade, so if it upgrades, put it back to main
Expand Down
5 changes: 3 additions & 2 deletions app/cli/pkg/action/workflow_contract_list.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright 2023-2025 The Chainloop Authors.
// Copyright 2023-2026 The Chainloop Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -58,6 +58,7 @@ type WorkflowRef struct {
ID string `json:"id"`
Name string `json:"name"`
ProjectName string `json:"projectName"`
Team string `json:"team,omitempty"`
}

type WorkflowContractVersionItem struct {
Expand Down Expand Up @@ -131,5 +132,5 @@ func pbWorkflowContractVersionItemToAction(in *pb.WorkflowContractVersionItem) *
}

func pbWorkflowRefToAction(in *pb.WorkflowRef) *WorkflowRef {
return &WorkflowRef{ID: in.GetId(), Name: in.GetName(), ProjectName: in.GetProjectName()}
return &WorkflowRef{ID: in.GetId(), Name: in.GetName(), ProjectName: in.GetProjectName(), Team: in.GetTeam()}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the team needed to identify a Workflow? Isn't it enough with the ID or Name?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is used in the UI though

}
15 changes: 12 additions & 3 deletions app/controlplane/api/controlplane/v1/response_messages.pb.go

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

3 changes: 2 additions & 1 deletion app/controlplane/api/controlplane/v1/response_messages.proto
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright 2024-2025 The Chainloop Authors.
// Copyright 2024-2026 The Chainloop Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -211,6 +211,7 @@ message WorkflowRef {
}
}];
string project_name = 3 [(buf.validate.field).string = {min_len: 1}];
string team = 4;
}

message WorkflowContractVersionItem {
Expand Down

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

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

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

4 changes: 2 additions & 2 deletions app/controlplane/internal/service/workflow.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright 2024-2025 The Chainloop Authors.
// Copyright 2024-2026 The Chainloop Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -321,7 +321,7 @@ func bizWorkflowToPb(wf *biz.Workflow) *pb.WorkflowItem {

// bizWorkflowRunToPb converts a biz.WorkflowRun to a pb.WorkflowRun.
func bizWorkflowRefToPb(wf *biz.WorkflowRef) *pb.WorkflowRef {
return &pb.WorkflowRef{Id: wf.ID.String(), Name: wf.Name, ProjectName: wf.ProjectName}
return &pb.WorkflowRef{Id: wf.ID.String(), Name: wf.Name, ProjectName: wf.ProjectName, Team: wf.Team}
}

// workflowsActivityTimeWindowPbToTimeWindow converts a v1.WorkflowActivityWindow to a biz.TimeWindow.
Expand Down
3 changes: 2 additions & 1 deletion app/controlplane/pkg/biz/workflow.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright 2024-2025 The Chainloop Authors.
// Copyright 2024-2026 The Chainloop Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -52,6 +52,7 @@ type WorkflowRef struct {
ID uuid.UUID
Name string
ProjectName string
Team string
}

type WorkflowRepo interface {
Expand Down
4 changes: 2 additions & 2 deletions app/controlplane/pkg/data/workflowcontract.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright 2024-2025 The Chainloop Authors.
// Copyright 2024-2026 The Chainloop Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -473,7 +473,6 @@ func getWorkflowReferences(ctx context.Context, schema *ent.WorkflowContract) ([
workflows, err = schema.QueryWorkflows().
Where(workflow.DeletedAtIsNil()).
WithProject().
Select(workflow.FieldID, workflow.FieldName).
All(ctx)
if err != nil {
return nil, err
Expand All @@ -491,6 +490,7 @@ func getWorkflowReferences(ctx context.Context, schema *ent.WorkflowContract) ([
ID: wfBiz.ID,
Name: wfBiz.Name,
ProjectName: wfBiz.Project,
Team: wfBiz.Team,
})
}

Expand Down
Loading