Skip to content
Open
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 docs/docs/using-semaphore/workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ Selecting **Run on** allows you to configure what triggers are enabled for the p

:::note

**Whitelisted only** only affects branches and tags created *after* enabling this setting. Branches and tags that existed before the setting is enabled are not affected and are always built.
**Whitelisted only** only affects branches and tags created *after* enabling this setting. Branches and tags that existed before the setting is enabled are not affected and are always built. You can change that by enforcing whitelist on the organization settings

:::

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddExpiresAtToJobs < ActiveRecord::Migration[6.1]
def change
add_column :jobs, :expires_at, :datetime
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class AddExpiresCreatedIndexAtJobsTable < ActiveRecord::Migration[6.1]
disable_ddl_transaction!

def change
add_index :jobs,
%i[expires_at created_at],
name: "index_jobs_on_expires_created_not_null",
algorithm: :concurrently,
where: "expires_at IS NOT NULL"
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class AddOrganizationCreatedIndexAtJobsTable < ActiveRecord::Migration[6.1]
disable_ddl_transaction!

def change
add_index :jobs,
%i[organization_id created_at],
name: "index_jobs_on_organization_created_expires_is_null",
algorithm: :concurrently,
where: "expires_at IS NULL"
end
end
8 changes: 8 additions & 0 deletions zebra/config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ config :zebra, Zebra.Workers.TaskFinisher, timeout: 10_000
config :zebra, Zebra.Workers.Dispatcher, timeout: 1_000
config :zebra, Zebra.Workers.Monitor, timeout: 60_000

config :zebra, Zebra.Workers.JobDeletionPolicyWorker,
naptime: 1_000, # 1 second
longnaptime: 3_600_000, # 1 hour
limit: 100

config :zebra, Zebra.Workers.JobDeletionPolicyMarker,
days: 14

config :zebra, Zebra.Workers.Scheduler,
cooldown_period: 1_000,
batch_size: 3
Expand Down
6 changes: 4 additions & 2 deletions zebra/lib/protos/internal_api/artifacthub.pb.ex
Original file line number Diff line number Diff line change
Expand Up @@ -388,12 +388,14 @@ defmodule InternalApi.Artifacthub.ListItem do

@type t :: %__MODULE__{
name: String.t(),
is_directory: boolean
is_directory: boolean,
size: integer
}
defstruct [:name, :is_directory]
defstruct [:name, :is_directory, :size]

field(:name, 1, type: :string)
field(:is_directory, 2, type: :bool)
field(:size, 3, type: :int64)
end

defmodule InternalApi.Artifacthub.Artifact do
Expand Down
29 changes: 29 additions & 0 deletions zebra/lib/protos/internal_api/rbac.pb.ex
Original file line number Diff line number Diff line change
Expand Up @@ -508,12 +508,39 @@ defmodule InternalApi.RBAC.Permission do
field(:scope, 4, type: InternalApi.RBAC.Scope, enum: true)
end

defmodule InternalApi.RBAC.ListSubjectsRequest do
@moduledoc false
use Protobuf, syntax: :proto3

@type t :: %__MODULE__{
org_id: String.t(),
subject_ids: [String.t()]
}
defstruct [:org_id, :subject_ids]

field(:org_id, 1, type: :string)
field(:subject_ids, 2, repeated: true, type: :string)
end

defmodule InternalApi.RBAC.ListSubjectsResponse do
@moduledoc false
use Protobuf, syntax: :proto3

@type t :: %__MODULE__{
subjects: [InternalApi.RBAC.Subject.t()]
}
defstruct [:subjects]

field(:subjects, 1, repeated: true, type: InternalApi.RBAC.Subject)
end

defmodule InternalApi.RBAC.SubjectType do
@moduledoc false
use Protobuf, enum: true, syntax: :proto3

field(:USER, 0)
field(:GROUP, 1)
field(:SERVICE_ACCOUNT, 2)
end

defmodule InternalApi.RBAC.Scope do
Expand Down Expand Up @@ -588,6 +615,8 @@ defmodule InternalApi.RBAC.RBAC.Service do
InternalApi.RBAC.RefreshCollaboratorsRequest,
InternalApi.RBAC.RefreshCollaboratorsResponse
)

rpc(:ListSubjects, InternalApi.RBAC.ListSubjectsRequest, InternalApi.RBAC.ListSubjectsResponse)
end

defmodule InternalApi.RBAC.RBAC.Stub do
Expand Down
Loading