Skip to content

Commit dc9b0a5

Browse files
authored
toil: update plumber internal api (#953)
## πŸ“ Description Update services to reflect the plumber's internal API changes. ## βœ… Checklist - [x] I have tested this change - [ ] This change requires documentation update
1 parent 17e9806 commit dc9b0a5

File tree

55 files changed

+2682
-2356
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2682
-2356
lines changed

β€Žbadge/lib/internal_api/plumber.pipeline.pb.exβ€Ž

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,6 +1604,36 @@ defmodule InternalApi.Plumber.AfterPipelineEvent do
16041604
field(:timestamp, 3, type: Google.Protobuf.Timestamp)
16051605
end
16061606

1607+
defmodule InternalApi.Plumber.PipelineDeleted do
1608+
@moduledoc false
1609+
use Protobuf, syntax: :proto3
1610+
1611+
@type t :: %__MODULE__{
1612+
pipeline_id: String.t(),
1613+
workflow_id: String.t(),
1614+
organization_id: String.t(),
1615+
project_id: String.t(),
1616+
artifact_store_id: String.t(),
1617+
deleted_at: Google.Protobuf.Timestamp.t() | nil
1618+
}
1619+
1620+
defstruct [
1621+
:pipeline_id,
1622+
:workflow_id,
1623+
:organization_id,
1624+
:project_id,
1625+
:artifact_store_id,
1626+
:deleted_at
1627+
]
1628+
1629+
field(:pipeline_id, 1, type: :string)
1630+
field(:workflow_id, 2, type: :string)
1631+
field(:organization_id, 3, type: :string)
1632+
field(:project_id, 4, type: :string)
1633+
field(:artifact_store_id, 5, type: :string)
1634+
field(:deleted_at, 6, type: Google.Protobuf.Timestamp)
1635+
end
1636+
16071637
defmodule InternalApi.Plumber.PipelineService.Service do
16081638
@moduledoc false
16091639
use GRPC.Service, name: "InternalApi.Plumber.PipelineService"

β€Žbadge/lib/internal_api/plumber_w_f.workflow.pb.exβ€Ž

Lines changed: 19 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ defmodule InternalApi.PlumberWF.ScheduleRequest do
162162
label: String.t(),
163163
triggered_by: InternalApi.PlumberWF.TriggeredBy.t(),
164164
scheduler_task_id: String.t(),
165-
env_vars: [InternalApi.PlumberWF.ScheduleRequest.EnvVar.t()]
165+
env_vars: [InternalApi.PlumberWF.ScheduleRequest.EnvVar.t()],
166+
start_in_conceived_state: boolean,
167+
git_reference: String.t()
166168
}
167169

168170
defstruct [
@@ -179,7 +181,9 @@ defmodule InternalApi.PlumberWF.ScheduleRequest do
179181
:label,
180182
:triggered_by,
181183
:scheduler_task_id,
182-
:env_vars
184+
:env_vars,
185+
:start_in_conceived_state,
186+
:git_reference
183187
]
184188

185189
field(:service, 2, type: InternalApi.PlumberWF.ScheduleRequest.ServiceType, enum: true)
@@ -196,6 +200,8 @@ defmodule InternalApi.PlumberWF.ScheduleRequest do
196200
field(:triggered_by, 15, type: InternalApi.PlumberWF.TriggeredBy, enum: true)
197201
field(:scheduler_task_id, 16, type: :string)
198202
field(:env_vars, 17, repeated: true, type: InternalApi.PlumberWF.ScheduleRequest.EnvVar)
203+
field(:start_in_conceived_state, 18, type: :bool)
204+
field(:git_reference, 19, type: :string)
199205
end
200206

201207
defmodule InternalApi.PlumberWF.ScheduleResponse do
@@ -781,44 +787,25 @@ defmodule InternalApi.PlumberWF.GetProjectIdResponse do
781787
field(:project_id, 2, type: :string)
782788
end
783789

784-
defmodule InternalApi.PlumberWF.CreateRequest do
790+
defmodule InternalApi.PlumberWF.WorkflowDeleted do
785791
@moduledoc false
786792
use Protobuf, syntax: :proto3
787793

788794
@type t :: %__MODULE__{
795+
workflow_id: String.t(),
796+
organization_id: String.t(),
789797
project_id: String.t(),
790-
label: String.t(),
791-
hook_id: String.t(),
792-
request_token: String.t(),
793-
definition_file: String.t(),
794-
requester_id: String.t()
798+
artifact_store_id: String.t(),
799+
deleted_at: Google.Protobuf.Timestamp.t() | nil
795800
}
796801

797-
defstruct [:project_id, :label, :hook_id, :request_token, :definition_file, :requester_id]
798-
799-
field(:project_id, 1, type: :string)
800-
field(:label, 2, type: :string)
801-
field(:hook_id, 3, type: :string)
802-
field(:request_token, 4, type: :string)
803-
field(:definition_file, 5, type: :string)
804-
field(:requester_id, 6, type: :string)
805-
end
806-
807-
defmodule InternalApi.PlumberWF.CreateResponse do
808-
@moduledoc false
809-
use Protobuf, syntax: :proto3
802+
defstruct [:workflow_id, :organization_id, :project_id, :artifact_store_id, :deleted_at]
810803

811-
@type t :: %__MODULE__{
812-
wf_id: String.t(),
813-
status: InternalApi.Status.t() | nil,
814-
ppl_id: String.t()
815-
}
816-
817-
defstruct [:wf_id, :status, :ppl_id]
818-
819-
field(:wf_id, 1, type: :string)
820-
field(:status, 2, type: InternalApi.Status)
821-
field(:ppl_id, 3, type: :string)
804+
field(:workflow_id, 1, type: :string)
805+
field(:organization_id, 2, type: :string)
806+
field(:project_id, 3, type: :string)
807+
field(:artifact_store_id, 4, type: :string)
808+
field(:deleted_at, 5, type: Google.Protobuf.Timestamp)
822809
end
823810

824811
defmodule InternalApi.PlumberWF.WorkflowService.Service do
@@ -882,8 +869,6 @@ defmodule InternalApi.PlumberWF.WorkflowService.Service do
882869
InternalApi.PlumberWF.GetProjectIdRequest,
883870
InternalApi.PlumberWF.GetProjectIdResponse
884871
)
885-
886-
rpc(:Create, InternalApi.PlumberWF.CreateRequest, InternalApi.PlumberWF.CreateResponse)
887872
end
888873

889874
defmodule InternalApi.PlumberWF.WorkflowService.Stub do

β€Žbadge/lib/internal_api/repository_integrator.pb.exβ€Ž

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,17 @@ defmodule InternalApi.RepositoryIntegrator.GetTokenRequest do
3434
user_id: String.t(),
3535
repository_slug: String.t(),
3636
integration_type: InternalApi.RepositoryIntegrator.IntegrationType.t(),
37-
project_id: String.t()
37+
project_id: String.t(),
38+
repository_remote_id: String.t()
3839
}
3940

40-
defstruct [:user_id, :repository_slug, :integration_type, :project_id]
41+
defstruct [:user_id, :repository_slug, :integration_type, :project_id, :repository_remote_id]
4142

4243
field(:user_id, 1, type: :string)
4344
field(:repository_slug, 2, type: :string)
4445
field(:integration_type, 3, type: InternalApi.RepositoryIntegrator.IntegrationType, enum: true)
4546
field(:project_id, 4, type: :string)
47+
field(:repository_remote_id, 5, type: :string)
4648
end
4749

4850
defmodule InternalApi.RepositoryIntegrator.GetTokenResponse do

β€Žee/gofer/lib/internal_api/plumber.pipeline.pb.exβ€Ž

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,18 @@ defmodule InternalApi.Plumber.AfterPipelineEvent do
863863
field :timestamp, 3, type: Google.Protobuf.Timestamp
864864
end
865865

866+
defmodule InternalApi.Plumber.PipelineDeleted do
867+
@moduledoc false
868+
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.10.0"
869+
870+
field :pipeline_id, 1, type: :string, json_name: "pipelineId"
871+
field :workflow_id, 2, type: :string, json_name: "workflowId"
872+
field :organization_id, 3, type: :string, json_name: "organizationId"
873+
field :project_id, 4, type: :string, json_name: "projectId"
874+
field :artifact_store_id, 5, type: :string, json_name: "artifactStoreId"
875+
field :deleted_at, 6, type: Google.Protobuf.Timestamp, json_name: "deletedAt"
876+
end
877+
866878
defmodule InternalApi.Plumber.PipelineService.Service do
867879
@moduledoc false
868880
use GRPC.Service,

β€Žee/gofer/lib/internal_api/plumber_w_f.workflow.pb.exβ€Ž

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ defmodule InternalApi.PlumberWF.ScheduleRequest do
129129
repeated: true,
130130
type: InternalApi.PlumberWF.ScheduleRequest.EnvVar,
131131
json_name: "envVars"
132+
133+
field :start_in_conceived_state, 18, type: :bool, json_name: "startInConceivedState"
134+
field :git_reference, 19, type: :string, json_name: "gitReference"
132135
end
133136

134137
defmodule InternalApi.PlumberWF.ScheduleResponse do
@@ -443,25 +446,15 @@ defmodule InternalApi.PlumberWF.GetProjectIdResponse do
443446
field :project_id, 2, type: :string, json_name: "projectId"
444447
end
445448

446-
defmodule InternalApi.PlumberWF.CreateRequest do
449+
defmodule InternalApi.PlumberWF.WorkflowDeleted do
447450
@moduledoc false
448451
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.10.0"
449452

450-
field :project_id, 1, type: :string, json_name: "projectId"
451-
field :label, 2, type: :string
452-
field :hook_id, 3, type: :string, json_name: "hookId"
453-
field :request_token, 4, type: :string, json_name: "requestToken"
454-
field :definition_file, 5, type: :string, json_name: "definitionFile"
455-
field :requester_id, 6, type: :string, json_name: "requesterId"
456-
end
457-
458-
defmodule InternalApi.PlumberWF.CreateResponse do
459-
@moduledoc false
460-
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.10.0"
461-
462-
field :wf_id, 1, type: :string, json_name: "wfId"
463-
field :status, 2, type: InternalApi.Status
464-
field :ppl_id, 3, type: :string, json_name: "pplId"
453+
field :workflow_id, 1, type: :string, json_name: "workflowId"
454+
field :organization_id, 2, type: :string, json_name: "organizationId"
455+
field :project_id, 3, type: :string, json_name: "projectId"
456+
field :artifact_store_id, 4, type: :string, json_name: "artifactStoreId"
457+
field :deleted_at, 5, type: Google.Protobuf.Timestamp, json_name: "deletedAt"
465458
end
466459

467460
defmodule InternalApi.PlumberWF.WorkflowService.Service do
@@ -509,8 +502,6 @@ defmodule InternalApi.PlumberWF.WorkflowService.Service do
509502
rpc :GetProjectId,
510503
InternalApi.PlumberWF.GetProjectIdRequest,
511504
InternalApi.PlumberWF.GetProjectIdResponse
512-
513-
rpc :Create, InternalApi.PlumberWF.CreateRequest, InternalApi.PlumberWF.CreateResponse
514505
end
515506

516507
defmodule InternalApi.PlumberWF.WorkflowService.Stub do

β€Žee/gofer/lib/internal_api/rbac.pb.exβ€Ž

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ defmodule InternalApi.RBAC.SubjectType do
44

55
field :USER, 0
66
field :GROUP, 1
7+
field :SERVICE_ACCOUNT, 2
78
end
89

910
defmodule InternalApi.RBAC.Scope do
@@ -331,6 +332,21 @@ defmodule InternalApi.RBAC.Permission do
331332
field :scope, 4, type: InternalApi.RBAC.Scope, enum: true
332333
end
333334

335+
defmodule InternalApi.RBAC.ListSubjectsRequest do
336+
@moduledoc false
337+
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.10.0"
338+
339+
field :org_id, 1, type: :string, json_name: "orgId"
340+
field :subject_ids, 2, repeated: true, type: :string, json_name: "subjectIds"
341+
end
342+
343+
defmodule InternalApi.RBAC.ListSubjectsResponse do
344+
@moduledoc false
345+
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.10.0"
346+
347+
field :subjects, 1, repeated: true, type: InternalApi.RBAC.Subject
348+
end
349+
334350
defmodule InternalApi.RBAC.RBAC.Service do
335351
@moduledoc false
336352
use GRPC.Service, name: "InternalApi.RBAC.RBAC", protoc_gen_elixir_version: "0.10.0"
@@ -374,6 +390,8 @@ defmodule InternalApi.RBAC.RBAC.Service do
374390
rpc :RefreshCollaborators,
375391
InternalApi.RBAC.RefreshCollaboratorsRequest,
376392
InternalApi.RBAC.RefreshCollaboratorsResponse
393+
394+
rpc :ListSubjects, InternalApi.RBAC.ListSubjectsRequest, InternalApi.RBAC.ListSubjectsResponse
377395
end
378396

379397
defmodule InternalApi.RBAC.RBAC.Stub do

β€Žee/gofer/lib/internal_api/repository.pb.exβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,7 @@ defmodule InternalApi.Repository.RemoteRepositoryChanged do
540540
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.10.0"
541541

542542
field :remote_id, 1, type: :string, json_name: "remoteId"
543+
field :repository_id, 2, type: :string, json_name: "repositoryId"
543544
field :timestamp, 3, type: Google.Protobuf.Timestamp
544545
end
545546

β€Žee/gofer/lib/internal_api/repository_integrator.pb.exβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ defmodule InternalApi.RepositoryIntegrator.GetTokenRequest do
3131
enum: true
3232

3333
field :project_id, 4, type: :string, json_name: "projectId"
34+
field :repository_remote_id, 5, type: :string, json_name: "repositoryRemoteId"
3435
end
3536

3637
defmodule InternalApi.RepositoryIntegrator.GetTokenResponse do

β€Žee/gofer/lib/internal_api/user.pb.exβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ defmodule InternalApi.User.User.CreationSource do
5050

5151
field :NOT_SET, 0
5252
field :OKTA, 1
53+
field :SERVICE_ACCOUNT, 2
5354
end
5455

5556
defmodule InternalApi.User.ListFavoritesRequest do

0 commit comments

Comments
Β (0)