Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

feat: auto-retry for PotgreSQL lock timeout (#15830)

rebelice2be26bb53763
diff --git a/backend/api/v1/project_service.go b/backend/api/v1/project_service.go
index 7ad6d7400d..10b9aeb8a2 100644
--- a/backend/api/v1/project_service.go
+++ b/backend/api/v1/project_service.go
@@ -411,6 +411,10 @@ func (s *ProjectService) UpdateProject(ctx context.Context, request *v1pb.Update
projectSettings := project.Setting
projectSettings.AllowSelfApproval = request.Project.AllowSelfApproval
patch.Setting = projectSettings
+ case "execution_retry_policy":
+ projectSettings := project.Setting
+ projectSettings.ExecutionRetryPolicy = convertToStoreExecutionRetryPolicy(request.Project.ExecutionRetryPolicy)
+ patch.Setting = projectSettings
default:
return nil, status.Errorf(codes.InvalidArgument, `unsupport update_mask "%s"`, path)
}
@@ -1318,6 +1322,29 @@ func convertToProject(projectMessage *store.ProjectMessage) *v1pb.Project {
SkipBackupErrors: projectMessage.Setting.SkipBackupErrors,
PostgresDatabaseTenantMode: projectMessage.Setting.PostgresDatabaseTenantMode,
AllowSelfApproval: projectMessage.Setting.AllowSelfApproval,
+ ExecutionRetryPolicy: convertToV1ExecutionRetryPolicy(projectMessage.Setting.ExecutionRetryPolicy),
+ }
+}
+
+func convertToV1ExecutionRetryPolicy(policy *storepb.Project_ExecutionRetryPolicy) *v1pb.Project_ExecutionRetryPolicy {
+ if policy == nil {
+ return &v1pb.Project_ExecutionRetryPolicy{
+ MaximumRetries: 0,
+ }
+ }
+ return &v1pb.Project_ExecutionRetryPolicy{
+ MaximumRetries: policy.MaximumRetries,
+ }
+}
+
+func convertToStoreExecutionRetryPolicy(policy *v1pb.Project_ExecutionRetryPolicy) *storepb.Project_ExecutionRetryPolicy {
+ if policy == nil {
+ return &storepb.Project_ExecutionRetryPolicy{
+ MaximumRetries: 0,
+ }
+ }
+ return &storepb.Project_ExecutionRetryPolicy{
+ MaximumRetries: policy.MaximumRetries,
}
}
diff --git a/backend/api/v1/rollout_service_converter.go b/backend/api/v1/rollout_service_converter.go
index abd671f325..e5ae9100a7 100644
--- a/backend/api/v1/rollout_service_converter.go
+++ b/backend/api/v1/rollout_service_converter.go
@@ -1026,6 +1026,18 @@ func convertToTaskRunLogEntries(logs []*store.TaskRunLog) []*v1pb.TaskRunLogEntr
prev.PriorBackup.EndTime = timestamppb.New(l.T)
prev.PriorBackup.Error = l.Payload.PriorBackupEnd.Error
prev.PriorBackup.PriorBackupDetail = convertToTaskRunPriorBackupDetail(l.Payload.PriorBackupEnd.PriorBackupDetail)
+ case storepb.TaskRunLog_RETRY_INFO:
+ e := &v1pb.TaskRunLogEntry{
+ Type: v1pb.TaskRunLogEntry_RETRY_INFO,
+ LogTime: timestamppb.New(l.T),
+ DeployId: l.Payload.DeployId,
+ RetryInfo: &v1pb.TaskRunLogEntry_RetryInfo{
+ RetryCount: l.Payload.RetryInfo.RetryCount,
+ MaximumRetries: l.Payload.RetryInfo.MaximumRetries,
+ Error: l.Payload.RetryInfo.Error,
+ },
+ }
+ entries = append(entries, e)
}
}
diff --git a/backend/plugin/db/driver.go b/backend/plugin/db/driver.go
index cf8b82c6a4..788f605309 100644
--- a/backend/plugin/db/driver.go
+++ b/backend/plugin/db/driver.go
@@ -234,6 +234,9 @@ type ExecuteOptions struct {
// Record the connection id first before executing.
SetConnectionID func(id string)
DeleteConnectionID func()
+
+ // The maximum number of retries for lock timeout statements.
+ MaximumRetries int
}
func (o *ExecuteOptions) LogDatabaseSyncStart() {
@@ -325,6 +328,23 @@ func (o *ExecuteOptions) LogCommandResponse(commandIndexes []int32, affectedRows
}
}
+func (o *ExecuteOptions) LogRetryInfo(err error, retryCount int) {
+ if o == nil || o.CreateTaskRunLog == nil {
+ return
+ }
+ err = o.CreateTaskRunLog(time.Now(), &storepb.TaskRunLog{
+ Type: storepb.TaskRunLog_RETRY_INFO,
+ RetryInfo: &storepb.TaskRunLog_RetryInfo{
+ Error: err.Error(),
+ RetryCount: int32(retryCount),
+ MaximumRetries: int32(o.MaximumRetries),
+ },
+ })
+ if err != nil {
+ slog.Warn("failed to log retry info", log.BBError(err))
+ }
+}
+
func (o *ExecuteOptions) LogTransactionControl(t storepb.TaskRunLog_TransactionControl_Type, rerr string) {
if o == nil || o.CreateTaskRunLog == nil {
return
diff --git a/backend/plugin/db/pg/pg.go b/backend/plugin/db/pg/pg.go
index caa9371ce9..f37108cf56 100644
--- a/backend/plugin/db/pg/pg.go
+++ b/backend/plugin/db/pg/pg.go
@@ -320,7 +320,6 @@ func (d *Driver) Execute(ctx context.Context, statement string, opts db.ExecuteO
var nonTransactionAndSetRoleStmts []string
var nonTransactionAndSetRoleStmtsIndex []int32
var isPlsql bool
- oneshot := true
// HACK(p0ny): always split for pg
//nolint
if true || len(statement) <= common.MaxSheetCheckSize {
@@ -337,11 +336,6 @@ func (d *Driver) Execute(ctx context.Context, statement string, opts db.ExecuteO
if len(singleSQLs) == 1 && isPlSQLBlock(singleSQLs[0].Text) {
isPlsql = true
}
- // HACK(p0ny): always split for pg
- //nolint
- if false && len(commands) <= common.MaximumCommands {
- oneshot = false
- }
var tmpCommands []base.SingleSQL
var tmpOriginalIndex []int32
@@ -368,17 +362,60 @@ func (d *Driver) Execute(ctx context.Context, statement string, opts db.ExecuteO
}
commands, originalIndex = tmpCommands, tmpOriginalIndex
}
- // HACK(p0ny): always split for pg
- //nolint
- if false && oneshot {
- commands = []base.SingleSQL{
- {
- Text: statement,
- },
+
+ affectedRows, err := d.tryExecute(ctx, owner, statement, commands, originalIndex, nonTransactionAndSetRoleStmts, nonTransactionAndSetRoleStmtsIndex, opts, isPlsql)
+ if err == nil {
+ return affectedRows, nil
+ }
+ if !errors.As(err, &LockTimeoutError{}) {
+ return affectedRows, err
+ }
+
+ // Lock timeout retries.
+ for i := range opts.MaximumRetries {
+ // Random retry interval.
+ interval := (150 + (i+1)*100/opts.MaximumRetries) * int(time.Millisecond)
+ time.Sleep(time.Duration(interval))
+
+ // Log retry info.
+ opts.LogRetryInfo(err, i+1)
+
+ // Do retry.
+ affectedRows, err = d.tryExecute(ctx, owner, statement, commands, originalIndex, nonTransactionAndSetRoleStmts, nonTransactionAndSetRoleStmtsIndex, opts, isPlsql)
+ if err == nil {
+ break
+ }
+ if !errors.As(err, &LockTimeoutError{}) {
+ break
}
- originalIndex = []int32{0}
}
+ return affectedRows, err
+}
+
+type LockTimeoutError struct {
+ Message string
+}
+
+func (e *LockTimeoutError) Error() string {
+ return e.Message
+}
+
+func isLockTimeoutError(message string) bool {
+ return strings.Contains(message, "canceling statement due to lock timeout")
+}
+
+func (d *Driver) tryExecute(
+ ctx context.Context,
+ owner string,
+ statement string,
+ commands []base.SingleSQL,
+ originalIndex []int32,
+ nonTransactionAndSetRoleStmts []string,
+ nonTransactionAndSetRoleStmtsIndex []int32,
+ opts db.ExecuteOptions,
+ isPlsql bool,
+) (int64, error) {
conn, err := d.db.Conn(ctx)
if err != nil {
return 0, errors.Wrapf(err, "failed to get connection")
@@ -492,6 +529,11 @@ func (d *Driver) Execute(ctx context.Context, statement string, opts db.ExecuteO
return nil
})
if err != nil {
+ if isLockTimeoutError(err.Error()) {
+ return 0, &LockTimeoutError{
+ Message: err.Error(),
+ }
+ }
return 0, err
}
}
diff --git a/backend/runner/taskrun/executor.go b/backend/runner/taskrun/executor.go
index 44cdb74a5f..a32fd908ce 100644
--- a/backend/runner/taskrun/executor.go
+++ b/backend/runner/taskrun/executor.go
@@ -275,6 +275,14 @@ func doMigrationWithFunc(
opts := db.ExecuteOptions{}
+ project, err := stores.GetProjectV2(ctx, &store.FindProjectMessage{ResourceID: &database.ProjectID})
+ if err != nil {
+ return false, errors.Wrapf(err, "failed to get project %v for database %v", database.ProjectID, database.DatabaseName)
+ }
+ if project != nil && project.Setting != nil {
+ opts.MaximumRetries = int(project.Setting.GetExecutionRetryPolicy().GetMaximumRetries())
+ }
+
opts.SetConnectionID = func(id string) {
stateCfg.TaskRunConnectionID.Store(mc.taskRunUID, id)
}
diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/DetailCell.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/DetailCell.vue
index 01d7549157..b3bfedeb64 100644
--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/DetailCell.vue
+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/DetailCell.vue
@@ -9,6 +9,7 @@
/>
<DatabaseSyncCell v-if="view === 'DATABASE_SYNC'" v-bind="props" />
<PriorBackupCell v-if="view === 'PRIOR_BACKUP'" v-bind="props" />
+ <RetryInfoCell v-if="view === 'RETRY_INFO'" v-bind="props" />
<span v-if="view === 'N/A'">-</span>
</NEllipsis>
</template>
@@ -25,6 +26,7 @@ import ErrorCell from "./ErrorCell.vue";
import PriorBackupCell from "./PriorBackupCell.vue";
import StatusUpdateCell from "./StatusUpdateCell.vue";
import TransactionControlCell from "./TransactionControlCell.vue";
+import RetryInfoCell from "./RetryInfoCell.vue";
type View =
| "N/A"
@@ -33,7 +35,8 @@ type View =
| "STATUS_UPDATE"
| "TRANSACTION_CONTROL"
| "DATABASE_SYNC"
- | "PRIOR_BACKUP";
+ | "PRIOR_BACKUP"
+ | "RETRY_INFO";
const props = defineProps<{
entry: FlattenLogEntry;
@@ -48,6 +51,7 @@ const view = computed((): View => {
transactionControl,
databaseSync,
priorBackup,
+ retryInfo,
} = props.entry;
if (type === TaskRunLogEntry_Type.COMMAND_EXECUTE && commandExecute) {
if (!commandExecute.raw.response) {
@@ -81,6 +85,9 @@ const view = computed((): View => {
}
return "PRIOR_BACKUP";
}
+ if (type === TaskRunLogEntry_Type.RETRY_INFO && retryInfo) {
+ return "RETRY_INFO";
+ }
return "N/A";
});
</script>
diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/RetryInfoCell.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/RetryInfoCell.vue
new file mode 100644
index 0000000000..7dab735d63
--- /dev/null
+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/RetryInfoCell.vue
@@ -0,0 +1,24 @@
+<template>
+ <span v-if="!isNaN(retryCount) && !isNaN(maxRetries)">
+ {{ $t("issue.task-run.task-run-log.retry-info", { n: retryCount, m: maxRetries }) }}
+ </span>
+ <span v-else class="text-control-placeholder">-</span>
+</template>
+
+<script setup lang="ts">
+import { computed } from "vue";
+import { TaskRunLogEntry_Type } from "@/types/proto/v1/rollout_service";
+import type { FlattenLogEntry } from "../common";
+
+const props = defineProps<{
+ entry: FlattenLogEntry;
+}>();
+
+const { retryCount, maxRetries } = computed(() => {
+ const { type, retryInfo } = props.entry;
+ if (type === TaskRunLogEntry_Type.RETRY_INFO && retryInfo) {
+ return { retryCount: retryInfo.retryCount, maxRetries: retryInfo.maximumRetries };
+ }
+ return { retryCount: Number.NaN, maxRetries: Number.NaN };
+}).value;
+</script>
diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/common.ts b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/common.ts
index a9962f3747..16df4858b6 100644
--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/common.ts
+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/common.ts
@@ -10,6 +10,7 @@ import {
type TaskRunLogEntry_DatabaseSync,
TaskRunLogEntry,
TaskRunLogEntry_PriorBackup,
+ TaskRunLogEntry_RetryInfo,
} from "@/types/proto/v1/rollout_service";
export type FlattenLogEntry = {
@@ -29,6 +30,7 @@ export type FlattenLogEntry = {
transactionControl?: TaskRunLogEntry_TransactionControl;
databaseSync?: TaskRunLogEntry_DatabaseSync;
priorBackup?: TaskRunLogEntry_PriorBackup;
+ retryInfo?: TaskRunLogEntry_RetryInfo;
};
export const displayTaskRunLogEntryType = (type: TaskRunLogEntry_Type) => {
@@ -50,6 +52,9 @@ export const displayTaskRunLogEntryType = (type: TaskRunLogEntry_Type) => {
if (type === TaskRunLogEntry_Type.PRIOR_BACKUP) {
return t("issue.task-run.task-run-log.entry-type.prior-backup");
}
+ if (type === TaskRunLogEntry_Type.RETRY_INFO) {
+ return t("issue.task-run.task-run-log.entry-type.retry-info");
+ }
console.warn(
`[displayTaskRunLogEntryType] should never reach this line: type=${taskRunLogEntry_TypeToJSON(type)}`
@@ -70,6 +75,7 @@ export const convertTaskRunLogEntryToFlattenLogEntries = (
databaseSync,
deployId,
priorBackup,
+ retryInfo,
} = entry;
const flattenLogEntries: FlattenLogEntry[] = [];
if (
@@ -156,5 +162,16 @@ export const convertTaskRunLogEntryToFlattenLogEntries = (
priorBackup: priorBackup,
});
}
+ if (type === TaskRunLogEntry_Type.RETRY_INFO && retryInfo) {
+ flattenLogEntries.push({
+ batch,
+ deployId,
+ serial: 0,
+ type: TaskRunLogEntry_Type.RETRY_INFO,
+ startTime: getDateForPbTimestamp(entry.logTime),
+ endTime: undefined,
+ retryInfo,
+ });
+ }
return flattenLogEntries;
};
diff --git a/frontend/src/components/Project/Settings/ProjectIssueRelatedSettingPanel.vue b/frontend/src/components/Project/Settings/ProjectIssueRelatedSettingPanel.vue
index 9f932aec89..2f825a6dc7 100644
--- a/frontend/src/components/Project/Settings/ProjectIssueRelatedSettingPanel.vue
+++ b/frontend/src/components/Project/Settings/ProjectIssueRelatedSettingPanel.vue
@@ -27,52 +27,50 @@
<FeatureBadge feature="bb.feature.issue-project-setting" />
</h3>
<div class="w-full flex flex-col justify-start items-start gap-2">
- <div>
- <NCheckbox
- v-model:checked="state.allowModifyStatement"
- size="large"
- :disabled="!allowUpdateIssueProjectSetting || loading"
- :label="
- $t('project.settings.issue-related.allow-modify-statement.self')
- "
- />
- <p class="text-sm text-gray-400 pl-6 ml-0.5">
- {{
- $t(
- "project.settings.issue-related.allow-modify-statement.description"
- )
- }}
- </p>
+ <div>
+ <div class="flex items-center gap-x-2">
+ <Switch
+ v-model:value="state.allowModifyStatement"
+ :text="true"
+ :disabled="!allowUpdateIssueProjectSetting || loading"
+ />
+ <span class="textlabel">
+ {{$t('project.settings.issue-related.allow-modify-statement.self')}}
+ </span>
+ </div>
+ <div class="mt-1 mb-3 text-sm text-gray-400">
+ {{ $t("project.settings.issue-related.allow-modify-statement.description") }}
+ </div>
</div>
<div>
- <NCheckbox
- v-model:checked="state.autoResolveIssue"
- size="large"
- :disabled="!allowUpdateIssueProjectSetting || loading"
- :label="$t('project.settings.issue-related.auto-resolve-issue.self')"
- />
- <p class="text-sm text-gray-400 pl-6 ml-0.5">
- {{
- $t("project.settings.issue-related.auto-resolve-issue.description")
- }}
- </p>
+ <div class="flex items-center gap-x-2">
+ <Switch
+ v-model:value="state.autoResolveIssue"
+ :text="true"
+ :disabled="!allowUpdateIssueProjectSetting || loading"
+ />
+ <span class="textlabel">
+ {{$t('project.settings.issue-related.auto-resolve-issue.self')}}
+ </span>
+ </div>
+ <div class="mt-1 mb-3 text-sm text-gray-400">
+ {{ $t("project.settings.issue-related.auto-resolve-issue.description") }}
+ </div>
</div>
<div>
- <NCheckbox
- v-model:checked="state.forceIssueLabels"
- size="large"
- :disabled="
+ <div class="flex items-center gap-x-2">
+ <Switch
+ v-model:value="state.forceIssueLabels"
+ :text="true"
+ :disabled="
!allowUpdateIssueProjectSetting ||
state.issueLabels.length === 0 ||
loading
"
- >
- <template #default>
- <div class="flex items-center gap-x-2">
+ />
+ <div class="textlabel flex items-center gap-x-2">
{{
- $t(
- "project.settings.issue-related.labels.force-issue-labels.self"
- )
+ $t("project.settings.issue-related.labels.force-issue-labels.self")
}}
<NTooltip v-if="allowEdit && state.issueLabels.length === 0">
<template #trigger>
@@ -85,86 +83,107 @@
}}
</NTooltip>
</div>
- </template>
- </NCheckbox>
- <p class="text-sm text-gray-400 pl-6 ml-0.5">
- {{
- $t(
- "project.settings.issue-related.labels.force-issue-labels.description"
- )
- }}
- </p>
+ </div>
+ <div class="mt-1 mb-3 text-sm text-gray-400">
+ {{ $t("project.settings.issue-related.labels.force-issue-labels.description") }}
+ </div>
</div>
<div>
- <NCheckbox
- v-model:checked="state.enforceIssueTitle"
- size="large"
- :disabled="!allowUpdateIssueProjectSetting || loading"
- :label="$t('project.settings.issue-related.enforce-issue-title.self')"
- />
- <p class="text-sm text-gray-400 pl-6 ml-0.5">
- {{
- $t("project.settings.issue-related.enforce-issue-title.description")
- }}
- </p>
+ <div class="flex items-center gap-x-2">
+ <Switch
+ v-model:value="state.enforceIssueTitle"
+ :text="true"
+ :disabled="!allowUpdateIssueProjectSetting || loading"
+ />
+ <span class="textlabel">
+ {{$t('project.settings.issue-related.enforce-issue-title.self')}}
+ </span>
+ </div>
+ <div class="mt-1 mb-3 text-sm text-gray-400">
+ {{ $t("project.settings.issue-related.enforce-issue-title.description") }}
+ </div>
</div>
<div>
- <NCheckbox
- v-model:checked="state.allowSelfApproval"
- size="large"
- :disabled="!allowUpdateIssueProjectSetting || loading"
- :label="$t('project.settings.issue-related.allow-self-approval.self')"
- />
- <p class="text-sm text-gray-400 pl-6 ml-0.5">
- {{
- $t("project.settings.issue-related.allow-self-approval.description")
- }}
- </p>
+ <div class="flex items-center gap-x-2">
+ <Switch
+ v-model:value="state.allowSelfApproval"
+ :text="true"
+ :disabled="!allowUpdateIssueProjectSetting || loading"
+ />
+ <span class="textlabel">
+ {{$t('project.settings.issue-related.allow-self-approval.self')}}
+ </span>
+ </div>
+ <div class="mt-1 mb-3 text-sm text-gray-400">
+ {{ $t("project.settings.issue-related.allow-self-approval.description") }}
+ </div>
</div>
<div>
- <NCheckbox
- v-model:checked="state.autoEnableBackup"
- size="large"
- :disabled="!allowUpdateIssueProjectSetting || loading"
- :label="$t('project.settings.issue-related.auto-enable-backup.self')"
- />
- <p class="text-sm text-gray-400 pl-6 ml-0.5">
- {{
- $t("project.settings.issue-related.auto-enable-backup.description")
- }}
- </p>
+ <div class="flex items-center gap-x-2">
+ <Switch
+ v-model:value="state.autoEnableBackup"
+ :text="true"
+ :disabled="!allowUpdateIssueProjectSetting || loading"
+ />
+ <span class="textlabel">
+ {{$t('project.settings.issue-related.auto-enable-backup.self')}}
+ </span>
+ </div>
+ <div class="mt-1 mb-3 text-sm text-gray-400">
+ {{ $t("project.settings.issue-related.auto-enable-backup.description") }}
+ </div>
</div>
<div>
- <NCheckbox
- v-model:checked="state.skipBackupErrors"
- size="large"
- :disabled="!allowUpdateIssueProjectSetting || loading"
- :label="$t('project.settings.issue-related.skip-backup-errors.self')"
- />
- <p class="text-sm text-gray-400 pl-6 ml-0.5">
- {{
- $t("project.settings.issue-related.skip-backup-errors.description")
- }}
- </p>
+ <div class="flex items-center gap-x-2">
+ <Switch
+ v-model:value="state.skipBackupErrors"
+ :text="true"
+ :disabled="!allowUpdateIssueProjectSetting || loading"
+ />
+ <span class="textlabel">
+ {{$t('project.settings.issue-related.skip-backup-errors.self')}}
+ </span>
+ </div>
+ <div class="mt-1 mb-3 text-sm text-gray-400">
+ {{ $t("project.settings.issue-related.skip-backup-errors.description") }}
+ </div>
</div>
<div>
- <NCheckbox
- v-model:checked="state.postgresDatabaseTenantMode"
- size="large"
- :disabled="!allowUpdateIssueProjectSetting || loading"
- :label="
- $t(
- 'project.settings.issue-related.postgres-database-tenant-mode.self'
- )
- "
- />
- <p class="text-sm text-gray-400 pl-6 ml-0.5">
- {{
- $t(
- "project.settings.issue-related.postgres-database-tenant-mode.description"
- )
- }}
+ <div class="flex items-center gap-x-2">
+ <Switch
+ v-model:value="state.postgresDatabaseTenantMode"
+ :text="true"
+ :disabled="!allowUpdateIssueProjectSetting || loading"
+ />
+ <span class="textlabel">
+ {{$t('project.settings.issue-related.postgres-database-tenant-mode.self')}}
+ </span>
+ </div>
+ <div class="mt-1 mb-3 text-sm text-gray-400">
+ {{ $t("project.settings.issue-related.postgres-database-tenant-mode.description") }}
+ </div>
+ </div>
+ <div>
+ <p class="">
+ <span class="textlabel">
+ {{ $t("project.settings.issue-related.max-retries.self") }}
+ </span>
+ </p>
+ <p class="mt-1 mb-3 text-sm text-gray-400">
+ {{ $t("project.settings.issue-related.max-retries.description") }}
</p>
+ <div class="mt-3 w-full flex flex-row justify-start items-center gap-4">
+ <NInputNumber
+ :value="state.executionRetryPolicy?.maximumRetries ?? 0"
+ :disabled="!allowUpdateIssueProjectSetting || loading"
+ class="w-60"
+ :min="0"
+ :precision="0"
+ @update:value="handleInput"
+ >
+ <template #suffix> Times </template>
+ </NInputNumber>
+ </div>
</div>
</div>
</div>
@@ -177,14 +196,15 @@ import {
NDynamicTags,
NTag,
NColorPicker,
- NCheckbox,
NTooltip,
+ NInputNumber,
} from "naive-ui";
import { computed, reactive, ref } from "vue";
import { FeatureBadge } from "@/components/FeatureGuard";
import { hasFeature, useProjectV1Store } from "@/store";
import type { ComposedProject } from "@/types";
-import { Label } from "@/types/proto/v1/project_service";
+import { Label, Project_ExecutionRetryPolicy } from "@/types/proto/v1/project_service";
+import { Switch } from "@/components/v2";
interface LocalState {
issueLabels: Label[];
@@ -196,6 +216,7 @@ interface LocalState {
autoEnableBackup: boolean;
skipBackupErrors: boolean;
postgresDatabaseTenantMode: boolean;
+ executionRetryPolicy: Project_ExecutionRetryPolicy | undefined;
}
const getInitialLocalState = (): LocalState => {
@@ -210,6 +231,7 @@ const getInitialLocalState = (): LocalState => {
autoEnableBackup: project.autoEnableBackup,
skipBackupErrors: project.skipBackupErrors,
postgresDatabaseTenantMode: project.postgresDatabaseTenantMode,
+ executionRetryPolicy: project.executionRetryPolicy,
};
};
@@ -340,9 +362,20 @@ const updateMask = computed(() => {
) {
mask.push("postgres_database_tenant_mode");
}
+ if (!isEqual(state.executionRetryPolicy?.maximumRetries ?? 0, props.project.executionRetryPolicy?.maximumRetries ?? 0)) {
+ mask.push("execution_retry_policy");
+ }
return mask;
});
+const handleInput = (value: number | null) => {
+ if (value === null) return;
+ if (value === undefined) return;
+ state.executionRetryPolicy = Project_ExecutionRetryPolicy.create({
+ maximumRetries: value,
+ });
+};
+
defineExpose({
isDirty: valueChanged,
update: doUpdate,
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index 066754b5b9..fbc3b775da 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -956,14 +956,16 @@
"task-run-status-update": "Status update",
"transaction-control": "Transaction control",
"database-sync": "Database sync",
- "prior-backup": "Prior backup"
+ "prior-backup": "Prior backup",
+ "retry-info": "Retry information"
},
"estimated-affected-rows-n": "Estimated affected rows: {n}",
"prior-backup-tables": "Prior backup tables",
"status-update": {
"waiting": "Ready to be executed",
"running": "Being executed"
- }
+ },
+ "retry-info":"Retrying (attempt {n}/{m}) due to lock timeout."
},
"task-run-session": {
"blocking-sessions": {
@@ -1627,6 +1629,10 @@
"postgres-database-tenant-mode": {
"self": "Postgres database tenant mode",
"description": "The tenant mode for Postgres database. If enable, the issue will be run by the database OWNER. Otherwise, the issue will be run by the instance connection user."
+ },
+ "max-retries": {
+ "self": "Maximum retries count for lock timeout",
+ "description": "The maximum retries count for lock timeout when running the task. The default value is 0."
}
}
},
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index 0976d6140f..c75fc6bced 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -956,14 +956,16 @@
"task-run-status-update": "Actualización de estado",
"transaction-control": "Control de transacciones",
"database-sync": "Sincronización de base de datos",
- "prior-backup": "Copia de seguridad previa"
+ "prior-backup": "Copia de seguridad previa",
+ "retry-info": "Reintento de información"
},
"estimated-affected-rows-n": "Filas afectadas estimadas: {n}",
"prior-backup-tables": "Tablas de respaldo anteriores",
"status-update": {
"waiting": "Listo para ser ejecutado",
"running": "Ser ejecutado"
- }
+ },
+ "retry-info": "Vuelto (intento {n}/{m}) debido al tiempo de espera de bloqueo."
},
"task-run-session": {
"blocking-sessions": {
@@ -1627,6 +1629,10 @@
"postgres-database-tenant-mode": {
"self": "Modo inquilino de base de datos Postgres",
"description": "Modo de base de datos de inquilino de Postgres. Si se habilita, el problema será ejecutado por el OWNER de la base de datos. De lo contrario, la tarea será ejecutada por el usuario de conexión de la instancia."
+ },
+ "max-retries": {
+ "self": "Los reintentos máximos cuentan para el tiempo de espera de bloqueo",
+ "description": "Las reintentos máximas cuentan para el tiempo de espera de bloqueo al ejecutar la tarea. El valor predeterminado es 0."
}
}
},
diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.json
index d091772fe6..6eb38d0cd9 100644
--- a/frontend/src/locales/ja-JP.json
+++ b/frontend/src/locales/ja-JP.json
@@ -956,14 +956,16 @@
"task-run-status-update": "ステータスアップデート",
"transaction-control": "トランザクション制御",
"database-sync": "データベースの同期",
- "prior-backup": "事前のバックアップ"
+ "prior-backup": "事前のバックアップ",
+ "retry-info": "情報を再試行します"
},
"estimated-affected-rows-n": "推定影響行数: {n}",
"prior-backup-tables": "以前のバックアップテーブル",
"status-update": {
"waiting": "実行の準備完了",
"running": "処刑される"
- }
+ },
+ "retry-info": "ロックタイムアウトのためにretrying({n}/{m}を試行)。"
},
"task-run-session": {
"blocking-sessions": {
@@ -1627,6 +1629,10 @@
"postgres-database-tenant-mode": {
"self": "Postgres データベーステナントモード",
"description": "Postgres データベーステナントモード。有効にすると、問題はデータベースのOWNERによって実行されます。無効にすると、このイシューはインスタンス接続ユーザーによって実行されます。"
+ },
+ "max-retries": {
+ "self": "ロックタイムアウトの最大レトリカウント",
+ "description": "タスクを実行するときのロックタイムアウトの最大再試行カウント。デフォルト値は0です。"
}
}
},
diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.json
index 73d0023b34..5533f2e6ad 100644
--- a/frontend/src/locales/vi-VN.json
+++ b/frontend/src/locales/vi-VN.json
@@ -956,14 +956,16 @@
"task-run-status-update": "Cập nhật trạng thái",
"transaction-control": "Kiểm soát giao dịch",
"database-sync": "Đồng bộ cơ sở dữ liệu",
- "prior-backup": "Sao lưu trước"
+ "prior-backup": "Sao lưu trước",
+ "retry-info": "Thông tin thử lại"
},
"estimated-affected-rows-n": "Số dòng bị ảnh hưởng ước tính: {n}",
"prior-backup-tables": "Bảng sao lưu trước",
"status-update": {
"waiting": "Sẵn sàng để thực thi",
"running": "Đang được thực thi"
- }
+ },
+ "retry-info": "Thử lại (cố gắng {n}/{m}) do thời gian chờ khóa."
},
"task-run-session": {
"blocking-sessions": {
@@ -1627,6 +1629,10 @@
"postgres-database-tenant-mode": {
"self": "Chế độ đối tượng thuê cơ sở dữ liệu Postgres",
"description": "Chế độ đối tượng thuê cho cơ sở dữ liệu Postgres. Nếu bật, vấn đề sẽ được chạy bởi CHỦ SỞ HỮU cơ sở dữ liệu. Nếu không, vấn đề sẽ được chạy bởi người dùng kết nối phiên bản."
+ },
+ "max-retries": {
+ "self": "Số lần thử lại tối đa cho thời gian chờ khóa",
+ "description": "Tối đa nhớ lại số lượng thời gian chờ khóa khi chạy tác vụ. Giá trị mặc định là 0."
}
}
},
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 86d2c016e2..44a4918f31 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -956,14 +956,16 @@
"task-run-status-update": "状态更新",
"transaction-control": "事务控制",
"database-sync": "数据库同步",
- "prior-backup": "数据预备份"
+ "prior-backup": "数据预备份",
+ "retry-info": "重试信息"
},
"estimated-affected-rows-n": "预估影响行数:{n}",
"prior-backup-tables": "数据预备份相关的表",
"status-update": {
"waiting": "准备就绪,等待执行",
"running": "开始执行"
- }
+ },
+ "retry-info": "锁超时重试(尝试{n}/{m})。"
},
"task-run-session": {
"blocking-sessions": {
@@ -1627,6 +1629,10 @@
"postgres-database-tenant-mode": {
"self": "Postgres 数据库租户模式",
"description": "Postgres 数据库租户模式。如果启用,该工单将由数据库 OWNER 运行。否则,该工单将由实例连接用户运行。"
+ },
+ "max-retries": {
+ "self": "锁超时的最大重试数",
+ "description": "运行任务时锁超时的最大重试数。默认值为0。"
}
}
},
diff --git a/frontend/src/types/proto/store/project.ts b/frontend/src/types/proto/store/project.ts
index e337b3c84c..f1a6145baa 100644
--- a/frontend/src/types/proto/store/project.ts
+++ b/frontend/src/types/proto/store/project.ts
@@ -37,6 +37,13 @@ export interface Project {
postgresDatabaseTenantMode: boolean;
/** Whether to allow the issue creator to self-approve the issue. */
allowSelfApproval: boolean;
+ /** Execution retry policy for the task run. */
+ executionRetryPolicy: Project_ExecutionRetryPolicy | undefined;
+}
+
+export interface Project_ExecutionRetryPolicy {
+ /** The maximum number of retries for the lock timeout issue. */
+ maximumRetries: number;
}
function createBaseLabel(): Label {
@@ -142,6 +149,7 @@ function createBaseProject(): Project {
skipBackupErrors: false,
postgresDatabaseTenantMode: false,
allowSelfApproval: false,
+ executionRetryPolicy: undefined,
};
}
@@ -174,6 +182,9 @@ export const Project: MessageFns<Project> = {
if (message.allowSelfApproval !== false) {
writer.uint32(80).bool(message.allowSelfApproval);
}
+ if (message.executionRetryPolicy !== undefined) {
+ Project_ExecutionRetryPolicy.encode(message.executionRetryPolicy, writer.uint32(90).fork()).join();
+ }
return writer;
},
@@ -256,6 +267,14 @@ export const Project: MessageFns<Project> = {
message.allowSelfApproval = reader.bool();
continue;
}
+ case 11: {
+ if (tag !== 90) {
+ break;
+ }
+
+ message.executionRetryPolicy = Project_ExecutionRetryPolicy.decode(reader, reader.uint32());
+ continue;
+ }
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -282,6 +301,9 @@ export const Project: MessageFns<Project> = {
? globalThis.Boolean(object.postgresDatabaseTenantMode)
: false,
allowSelfApproval: isSet(object.allowSelfApproval) ? globalThis.Boolean(object.allowSelfApproval) : false,
+ executionRetryPolicy: isSet(object.executionRetryPolicy)
+ ? Project_ExecutionRetryPolicy.fromJSON(object.executionRetryPolicy)
+ : undefined,
};
},
@@ -314,6 +336,9 @@ export const Project: MessageFns<Project> = {
if (message.allowSelfApproval !== false) {
obj.allowSelfApproval = message.allowSelfApproval;
}
+ if (message.executionRetryPolicy !== undefined) {
+ obj.executionRetryPolicy = Project_ExecutionRetryPolicy.toJSON(message.executionRetryPolicy);
+ }
return obj;
},
@@ -331,6 +356,67 @@ export const Project: MessageFns<Project> = {
message.skipBackupErrors = object.skipBackupErrors ?? false;
message.postgresDatabaseTenantMode = object.postgresDatabaseTenantMode ?? false;
message.allowSelfApproval = object.allowSelfApproval ?? false;
+ message.executionRetryPolicy = (object.executionRetryPolicy !== undefined && object.executionRetryPolicy !== null)
+ ? Project_ExecutionRetryPolicy.fromPartial(object.executionRetryPolicy)
+ : undefined;
+ return message;
+ },
+};
+
+function createBaseProject_ExecutionRetryPolicy(): Project_ExecutionRetryPolicy {
+ return { maximumRetries: 0 };
+}
+
+export const Project_ExecutionRetryPolicy: MessageFns<Project_ExecutionRetryPolicy> = {
+ encode(message: Project_ExecutionRetryPolicy, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.maximumRetries !== 0) {
+ writer.uint32(8).int32(message.maximumRetries);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): Project_ExecutionRetryPolicy {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseProject_ExecutionRetryPolicy();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 8) {
+ break;
+ }
+
+ message.maximumRetries = reader.int32();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): Project_ExecutionRetryPolicy {
+ return { maximumRetries: isSet(object.maximumRetries) ? globalThis.Number(object.maximumRetries) : 0 };
+ },
+
+ toJSON(message: Project_ExecutionRetryPolicy): unknown {
+ const obj: any = {};
+ if (message.maximumRetries !== 0) {
+ obj.maximumRetries = Math.round(message.maximumRetries);
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<Project_ExecutionRetryPolicy>): Project_ExecutionRetryPolicy {
+ return Project_ExecutionRetryPolicy.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<Project_ExecutionRetryPolicy>): Project_ExecutionRetryPolicy {
+ const message = createBaseProject_ExecutionRetryPolicy();
+ message.maximumRetries = object.maximumRetries ?? 0;
return message;
},
};
diff --git a/frontend/src/types/proto/store/task_run_log.ts b/frontend/src/types/proto/store/task_run_log.ts
index 78610c0f3d..00c3efeb38 100644
--- a/frontend/src/types/proto/store/task_run_log.ts
+++ b/frontend/src/types/proto/store/task_run_log.ts
@@ -24,6 +24,7 @@ export interface TaskRunLog {
transactionControl: TaskRunLog_TransactionControl | undefined;
priorBackupStart: TaskRunLog_PriorBackupStart | undefined;
priorBackupEnd: TaskRunLog_PriorBackupEnd | undefined;
+ retryInfo: TaskRunLog_RetryInfo | undefined;
}
export enum TaskRunLog_Type {
@@ -38,6 +39,7 @@ export enum TaskRunLog_Type {
TRANSACTION_CONTROL = "TRANSACTION_CONTROL",
PRIOR_BACKUP_START = "PRIOR_BACKUP_START",
PRIOR_BACKUP_END = "PRIOR_BACKUP_END",
+ RETRY_INFO = "RETRY_INFO",
UNRECOGNIZED = "UNRECOGNIZED",
}
@@ -76,6 +78,9 @@ export function taskRunLog_TypeFromJSON(object: any): TaskRunLog_Type {
case 10:
case "PRIOR_BACKUP_END":
return TaskRunLog_Type.PRIOR_BACKUP_END;
+ case 11:
+ case "RETRY_INFO":
+ return TaskRunLog_Type.RETRY_INFO;
case -1:
case "UNRECOGNIZED":
default:
@@ -107,6 +112,8 @@ export function taskRunLog_TypeToJSON(object: TaskRunLog_Type): string {
return "PRIOR_BACKUP_START";
case TaskRunLog_Type.PRIOR_BACKUP_END:
return "PRIOR_BACKUP_END";
+ case TaskRunLog_Type.RETRY_INFO:
+ return "RETRY_INFO";
case TaskRunLog_Type.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
@@ -137,6 +144,8 @@ export function taskRunLog_TypeToNumber(object: TaskRunLog_Type): number {
return 9;
case TaskRunLog_Type.PRIOR_BACKUP_END:
return 10;
+ case TaskRunLog_Type.RETRY_INFO:
+ return 11;
case TaskRunLog_Type.UNRECOGNIZED:
default:
return -1;
@@ -307,6 +316,12 @@ export interface TaskRunLog_PriorBackupEnd {
error: string;
}
+export interface TaskRunLog_RetryInfo {
+ error: string;
+ retryCount: number;
+ maximumRetries: number;
+}
+
function createBaseTaskRunLog(): TaskRunLog {
return {
type: TaskRunLog_Type.TYPE_UNSPECIFIED,
@@ -321,6 +336,7 @@ function createBaseTaskRunLog(): TaskRunLog {
transactionControl: undefined,
priorBackupStart: undefined,
priorBackupEnd: undefined,
+ retryInfo: undefined,
};
}
@@ -362,6 +378,9 @@ export const TaskRunLog: MessageFns<TaskRunLog> = {
if (message.priorBackupEnd !== undefined) {
TaskRunLog_PriorBackupEnd.encode(message.priorBackupEnd, writer.uint32(90).fork()).join();
}
+ if (message.retryInfo !== undefined) {
+ TaskRunLog_RetryInfo.encode(message.retryInfo, writer.uint32(106).fork()).join();
+ }
return writer;
},
@@ -468,6 +487,14 @@ export const TaskRunLog: MessageFns<TaskRunLog> = {
message.priorBackupEnd = TaskRunLog_PriorBackupEnd.decode(reader, reader.uint32());
continue;
}
+ case 13: {
+ if (tag !== 106) {
+ break;
+ }
+
+ message.retryInfo = TaskRunLog_RetryInfo.decode(reader, reader.uint32());
+ continue;
+ }
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -509,6 +536,7 @@ export const TaskRunLog: MessageFns<TaskRunLog> = {
priorBackupEnd: isSet(object.priorBackupEnd)
? TaskRunLog_PriorBackupEnd.fromJSON(object.priorBackupEnd)
: undefined,
+ retryInfo: isSet(object.retryInfo) ? TaskRunLog_RetryInfo.fromJSON(object.retryInfo) : undefined,
};
},
@@ -550,6 +578,9 @@ export const TaskRunLog: MessageFns<TaskRunLog> = {
if (message.priorBackupEnd !== undefined) {
obj.priorBackupEnd = TaskRunLog_PriorBackupEnd.toJSON(message.priorBackupEnd);
}
+ if (message.retryInfo !== undefined) {
+ obj.retryInfo = TaskRunLog_RetryInfo.toJSON(message.retryInfo);
+ }
return obj;
},
@@ -590,6 +621,9 @@ export const TaskRunLog: MessageFns<TaskRunLog> = {
message.priorBackupEnd = (object.priorBackupEnd !== undefined && object.priorBackupEnd !== null)
? TaskRunLog_PriorBackupEnd.fromPartial(object.priorBackupEnd)
: undefined;
+ message.retryInfo = (object.retryInfo !== undefined && object.retryInfo !== null)
+ ? TaskRunLog_RetryInfo.fromPartial(object.retryInfo)
+ : undefined;
return message;
},
};
@@ -1269,6 +1303,98 @@ export const TaskRunLog_PriorBackupEnd: MessageFns<TaskRunLog_PriorBackupEnd> =
},
};
+function createBaseTaskRunLog_RetryInfo(): TaskRunLog_RetryInfo {
+ return { error: "", retryCount: 0, maximumRetries: 0 };
+}
+
+export const TaskRunLog_RetryInfo: MessageFns<TaskRunLog_RetryInfo> = {
+ encode(message: TaskRunLog_RetryInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.error !== "") {
+ writer.uint32(10).string(message.error);
+ }
+ if (message.retryCount !== 0) {
+ writer.uint32(16).int32(message.retryCount);
+ }
+ if (message.maximumRetries !== 0) {
+ writer.uint32(24).int32(message.maximumRetries);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): TaskRunLog_RetryInfo {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseTaskRunLog_RetryInfo();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 10) {
+ break;
+ }
+
+ message.error = reader.string();
+ continue;
+ }
+ case 2: {
+ if (tag !== 16) {
+ break;
+ }
+
+ message.retryCount = reader.int32();
+ continue;
+ }
+ case 3: {
+ if (tag !== 24) {
+ break;
+ }
+
+ message.maximumRetries = reader.int32();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): TaskRunLog_RetryInfo {
+ return {
+ error: isSet(object.error) ? globalThis.String(object.error) : "",
+ retryCount: isSet(object.retryCount) ? globalThis.Number(object.retryCount) : 0,
+ maximumRetries: isSet(object.maximumRetries) ? globalThis.Number(object.maximumRetries) : 0,
+ };
+ },
+
+ toJSON(message: TaskRunLog_RetryInfo): unknown {
+ const obj: any = {};
+ if (message.error !== "") {
+ obj.error = message.error;
+ }
+ if (message.retryCount !== 0) {
+ obj.retryCount = Math.round(message.retryCount);
+ }
+ if (message.maximumRetries !== 0) {
+ obj.maximumRetries = Math.round(message.maximumRetries);
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<TaskRunLog_RetryInfo>): TaskRunLog_RetryInfo {
+ return TaskRunLog_RetryInfo.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<TaskRunLog_RetryInfo>): TaskRunLog_RetryInfo {
+ const message = createBaseTaskRunLog_RetryInfo();
+ message.error = object.error ?? "";
+ message.retryCount = object.retryCount ?? 0;
+ message.maximumRetries = object.maximumRetries ?? 0;
+ return message;
+ },
+};
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
diff --git a/frontend/src/types/proto/v1/project_service.ts b/frontend/src/types/proto/v1/project_service.ts
index bb9886c5b4..154f1b4fb4 100644
--- a/frontend/src/types/proto/v1/project_service.ts
+++ b/frontend/src/types/proto/v1/project_service.ts
@@ -206,6 +206,13 @@ export interface Project {
postgresDatabaseTenantMode: boolean;
/** Whether to allow the issue creator to self-approve the issue. */
allowSelfApproval: boolean;
+ /** Execution retry policy for the task run. */
+ executionRetryPolicy: Project_ExecutionRetryPolicy | undefined;
+}
+
+export interface Project_ExecutionRetryPolicy {
+ /** The maximum number of retries for the lock timeout issue. */
+ maximumRetries: number;
}
export interface AddWebhookRequest {
@@ -1662,6 +1669,7 @@ function createBaseProject(): Project {
skipBackupErrors: false,
postgresDatabaseTenantMode: false,
allowSelfApproval: false,
+ executionRetryPolicy: undefined,
};
}
@@ -1709,6 +1717,9 @@ export const Project: MessageFns<Project> = {
if (message.allowSelfApproval !== false) {
writer.uint32(168).bool(message.allowSelfApproval);
}
+ if (message.executionRetryPolicy !== undefined) {
+ Project_ExecutionRetryPolicy.encode(message.executionRetryPolicy, writer.uint32(178).fork()).join();
+ }
return writer;
},
@@ -1831,6 +1842,14 @@ export const Project: MessageFns<Project> = {
message.allowSelfApproval = reader.bool();
continue;
}
+ case 22: {
+ if (tag !== 178) {
+ break;
+ }
+
+ message.executionRetryPolicy = Project_ExecutionRetryPolicy.decode(reader, reader.uint32());
+ continue;
+ }
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -1864,6 +1883,9 @@ export const Project: MessageFns<Project> = {
? globalThis.Boolean(object.postgresDatabaseTenantMode)
: false,
allowSelfApproval: isSet(object.allowSelfApproval) ? globalThis.Boolean(object.allowSelfApproval) : false,
+ executionRetryPolicy: isSet(object.executionRetryPolicy)
+ ? Project_ExecutionRetryPolicy.fromJSON(object.executionRetryPolicy)
+ : undefined,
};
},
@@ -1911,6 +1933,9 @@ export const Project: MessageFns<Project> = {
if (message.allowSelfApproval !== false) {
obj.allowSelfApproval = message.allowSelfApproval;
}
+ if (message.executionRetryPolicy !== undefined) {
+ obj.executionRetryPolicy = Project_ExecutionRetryPolicy.toJSON(message.executionRetryPolicy);
+ }
return obj;
},
@@ -1933,6 +1958,67 @@ export const Project: MessageFns<Project> = {
message.skipBackupErrors = object.skipBackupErrors ?? false;
message.postgresDatabaseTenantMode = object.postgresDatabaseTenantMode ?? false;
message.allowSelfApproval = object.allowSelfApproval ?? false;
+ message.executionRetryPolicy = (object.executionRetryPolicy !== undefined && object.executionRetryPolicy !== null)
+ ? Project_ExecutionRetryPolicy.fromPartial(object.executionRetryPolicy)
+ : undefined;
+ return message;
+ },
+};
+
+function createBaseProject_ExecutionRetryPolicy(): Project_ExecutionRetryPolicy {
+ return { maximumRetries: 0 };
+}
+
+export const Project_ExecutionRetryPolicy: MessageFns<Project_ExecutionRetryPolicy> = {
+ encode(message: Project_ExecutionRetryPolicy, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.maximumRetries !== 0) {
+ writer.uint32(8).int32(message.maximumRetries);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): Project_ExecutionRetryPolicy {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseProject_ExecutionRetryPolicy();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 8) {
+ break;
+ }
+
+ message.maximumRetries = reader.int32();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): Project_ExecutionRetryPolicy {
+ return { maximumRetries: isSet(object.maximumRetries) ? globalThis.Number(object.maximumRetries) : 0 };
+ },
+
+ toJSON(message: Project_ExecutionRetryPolicy): unknown {
+ const obj: any = {};
+ if (message.maximumRetries !== 0) {
+ obj.maximumRetries = Math.round(message.maximumRetries);
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<Project_ExecutionRetryPolicy>): Project_ExecutionRetryPolicy {
+ return Project_ExecutionRetryPolicy.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<Project_ExecutionRetryPolicy>): Project_ExecutionRetryPolicy {
+ const message = createBaseProject_ExecutionRetryPolicy();
+ message.maximumRetries = object.maximumRetries ?? 0;
return message;
},
};
diff --git a/frontend/src/types/proto/v1/rollout_service.ts b/frontend/src/types/proto/v1/rollout_service.ts
index 5778e59b40..5d4ce1fae7 100644
--- a/frontend/src/types/proto/v1/rollout_service.ts
+++ b/frontend/src/types/proto/v1/rollout_service.ts
@@ -724,6 +724,7 @@ export interface TaskRunLogEntry {
taskRunStatusUpdate: TaskRunLogEntry_TaskRunStatusUpdate | undefined;
transactionControl: TaskRunLogEntry_TransactionControl | undefined;
priorBackup: TaskRunLogEntry_PriorBackup | undefined;
+ retryInfo: TaskRunLogEntry_RetryInfo | undefined;
}
export enum TaskRunLogEntry_Type {
@@ -734,6 +735,7 @@ export enum TaskRunLogEntry_Type {
TASK_RUN_STATUS_UPDATE = "TASK_RUN_STATUS_UPDATE",
TRANSACTION_CONTROL = "TRANSACTION_CONTROL",
PRIOR_BACKUP = "PRIOR_BACKUP",
+ RETRY_INFO = "RETRY_INFO",
UNRECOGNIZED = "UNRECOGNIZED",
}
@@ -760,6 +762,9 @@ export function taskRunLogEntry_TypeFromJSON(object: any): TaskRunLogEntry_Type
case 6:
case "PRIOR_BACKUP":
return TaskRunLogEntry_Type.PRIOR_BACKUP;
+ case 7:
+ case "RETRY_INFO":
+ return TaskRunLogEntry_Type.RETRY_INFO;
case -1:
case "UNRECOGNIZED":
default:
@@ -783,6 +788,8 @@ export function taskRunLogEntry_TypeToJSON(object: TaskRunLogEntry_Type): string
return "TRANSACTION_CONTROL";
case TaskRunLogEntry_Type.PRIOR_BACKUP:
return "PRIOR_BACKUP";
+ case TaskRunLogEntry_Type.RETRY_INFO:
+ return "RETRY_INFO";
case TaskRunLogEntry_Type.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
@@ -805,6 +812,8 @@ export function taskRunLogEntry_TypeToNumber(object: TaskRunLogEntry_Type): numb
return 5;
case TaskRunLogEntry_Type.PRIOR_BACKUP:
return 6;
+ case TaskRunLogEntry_Type.RETRY_INFO:
+ return 7;
case TaskRunLogEntry_Type.UNRECOGNIZED:
default:
return -1;
@@ -983,6 +992,12 @@ export interface TaskRunLogEntry_PriorBackup {
error: string;
}
+export interface TaskRunLogEntry_RetryInfo {
+ error: string;
+ retryCount: number;
+ maximumRetries: number;
+}
+
export interface GetTaskRunSessionRequest {
/** Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun} */
parent: string;
@@ -4004,6 +4019,7 @@ function createBaseTaskRunLogEntry(): TaskRunLogEntry {
taskRunStatusUpdate: undefined,
transactionControl: undefined,
priorBackup: undefined,
+ retryInfo: undefined,
};
}
@@ -4036,6 +4052,9 @@ export const TaskRunLogEntry: MessageFns<TaskRunLogEntry> = {
if (message.priorBackup !== undefined) {
TaskRunLogEntry_PriorBackup.encode(message.priorBackup, writer.uint32(66).fork()).join();
}
+ if (message.retryInfo !== undefined) {
+ TaskRunLogEntry_RetryInfo.encode(message.retryInfo, writer.uint32(74).fork()).join();
+ }
return writer;
},
@@ -4118,6 +4137,14 @@ export const TaskRunLogEntry: MessageFns<TaskRunLogEntry> = {
message.priorBackup = TaskRunLogEntry_PriorBackup.decode(reader, reader.uint32());
continue;
}
+ case 9: {
+ if (tag !== 74) {
+ break;
+ }
+
+ message.retryInfo = TaskRunLogEntry_RetryInfo.decode(reader, reader.uint32());
+ continue;
+ }
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -4144,6 +4171,7 @@ export const TaskRunLogEntry: MessageFns<TaskRunLogEntry> = {
? TaskRunLogEntry_TransactionControl.fromJSON(object.transactionControl)
: undefined,
priorBackup: isSet(object.priorBackup) ? TaskRunLogEntry_PriorBackup.fromJSON(object.priorBackup) : undefined,
+ retryInfo: isSet(object.retryInfo) ? TaskRunLogEntry_RetryInfo.fromJSON(object.retryInfo) : undefined,
};
},
@@ -4176,6 +4204,9 @@ export const TaskRunLogEntry: MessageFns<TaskRunLogEntry> = {
if (message.priorBackup !== undefined) {
obj.priorBackup = TaskRunLogEntry_PriorBackup.toJSON(message.priorBackup);
}
+ if (message.retryInfo !== undefined) {
+ obj.retryInfo = TaskRunLogEntry_RetryInfo.toJSON(message.retryInfo);
+ }
return obj;
},
@@ -4207,6 +4238,9 @@ export const TaskRunLogEntry: MessageFns<TaskRunLogEntry> = {
message.priorBackup = (object.priorBackup !== undefined && object.priorBackup !== null)
? TaskRunLogEntry_PriorBackup.fromPartial(object.priorBackup)
: undefined;
+ message.retryInfo = (object.retryInfo !== undefined && object.retryInfo !== null)
+ ? TaskRunLogEntry_RetryInfo.fromPartial(object.retryInfo)
+ : undefined;
return message;
},
};
@@ -4904,6 +4938,98 @@ export const TaskRunLogEntry_PriorBackup: MessageFns<TaskRunLogEntry_PriorBackup
},
};
+function createBaseTaskRunLogEntry_RetryInfo(): TaskRunLogEntry_RetryInfo {
+ return { error: "", retryCount: 0, maximumRetries: 0 };
+}
+
+export const TaskRunLogEntry_RetryInfo: MessageFns<TaskRunLogEntry_RetryInfo> = {
+ encode(message: TaskRunLogEntry_RetryInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.error !== "") {
+ writer.uint32(10).string(message.error);
+ }
+ if (message.retryCount !== 0) {
+ writer.uint32(16).int32(message.retryCount);
+ }
+ if (message.maximumRetries !== 0) {
+ writer.uint32(24).int32(message.maximumRetries);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): TaskRunLogEntry_RetryInfo {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseTaskRunLogEntry_RetryInfo();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 10) {
+ break;
+ }
+
+ message.error = reader.string();
+ continue;
+ }
+ case 2: {
+ if (tag !== 16) {
+ break;
+ }
+
+ message.retryCount = reader.int32();
+ continue;
+ }
+ case 3: {
+ if (tag !== 24) {
+ break;
+ }
+
+ message.maximumRetries = reader.int32();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): TaskRunLogEntry_RetryInfo {
+ return {
+ error: isSet(object.error) ? globalThis.String(object.error) : "",
+ retryCount: isSet(object.retryCount) ? globalThis.Number(object.retryCount) : 0,
+ maximumRetries: isSet(object.maximumRetries) ? globalThis.Number(object.maximumRetries) : 0,
+ };
+ },
+
+ toJSON(message: TaskRunLogEntry_RetryInfo): unknown {
+ const obj: any = {};
+ if (message.error !== "") {
+ obj.error = message.error;
+ }
+ if (message.retryCount !== 0) {
+ obj.retryCount = Math.round(message.retryCount);
+ }
+ if (message.maximumRetries !== 0) {
+ obj.maximumRetries = Math.round(message.maximumRetries);
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<TaskRunLogEntry_RetryInfo>): TaskRunLogEntry_RetryInfo {
+ return TaskRunLogEntry_RetryInfo.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<TaskRunLogEntry_RetryInfo>): TaskRunLogEntry_RetryInfo {
+ const message = createBaseTaskRunLogEntry_RetryInfo();
+ message.error = object.error ?? "";
+ message.retryCount = object.retryCount ?? 0;
+ message.maximumRetries = object.maximumRetries ?? 0;
+ return message;
+ },
+};
+
function createBaseGetTaskRunSessionRequest(): GetTaskRunSessionRequest {
return { parent: "" };
}
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index 885a684bf0..583fd8d3a5 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -11399,6 +11399,17 @@ components:
allowSelfApproval:
type: boolean
description: Whether to allow the issue creator to self-approve the issue.
+ executionRetryPolicy:
+ allOf:
+ - $ref: '#/components/schemas/Project_ExecutionRetryPolicy'
+ description: Execution retry policy for the task run.
+ Project_ExecutionRetryPolicy:
+ type: object
+ properties:
+ maximumRetries:
+ type: integer
+ description: The maximum number of retries for the lock timeout issue.
+ format: int32
QueryDataPolicy:
type: object
properties:
@@ -13228,6 +13239,7 @@ components:
- TRANSACTION_CONTROL
- PRIOR_BACKUP_START
- PRIOR_BACKUP_END
+ - RETRY_INFO
type: string
format: enum
deployId:
@@ -13252,6 +13264,8 @@ components:
$ref: '#/components/schemas/TaskRunLog_PriorBackupStart'
priorBackupEnd:
$ref: '#/components/schemas/TaskRunLog_PriorBackupEnd'
+ retryInfo:
+ $ref: '#/components/schemas/TaskRunLog_RetryInfo'
TaskRunLog_CommandExecute:
type: object
properties:
@@ -13301,6 +13315,17 @@ components:
TaskRunLog_PriorBackupStart:
type: object
properties: {}
+ TaskRunLog_RetryInfo:
+ type: object
+ properties:
+ error:
+ type: string
+ retryCount:
+ type: integer
+ format: int32
+ maximumRetries:
+ type: integer
+ format: int32
TaskRunLog_SchemaDumpEnd:
type: object
properties:
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index d6a118b551..e595106514 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -218,6 +218,7 @@
- [store/project.proto](#store_project-proto)
- [Label](#bytebase-store-Label)
- [Project](#bytebase-store-Project)
+ - [Project.ExecutionRetryPolicy](#bytebase-store-Project-ExecutionRetryPolicy)
- [store/project_webhook.proto](#store_project_webhook-proto)
- [ProjectWebhookPayload](#bytebase-store-ProjectWebhookPayload)
@@ -313,6 +314,7 @@
- [TaskRunLog.DatabaseSyncStart](#bytebase-store-TaskRunLog-DatabaseSyncStart)
- [TaskRunLog.PriorBackupEnd](#bytebase-store-TaskRunLog-PriorBackupEnd)
- [TaskRunLog.PriorBackupStart](#bytebase-store-TaskRunLog-PriorBackupStart)
+ - [TaskRunLog.RetryInfo](#bytebase-store-TaskRunLog-RetryInfo)
- [TaskRunLog.SchemaDumpEnd](#bytebase-store-TaskRunLog-SchemaDumpEnd)
- [TaskRunLog.SchemaDumpStart](#bytebase-store-TaskRunLog-SchemaDumpStart)
- [TaskRunLog.TaskRunStatusUpdate](#bytebase-store-TaskRunLog-TaskRunStatusUpdate)
@@ -3563,6 +3565,22 @@ RestrictIssueCreationForSQLReviewPolicy is the policy configuration for restrict
| skip_backup_errors | [bool](#bool) | | Whether to skip backup errors and continue the data migration. |
| postgres_database_tenant_mode | [bool](#bool) | | Whether to enable the database tenant mode for PostgreSQL. If enabled, the issue will be created with the pre-appended &#34;set role &lt;db_owner&gt;&#34; statement. |
| allow_self_approval | [bool](#bool) | | Whether to allow the issue creator to self-approve the issue. |
+| execution_retry_policy | [Project.ExecutionRetryPolicy](#bytebase-store-Project-ExecutionRetryPolicy) | | Execution retry policy for the task run. |
+
+
+
+
+
+
+<a name="bytebase-store-Project-ExecutionRetryPolicy"></a>
+
+### Project.ExecutionRetryPolicy
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| maximum_retries | [int32](#int32) | | The maximum number of retries for the lock timeout issue. |
@@ -4849,6 +4867,7 @@ TODO(zp): Use common Position instead.
| transaction_control | [TaskRunLog.TransactionControl](#bytebase-store-TaskRunLog-TransactionControl) | | |
| prior_backup_start | [TaskRunLog.PriorBackupStart](#bytebase-store-TaskRunLog-PriorBackupStart) | | |
| prior_backup_end | [TaskRunLog.PriorBackupEnd](#bytebase-store-TaskRunLog-PriorBackupEnd) | | |
+| retry_info | [TaskRunLog.RetryInfo](#bytebase-store-TaskRunLog-RetryInfo) | | |
@@ -4939,6 +4958,23 @@ TODO(zp): Use common Position instead.
+<a name="bytebase-store-TaskRunLog-RetryInfo"></a>
+
+### TaskRunLog.RetryInfo
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| error | [string](#string) | | |
+| retry_count | [int32](#int32) | | |
+| maximum_retries | [int32](#int32) | | |
+
+
+
+
+
+
<a name="bytebase-store-TaskRunLog-SchemaDumpEnd"></a>
### TaskRunLog.SchemaDumpEnd
@@ -5042,6 +5078,7 @@ TODO(zp): Use common Position instead.
| TRANSACTION_CONTROL | 8 | |
| PRIOR_BACKUP_START | 9 | |
| PRIOR_BACKUP_END | 10 | |
+| RETRY_INFO | 11 | |
diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.html
index 8dd6ae835f..ecd00772bf 100644
--- a/proto/gen/grpc-doc/store/index.html
+++ b/proto/gen/grpc-doc/store/index.html
@@ -1043,6 +1043,10 @@
<a href="#bytebase.store.Project"><span class="badge">M</span>Project</a>
</li>
+ <li>
+ <a href="#bytebase.store.Project.ExecutionRetryPolicy"><span class="badge">M</span>Project.ExecutionRetryPolicy</a>
+ </li>
+
@@ -1448,6 +1452,10 @@
<a href="#bytebase.store.TaskRunLog.PriorBackupStart"><span class="badge">M</span>TaskRunLog.PriorBackupStart</a>
</li>
+ <li>
+ <a href="#bytebase.store.TaskRunLog.RetryInfo"><span class="badge">M</span>TaskRunLog.RetryInfo</a>
+ </li>
+
<li>
<a href="#bytebase.store.TaskRunLog.SchemaDumpEnd"><span class="badge">M</span>TaskRunLog.SchemaDumpEnd</a>
</li>
@@ -9612,6 +9620,37 @@ If enabled, the issue will be created with the pre-appended &#34;set role &lt;db
<td><p>Whether to allow the issue creator to self-approve the issue. </p></td>
</tr>
+ <tr>
+ <td>execution_retry_policy</td>
+ <td><a href="#bytebase.store.Project.ExecutionRetryPolicy">Project.ExecutionRetryPolicy</a></td>
+ <td></td>
+ <td><p>Execution retry policy for the task run. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.Project.ExecutionRetryPolicy">Project.ExecutionRetryPolicy</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>maximum_retries</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The maximum number of retries for the lock timeout issue. </p></td>
+ </tr>
+
</tbody>
</table>
@@ -12423,6 +12462,13 @@ Format: instances/{instance}/databases/{database} </p></td>
<td><p> </p></td>
</tr>
+ <tr>
+ <td>retry_info</td>
+ <td><a href="#bytebase.store.TaskRunLog.RetryInfo">TaskRunLog.RetryInfo</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
</tbody>
</table>
@@ -12569,6 +12615,44 @@ Format: instances/{instance}/databases/{database} </p></td>
+ <h3 id="bytebase.store.TaskRunLog.RetryInfo">TaskRunLog.RetryInfo</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>error</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>retry_count</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>maximum_retries</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
<h3 id="bytebase.store.TaskRunLog.SchemaDumpEnd">TaskRunLog.SchemaDumpEnd</h3>
<p></p>
@@ -12795,6 +12879,12 @@ Format: instances/{instance}/databases/{database} </p></td>
<td><p></p></td>
</tr>
+ <tr>
+ <td>RETRY_INFO</td>
+ <td>11</td>
+ <td><p></p></td>
+ </tr>
+
</tbody>
</table>
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 8c277dd3d6..d310dc6728 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -492,6 +492,7 @@
- [ListProjectsRequest](#bytebase-v1-ListProjectsRequest)
- [ListProjectsResponse](#bytebase-v1-ListProjectsResponse)
- [Project](#bytebase-v1-Project)
+ - [Project.ExecutionRetryPolicy](#bytebase-v1-Project-ExecutionRetryPolicy)
- [RemoveWebhookRequest](#bytebase-v1-RemoveWebhookRequest)
- [SearchProjectsRequest](#bytebase-v1-SearchProjectsRequest)
- [SearchProjectsResponse](#bytebase-v1-SearchProjectsResponse)
@@ -644,6 +645,7 @@
- [TaskRunLogEntry.CommandExecute.CommandResponse](#bytebase-v1-TaskRunLogEntry-CommandExecute-CommandResponse)
- [TaskRunLogEntry.DatabaseSync](#bytebase-v1-TaskRunLogEntry-DatabaseSync)
- [TaskRunLogEntry.PriorBackup](#bytebase-v1-TaskRunLogEntry-PriorBackup)
+ - [TaskRunLogEntry.RetryInfo](#bytebase-v1-TaskRunLogEntry-RetryInfo)
- [TaskRunLogEntry.SchemaDump](#bytebase-v1-TaskRunLogEntry-SchemaDump)
- [TaskRunLogEntry.TaskRunStatusUpdate](#bytebase-v1-TaskRunLogEntry-TaskRunStatusUpdate)
- [TaskRunLogEntry.TransactionControl](#bytebase-v1-TaskRunLogEntry-TransactionControl)
@@ -8060,6 +8062,22 @@ When paginating, all other parameters provided to `ListProjects` must match the
| skip_backup_errors | [bool](#bool) | | Whether to skip backup errors and continue the data migration. |
| postgres_database_tenant_mode | [bool](#bool) | | Whether to enable the database tenant mode for PostgreSQL. If enabled, the issue will be created with the pre-appended &#34;set role &lt;db_owner&gt;&#34; statement. |
| allow_self_approval | [bool](#bool) | | Whether to allow the issue creator to self-approve the issue. |
+| execution_retry_policy | [Project.ExecutionRetryPolicy](#bytebase-v1-Project-ExecutionRetryPolicy) | | Execution retry policy for the task run. |
+
+
+
+
+
+
+<a name="bytebase-v1-Project-ExecutionRetryPolicy"></a>
+
+### Project.ExecutionRetryPolicy
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| maximum_retries | [int32](#int32) | | The maximum number of retries for the lock timeout issue. |
@@ -10296,6 +10314,7 @@ When paginating, all other parameters provided to `ListTaskRuns` must match the
| task_run_status_update | [TaskRunLogEntry.TaskRunStatusUpdate](#bytebase-v1-TaskRunLogEntry-TaskRunStatusUpdate) | | |
| transaction_control | [TaskRunLogEntry.TransactionControl](#bytebase-v1-TaskRunLogEntry-TransactionControl) | | |
| prior_backup | [TaskRunLogEntry.PriorBackup](#bytebase-v1-TaskRunLogEntry-PriorBackup) | | |
+| retry_info | [TaskRunLogEntry.RetryInfo](#bytebase-v1-TaskRunLogEntry-RetryInfo) | | |
@@ -10372,6 +10391,23 @@ When paginating, all other parameters provided to `ListTaskRuns` must match the
+<a name="bytebase-v1-TaskRunLogEntry-RetryInfo"></a>
+
+### TaskRunLogEntry.RetryInfo
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| error | [string](#string) | | |
+| retry_count | [int32](#int32) | | |
+| maximum_retries | [int32](#int32) | | |
+
+
+
+
+
+
<a name="bytebase-v1-TaskRunLogEntry-SchemaDump"></a>
### TaskRunLogEntry.SchemaDump
@@ -10590,6 +10626,7 @@ Read from `pg_stat_activity`
| TASK_RUN_STATUS_UPDATE | 4 | |
| TRANSACTION_CONTROL | 5 | |
| PRIOR_BACKUP | 6 | |
+| RETRY_INFO | 7 | |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index ec6d4aabe1..398683323d 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -2057,6 +2057,10 @@
<a href="#bytebase.v1.Project"><span class="badge">M</span>Project</a>
</li>
+ <li>
+ <a href="#bytebase.v1.Project.ExecutionRetryPolicy"><span class="badge">M</span>Project.ExecutionRetryPolicy</a>
+ </li>
+
<li>
<a href="#bytebase.v1.RemoveWebhookRequest"><span class="badge">M</span>RemoveWebhookRequest</a>
</li>
@@ -2639,6 +2643,10 @@
<a href="#bytebase.v1.TaskRunLogEntry.PriorBackup"><span class="badge">M</span>TaskRunLogEntry.PriorBackup</a>
</li>
+ <li>
+ <a href="#bytebase.v1.TaskRunLogEntry.RetryInfo"><span class="badge">M</span>TaskRunLogEntry.RetryInfo</a>
+ </li>
+
<li>
<a href="#bytebase.v1.TaskRunLogEntry.SchemaDump"><span class="badge">M</span>TaskRunLogEntry.SchemaDump</a>
</li>
@@ -22386,6 +22394,37 @@ If enabled, the issue will be created with the pre-appended &#34;set role &lt;db
<td><p>Whether to allow the issue creator to self-approve the issue. </p></td>
</tr>
+ <tr>
+ <td>execution_retry_policy</td>
+ <td><a href="#bytebase.v1.Project.ExecutionRetryPolicy">Project.ExecutionRetryPolicy</a></td>
+ <td></td>
+ <td><p>Execution retry policy for the task run. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.Project.ExecutionRetryPolicy">Project.ExecutionRetryPolicy</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>maximum_retries</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The maximum number of retries for the lock timeout issue. </p></td>
+ </tr>
+
</tbody>
</table>
@@ -28284,6 +28323,13 @@ Format: instances/{instance}/databases/{database} </p></td>
<td><p> </p></td>
</tr>
+ <tr>
+ <td>retry_info</td>
+ <td><a href="#bytebase.v1.TaskRunLogEntry.RetryInfo">TaskRunLogEntry.RetryInfo</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
</tbody>
</table>
@@ -28458,6 +28504,44 @@ Format: instances/{instance}/databases/{database} </p></td>
+ <h3 id="bytebase.v1.TaskRunLogEntry.RetryInfo">TaskRunLogEntry.RetryInfo</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>error</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>retry_count</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>maximum_retries</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
<h3 id="bytebase.v1.TaskRunLogEntry.SchemaDump">TaskRunLogEntry.SchemaDump</h3>
<p></p>
@@ -29051,6 +29135,12 @@ Format: instances/{instance}/databases/{database} </p></td>
<td><p></p></td>
</tr>
+ <tr>
+ <td>RETRY_INFO</td>
+ <td>7</td>
+ <td><p></p></td>
+ </tr>
+
</tbody>
</table>
diff --git a/proto/generated-go/store/project.pb.go b/proto/generated-go/store/project.pb.go
index b47f2c0110..32dc54bf77 100644
--- a/proto/generated-go/store/project.pb.go
+++ b/proto/generated-go/store/project.pb.go
@@ -101,8 +101,10 @@ type Project struct {
PostgresDatabaseTenantMode bool `protobuf:"varint,9,opt,name=postgres_database_tenant_mode,json=postgresDatabaseTenantMode,proto3" json:"postgres_database_tenant_mode,omitempty"`
// Whether to allow the issue creator to self-approve the issue.
AllowSelfApproval bool `protobuf:"varint,10,opt,name=allow_self_approval,json=allowSelfApproval,proto3" json:"allow_self_approval,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
+ // Execution retry policy for the task run.
+ ExecutionRetryPolicy *Project_ExecutionRetryPolicy `protobuf:"bytes,11,opt,name=execution_retry_policy,json=executionRetryPolicy,proto3" json:"execution_retry_policy,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Project) Reset() {
@@ -198,6 +200,58 @@ func (x *Project) GetAllowSelfApproval() bool {
return false
}
+func (x *Project) GetExecutionRetryPolicy() *Project_ExecutionRetryPolicy {
+ if x != nil {
+ return x.ExecutionRetryPolicy
+ }
+ return nil
+}
+
+type Project_ExecutionRetryPolicy struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The maximum number of retries for the lock timeout issue.
+ MaximumRetries int32 `protobuf:"varint,1,opt,name=maximum_retries,json=maximumRetries,proto3" json:"maximum_retries,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Project_ExecutionRetryPolicy) Reset() {
+ *x = Project_ExecutionRetryPolicy{}
+ mi := &file_store_project_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Project_ExecutionRetryPolicy) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Project_ExecutionRetryPolicy) ProtoMessage() {}
+
+func (x *Project_ExecutionRetryPolicy) ProtoReflect() protoreflect.Message {
+ mi := &file_store_project_proto_msgTypes[2]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Project_ExecutionRetryPolicy.ProtoReflect.Descriptor instead.
+func (*Project_ExecutionRetryPolicy) Descriptor() ([]byte, []int) {
+ return file_store_project_proto_rawDescGZIP(), []int{1, 0}
+}
+
+func (x *Project_ExecutionRetryPolicy) GetMaximumRetries() int32 {
+ if x != nil {
+ return x.MaximumRetries
+ }
+ return 0
+}
+
var File_store_project_proto protoreflect.FileDescriptor
const file_store_project_proto_rawDesc = "" +
@@ -206,7 +260,7 @@ const file_store_project_proto_rawDesc = "" +
"\x05Label\x12\x14\n" +
"\x05value\x18\x01 \x01(\tR\x05value\x12\x14\n" +
"\x05color\x18\x02 \x01(\tR\x05color\x12\x14\n" +
- "\x05group\x18\x03 \x01(\tR\x05group\"\xda\x03\n" +
+ "\x05group\x18\x03 \x01(\tR\x05group\"\xff\x04\n" +
"\aProject\x128\n" +
"\fissue_labels\x18\x02 \x03(\v2\x15.bytebase.store.LabelR\vissueLabels\x12,\n" +
"\x12force_issue_labels\x18\x03 \x01(\bR\x10forceIssueLabels\x124\n" +
@@ -217,7 +271,10 @@ const file_store_project_proto_rawDesc = "" +
"\x12skip_backup_errors\x18\b \x01(\bR\x10skipBackupErrors\x12A\n" +
"\x1dpostgres_database_tenant_mode\x18\t \x01(\bR\x1apostgresDatabaseTenantMode\x12.\n" +
"\x13allow_self_approval\x18\n" +
- " \x01(\bR\x11allowSelfApprovalJ\x04\b\x01\x10\x02B\x14Z\x12generated-go/storeb\x06proto3"
+ " \x01(\bR\x11allowSelfApproval\x12b\n" +
+ "\x16execution_retry_policy\x18\v \x01(\v2,.bytebase.store.Project.ExecutionRetryPolicyR\x14executionRetryPolicy\x1a?\n" +
+ "\x14ExecutionRetryPolicy\x12'\n" +
+ "\x0fmaximum_retries\x18\x01 \x01(\x05R\x0emaximumRetriesJ\x04\b\x01\x10\x02B\x14Z\x12generated-go/storeb\x06proto3"
var (
file_store_project_proto_rawDescOnce sync.Once
@@ -231,18 +288,20 @@ func file_store_project_proto_rawDescGZIP() []byte {
return file_store_project_proto_rawDescData
}
-var file_store_project_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_store_project_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_store_project_proto_goTypes = []any{
- (*Label)(nil), // 0: bytebase.store.Label
- (*Project)(nil), // 1: bytebase.store.Project
+ (*Label)(nil), // 0: bytebase.store.Label
+ (*Project)(nil), // 1: bytebase.store.Project
+ (*Project_ExecutionRetryPolicy)(nil), // 2: bytebase.store.Project.ExecutionRetryPolicy
}
var file_store_project_proto_depIdxs = []int32{
0, // 0: bytebase.store.Project.issue_labels:type_name -> bytebase.store.Label
- 1, // [1:1] is the sub-list for method output_type
- 1, // [1:1] is the sub-list for method input_type
- 1, // [1:1] is the sub-list for extension type_name
- 1, // [1:1] is the sub-list for extension extendee
- 0, // [0:1] is the sub-list for field type_name
+ 2, // 1: bytebase.store.Project.execution_retry_policy:type_name -> bytebase.store.Project.ExecutionRetryPolicy
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
}
func init() { file_store_project_proto_init() }
@@ -256,7 +315,7 @@ func file_store_project_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_project_proto_rawDesc), len(file_store_project_proto_rawDesc)),
NumEnums: 0,
- NumMessages: 2,
+ NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/proto/generated-go/store/task_run_log.pb.go b/proto/generated-go/store/task_run_log.pb.go
index f511f6f10e..cba6277826 100644
--- a/proto/generated-go/store/task_run_log.pb.go
+++ b/proto/generated-go/store/task_run_log.pb.go
@@ -35,6 +35,7 @@ const (
TaskRunLog_TRANSACTION_CONTROL TaskRunLog_Type = 8
TaskRunLog_PRIOR_BACKUP_START TaskRunLog_Type = 9
TaskRunLog_PRIOR_BACKUP_END TaskRunLog_Type = 10
+ TaskRunLog_RETRY_INFO TaskRunLog_Type = 11
)
// Enum value maps for TaskRunLog_Type.
@@ -51,6 +52,7 @@ var (
8: "TRANSACTION_CONTROL",
9: "PRIOR_BACKUP_START",
10: "PRIOR_BACKUP_END",
+ 11: "RETRY_INFO",
}
TaskRunLog_Type_value = map[string]int32{
"TYPE_UNSPECIFIED": 0,
@@ -64,6 +66,7 @@ var (
"TRANSACTION_CONTROL": 8,
"PRIOR_BACKUP_START": 9,
"PRIOR_BACKUP_END": 10,
+ "RETRY_INFO": 11,
}
)
@@ -211,6 +214,7 @@ type TaskRunLog struct {
TransactionControl *TaskRunLog_TransactionControl `protobuf:"bytes,9,opt,name=transaction_control,json=transactionControl,proto3" json:"transaction_control,omitempty"`
PriorBackupStart *TaskRunLog_PriorBackupStart `protobuf:"bytes,10,opt,name=prior_backup_start,json=priorBackupStart,proto3" json:"prior_backup_start,omitempty"`
PriorBackupEnd *TaskRunLog_PriorBackupEnd `protobuf:"bytes,11,opt,name=prior_backup_end,json=priorBackupEnd,proto3" json:"prior_backup_end,omitempty"`
+ RetryInfo *TaskRunLog_RetryInfo `protobuf:"bytes,13,opt,name=retry_info,json=retryInfo,proto3" json:"retry_info,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -329,6 +333,13 @@ func (x *TaskRunLog) GetPriorBackupEnd() *TaskRunLog_PriorBackupEnd {
return nil
}
+func (x *TaskRunLog) GetRetryInfo() *TaskRunLog_RetryInfo {
+ if x != nil {
+ return x.RetryInfo
+ }
+ return nil
+}
+
type TaskRunLog_SchemaDumpStart struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
@@ -789,11 +800,71 @@ func (x *TaskRunLog_PriorBackupEnd) GetError() string {
return ""
}
+type TaskRunLog_RetryInfo struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
+ RetryCount int32 `protobuf:"varint,2,opt,name=retry_count,json=retryCount,proto3" json:"retry_count,omitempty"`
+ MaximumRetries int32 `protobuf:"varint,3,opt,name=maximum_retries,json=maximumRetries,proto3" json:"maximum_retries,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *TaskRunLog_RetryInfo) Reset() {
+ *x = TaskRunLog_RetryInfo{}
+ mi := &file_store_task_run_log_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *TaskRunLog_RetryInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TaskRunLog_RetryInfo) ProtoMessage() {}
+
+func (x *TaskRunLog_RetryInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_store_task_run_log_proto_msgTypes[11]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TaskRunLog_RetryInfo.ProtoReflect.Descriptor instead.
+func (*TaskRunLog_RetryInfo) Descriptor() ([]byte, []int) {
+ return file_store_task_run_log_proto_rawDescGZIP(), []int{0, 10}
+}
+
+func (x *TaskRunLog_RetryInfo) GetError() string {
+ if x != nil {
+ return x.Error
+ }
+ return ""
+}
+
+func (x *TaskRunLog_RetryInfo) GetRetryCount() int32 {
+ if x != nil {
+ return x.RetryCount
+ }
+ return 0
+}
+
+func (x *TaskRunLog_RetryInfo) GetMaximumRetries() int32 {
+ if x != nil {
+ return x.MaximumRetries
+ }
+ return 0
+}
+
var File_store_task_run_log_proto protoreflect.FileDescriptor
const file_store_task_run_log_proto_rawDesc = "" +
"\n" +
- "\x18store/task_run_log.proto\x12\x0ebytebase.store\x1a\x14store/task_run.proto\"\xb8\x10\n" +
+ "\x18store/task_run_log.proto\x12\x0ebytebase.store\x1a\x14store/task_run.proto\"\xfa\x11\n" +
"\n" +
"TaskRunLog\x123\n" +
"\x04type\x18\x01 \x01(\x0e2\x1f.bytebase.store.TaskRunLog.TypeR\x04type\x12\x1b\n" +
@@ -808,7 +879,9 @@ const file_store_task_run_log_proto_rawDesc = "" +
"\x13transaction_control\x18\t \x01(\v2-.bytebase.store.TaskRunLog.TransactionControlR\x12transactionControl\x12Y\n" +
"\x12prior_backup_start\x18\n" +
" \x01(\v2+.bytebase.store.TaskRunLog.PriorBackupStartR\x10priorBackupStart\x12S\n" +
- "\x10prior_backup_end\x18\v \x01(\v2).bytebase.store.TaskRunLog.PriorBackupEndR\x0epriorBackupEnd\x1a\x11\n" +
+ "\x10prior_backup_end\x18\v \x01(\v2).bytebase.store.TaskRunLog.PriorBackupEndR\x0epriorBackupEnd\x12C\n" +
+ "\n" +
+ "retry_info\x18\r \x01(\v2$.bytebase.store.TaskRunLog.RetryInfoR\tretryInfo\x1a\x11\n" +
"\x0fSchemaDumpStart\x1a%\n" +
"\rSchemaDumpEnd\x12\x14\n" +
"\x05error\x18\x01 \x01(\tR\x05error\x1a9\n" +
@@ -840,7 +913,12 @@ const file_store_task_run_log_proto_rawDesc = "" +
"\x10PriorBackupStart\x1ay\n" +
"\x0ePriorBackupEnd\x12Q\n" +
"\x13prior_backup_detail\x18\x01 \x01(\v2!.bytebase.store.PriorBackupDetailR\x11priorBackupDetail\x12\x14\n" +
- "\x05error\x18\x02 \x01(\tR\x05error\"\x86\x02\n" +
+ "\x05error\x18\x02 \x01(\tR\x05error\x1ak\n" +
+ "\tRetryInfo\x12\x14\n" +
+ "\x05error\x18\x01 \x01(\tR\x05error\x12\x1f\n" +
+ "\vretry_count\x18\x02 \x01(\x05R\n" +
+ "retryCount\x12'\n" +
+ "\x0fmaximum_retries\x18\x03 \x01(\x05R\x0emaximumRetries\"\x96\x02\n" +
"\x04Type\x12\x14\n" +
"\x10TYPE_UNSPECIFIED\x10\x00\x12\x15\n" +
"\x11SCHEMA_DUMP_START\x10\x01\x12\x13\n" +
@@ -853,7 +931,9 @@ const file_store_task_run_log_proto_rawDesc = "" +
"\x13TRANSACTION_CONTROL\x10\b\x12\x16\n" +
"\x12PRIOR_BACKUP_START\x10\t\x12\x14\n" +
"\x10PRIOR_BACKUP_END\x10\n" +
- "B\x14Z\x12generated-go/storeb\x06proto3"
+ "\x12\x0e\n" +
+ "\n" +
+ "RETRY_INFO\x10\vB\x14Z\x12generated-go/storeb\x06proto3"
var (
file_store_task_run_log_proto_rawDescOnce sync.Once
@@ -868,7 +948,7 @@ func file_store_task_run_log_proto_rawDescGZIP() []byte {
}
var file_store_task_run_log_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
-var file_store_task_run_log_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
+var file_store_task_run_log_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_store_task_run_log_proto_goTypes = []any{
(TaskRunLog_Type)(0), // 0: bytebase.store.TaskRunLog.Type
(TaskRunLog_TaskRunStatusUpdate_Status)(0), // 1: bytebase.store.TaskRunLog.TaskRunStatusUpdate.Status
@@ -884,7 +964,8 @@ var file_store_task_run_log_proto_goTypes = []any{
(*TaskRunLog_TransactionControl)(nil), // 11: bytebase.store.TaskRunLog.TransactionControl
(*TaskRunLog_PriorBackupStart)(nil), // 12: bytebase.store.TaskRunLog.PriorBackupStart
(*TaskRunLog_PriorBackupEnd)(nil), // 13: bytebase.store.TaskRunLog.PriorBackupEnd
- (*PriorBackupDetail)(nil), // 14: bytebase.store.PriorBackupDetail
+ (*TaskRunLog_RetryInfo)(nil), // 14: bytebase.store.TaskRunLog.RetryInfo
+ (*PriorBackupDetail)(nil), // 15: bytebase.store.PriorBackupDetail
}
var file_store_task_run_log_proto_depIdxs = []int32{
0, // 0: bytebase.store.TaskRunLog.type:type_name -> bytebase.store.TaskRunLog.Type
@@ -898,14 +979,15 @@ var file_store_task_run_log_proto_depIdxs = []int32{
11, // 8: bytebase.store.TaskRunLog.transaction_control:type_name -> bytebase.store.TaskRunLog.TransactionControl
12, // 9: bytebase.store.TaskRunLog.prior_backup_start:type_name -> bytebase.store.TaskRunLog.PriorBackupStart
13, // 10: bytebase.store.TaskRunLog.prior_backup_end:type_name -> bytebase.store.TaskRunLog.PriorBackupEnd
- 1, // 11: bytebase.store.TaskRunLog.TaskRunStatusUpdate.status:type_name -> bytebase.store.TaskRunLog.TaskRunStatusUpdate.Status
- 2, // 12: bytebase.store.TaskRunLog.TransactionControl.type:type_name -> bytebase.store.TaskRunLog.TransactionControl.Type
- 14, // 13: bytebase.store.TaskRunLog.PriorBackupEnd.prior_backup_detail:type_name -> bytebase.store.PriorBackupDetail
- 14, // [14:14] is the sub-list for method output_type
- 14, // [14:14] is the sub-list for method input_type
- 14, // [14:14] is the sub-list for extension type_name
- 14, // [14:14] is the sub-list for extension extendee
- 0, // [0:14] is the sub-list for field type_name
+ 14, // 11: bytebase.store.TaskRunLog.retry_info:type_name -> bytebase.store.TaskRunLog.RetryInfo
+ 1, // 12: bytebase.store.TaskRunLog.TaskRunStatusUpdate.status:type_name -> bytebase.store.TaskRunLog.TaskRunStatusUpdate.Status
+ 2, // 13: bytebase.store.TaskRunLog.TransactionControl.type:type_name -> bytebase.store.TaskRunLog.TransactionControl.Type
+ 15, // 14: bytebase.store.TaskRunLog.PriorBackupEnd.prior_backup_detail:type_name -> bytebase.store.PriorBackupDetail
+ 15, // [15:15] is the sub-list for method output_type
+ 15, // [15:15] is the sub-list for method input_type
+ 15, // [15:15] is the sub-list for extension type_name
+ 15, // [15:15] is the sub-list for extension extendee
+ 0, // [0:15] is the sub-list for field type_name
}
func init() { file_store_task_run_log_proto_init() }
@@ -920,7 +1002,7 @@ func file_store_task_run_log_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_task_run_log_proto_rawDesc), len(file_store_task_run_log_proto_rawDesc)),
NumEnums: 3,
- NumMessages: 11,
+ NumMessages: 12,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/proto/generated-go/v1/project_service.pb.go b/proto/generated-go/v1/project_service.pb.go
index b6616806cf..33a2b75853 100644
--- a/proto/generated-go/v1/project_service.pb.go
+++ b/proto/generated-go/v1/project_service.pb.go
@@ -956,8 +956,10 @@ type Project struct {
PostgresDatabaseTenantMode bool `protobuf:"varint,20,opt,name=postgres_database_tenant_mode,json=postgresDatabaseTenantMode,proto3" json:"postgres_database_tenant_mode,omitempty"`
// Whether to allow the issue creator to self-approve the issue.
AllowSelfApproval bool `protobuf:"varint,21,opt,name=allow_self_approval,json=allowSelfApproval,proto3" json:"allow_self_approval,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
+ // Execution retry policy for the task run.
+ ExecutionRetryPolicy *Project_ExecutionRetryPolicy `protobuf:"bytes,22,opt,name=execution_retry_policy,json=executionRetryPolicy,proto3" json:"execution_retry_policy,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Project) Reset() {
@@ -1088,6 +1090,13 @@ func (x *Project) GetAllowSelfApproval() bool {
return false
}
+func (x *Project) GetExecutionRetryPolicy() *Project_ExecutionRetryPolicy {
+ if x != nil {
+ return x.ExecutionRetryPolicy
+ }
+ return nil
+}
+
type AddWebhookRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The name of the project to add the webhook to.
@@ -1532,6 +1541,51 @@ func (x *BatchGetIamPolicyResponse_PolicyResult) GetPolicy() *IamPolicy {
return nil
}
+type Project_ExecutionRetryPolicy struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The maximum number of retries for the lock timeout issue.
+ MaximumRetries int32 `protobuf:"varint,1,opt,name=maximum_retries,json=maximumRetries,proto3" json:"maximum_retries,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Project_ExecutionRetryPolicy) Reset() {
+ *x = Project_ExecutionRetryPolicy{}
+ mi := &file_v1_project_service_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Project_ExecutionRetryPolicy) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Project_ExecutionRetryPolicy) ProtoMessage() {}
+
+func (x *Project_ExecutionRetryPolicy) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_project_service_proto_msgTypes[21]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Project_ExecutionRetryPolicy.ProtoReflect.Descriptor instead.
+func (*Project_ExecutionRetryPolicy) Descriptor() ([]byte, []int) {
+ return file_v1_project_service_proto_rawDescGZIP(), []int{12, 0}
+}
+
+func (x *Project_ExecutionRetryPolicy) GetMaximumRetries() int32 {
+ if x != nil {
+ return x.MaximumRetries
+ }
+ return 0
+}
+
var File_v1_project_service_proto protoreflect.FileDescriptor
const file_v1_project_service_proto_rawDesc = "" +
@@ -1584,7 +1638,7 @@ const file_v1_project_service_proto_rawDesc = "" +
"\x05Label\x12\x14\n" +
"\x05value\x18\x01 \x01(\tR\x05value\x12\x14\n" +
"\x05color\x18\x02 \x01(\tR\x05color\x12\x14\n" +
- "\x05group\x18\x03 \x01(\tR\x05group\"\xcf\x05\n" +
+ "\x05group\x18\x03 \x01(\tR\x05group\"\xf1\x06\n" +
"\aProject\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12(\n" +
"\x05state\x18\x03 \x01(\x0e2\x12.bytebase.v1.StateR\x05state\x12\x14\n" +
@@ -1599,7 +1653,10 @@ const file_v1_project_service_proto_rawDesc = "" +
"\x12auto_enable_backup\x18\x12 \x01(\bR\x10autoEnableBackup\x12,\n" +
"\x12skip_backup_errors\x18\x13 \x01(\bR\x10skipBackupErrors\x12A\n" +
"\x1dpostgres_database_tenant_mode\x18\x14 \x01(\bR\x1apostgresDatabaseTenantMode\x12.\n" +
- "\x13allow_self_approval\x18\x15 \x01(\bR\x11allowSelfApproval:-\xeaA*\n" +
+ "\x13allow_self_approval\x18\x15 \x01(\bR\x11allowSelfApproval\x12_\n" +
+ "\x16execution_retry_policy\x18\x16 \x01(\v2).bytebase.v1.Project.ExecutionRetryPolicyR\x14executionRetryPolicy\x1a?\n" +
+ "\x14ExecutionRetryPolicy\x12'\n" +
+ "\x0fmaximum_retries\x18\x01 \x01(\x05R\x0emaximumRetries:-\xeaA*\n" +
"\x14bytebase.com/Project\x12\x12projects/{project}J\x04\b\x02\x10\x03\"\x82\x01\n" +
"\x11AddWebhookRequest\x127\n" +
"\aproject\x18\x01 \x01(\tB\x1d\xe2A\x01\x02\xfaA\x16\n" +
@@ -1691,7 +1748,7 @@ func file_v1_project_service_proto_rawDescGZIP() []byte {
}
var file_v1_project_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
-var file_v1_project_service_proto_msgTypes = make([]protoimpl.MessageInfo, 21)
+var file_v1_project_service_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
var file_v1_project_service_proto_goTypes = []any{
(Webhook_Type)(0), // 0: bytebase.v1.Webhook.Type
(Activity_Type)(0), // 1: bytebase.v1.Activity.Type
@@ -1716,64 +1773,66 @@ var file_v1_project_service_proto_goTypes = []any{
(*Webhook)(nil), // 20: bytebase.v1.Webhook
(*Activity)(nil), // 21: bytebase.v1.Activity
(*BatchGetIamPolicyResponse_PolicyResult)(nil), // 22: bytebase.v1.BatchGetIamPolicyResponse.PolicyResult
- (*fieldmaskpb.FieldMask)(nil), // 23: google.protobuf.FieldMask
- (State)(0), // 24: bytebase.v1.State
- (*IamPolicy)(nil), // 25: bytebase.v1.IamPolicy
- (*GetIamPolicyRequest)(nil), // 26: bytebase.v1.GetIamPolicyRequest
- (*SetIamPolicyRequest)(nil), // 27: bytebase.v1.SetIamPolicyRequest
- (*emptypb.Empty)(nil), // 28: google.protobuf.Empty
+ (*Project_ExecutionRetryPolicy)(nil), // 23: bytebase.v1.Project.ExecutionRetryPolicy
+ (*fieldmaskpb.FieldMask)(nil), // 24: google.protobuf.FieldMask
+ (State)(0), // 25: bytebase.v1.State
+ (*IamPolicy)(nil), // 26: bytebase.v1.IamPolicy
+ (*GetIamPolicyRequest)(nil), // 27: bytebase.v1.GetIamPolicyRequest
+ (*SetIamPolicyRequest)(nil), // 28: bytebase.v1.SetIamPolicyRequest
+ (*emptypb.Empty)(nil), // 29: google.protobuf.Empty
}
var file_v1_project_service_proto_depIdxs = []int32{
14, // 0: bytebase.v1.ListProjectsResponse.projects:type_name -> bytebase.v1.Project
14, // 1: bytebase.v1.SearchProjectsResponse.projects:type_name -> bytebase.v1.Project
14, // 2: bytebase.v1.CreateProjectRequest.project:type_name -> bytebase.v1.Project
14, // 3: bytebase.v1.UpdateProjectRequest.project:type_name -> bytebase.v1.Project
- 23, // 4: bytebase.v1.UpdateProjectRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 24, // 4: bytebase.v1.UpdateProjectRequest.update_mask:type_name -> google.protobuf.FieldMask
22, // 5: bytebase.v1.BatchGetIamPolicyResponse.policy_results:type_name -> bytebase.v1.BatchGetIamPolicyResponse.PolicyResult
- 24, // 6: bytebase.v1.Project.state:type_name -> bytebase.v1.State
+ 25, // 6: bytebase.v1.Project.state:type_name -> bytebase.v1.State
20, // 7: bytebase.v1.Project.webhooks:type_name -> bytebase.v1.Webhook
13, // 8: bytebase.v1.Project.issue_labels:type_name -> bytebase.v1.Label
- 20, // 9: bytebase.v1.AddWebhookRequest.webhook:type_name -> bytebase.v1.Webhook
- 20, // 10: bytebase.v1.UpdateWebhookRequest.webhook:type_name -> bytebase.v1.Webhook
- 23, // 11: bytebase.v1.UpdateWebhookRequest.update_mask:type_name -> google.protobuf.FieldMask
- 20, // 12: bytebase.v1.RemoveWebhookRequest.webhook:type_name -> bytebase.v1.Webhook
- 20, // 13: bytebase.v1.TestWebhookRequest.webhook:type_name -> bytebase.v1.Webhook
- 0, // 14: bytebase.v1.Webhook.type:type_name -> bytebase.v1.Webhook.Type
- 1, // 15: bytebase.v1.Webhook.notification_types:type_name -> bytebase.v1.Activity.Type
- 25, // 16: bytebase.v1.BatchGetIamPolicyResponse.PolicyResult.policy:type_name -> bytebase.v1.IamPolicy
- 2, // 17: bytebase.v1.ProjectService.GetProject:input_type -> bytebase.v1.GetProjectRequest
- 3, // 18: bytebase.v1.ProjectService.ListProjects:input_type -> bytebase.v1.ListProjectsRequest
- 5, // 19: bytebase.v1.ProjectService.SearchProjects:input_type -> bytebase.v1.SearchProjectsRequest
- 7, // 20: bytebase.v1.ProjectService.CreateProject:input_type -> bytebase.v1.CreateProjectRequest
- 8, // 21: bytebase.v1.ProjectService.UpdateProject:input_type -> bytebase.v1.UpdateProjectRequest
- 9, // 22: bytebase.v1.ProjectService.DeleteProject:input_type -> bytebase.v1.DeleteProjectRequest
- 10, // 23: bytebase.v1.ProjectService.UndeleteProject:input_type -> bytebase.v1.UndeleteProjectRequest
- 26, // 24: bytebase.v1.ProjectService.GetIamPolicy:input_type -> bytebase.v1.GetIamPolicyRequest
- 11, // 25: bytebase.v1.ProjectService.BatchGetIamPolicy:input_type -> bytebase.v1.BatchGetIamPolicyRequest
- 27, // 26: bytebase.v1.ProjectService.SetIamPolicy:input_type -> bytebase.v1.SetIamPolicyRequest
- 15, // 27: bytebase.v1.ProjectService.AddWebhook:input_type -> bytebase.v1.AddWebhookRequest
- 16, // 28: bytebase.v1.ProjectService.UpdateWebhook:input_type -> bytebase.v1.UpdateWebhookRequest
- 17, // 29: bytebase.v1.ProjectService.RemoveWebhook:input_type -> bytebase.v1.RemoveWebhookRequest
- 18, // 30: bytebase.v1.ProjectService.TestWebhook:input_type -> bytebase.v1.TestWebhookRequest
- 14, // 31: bytebase.v1.ProjectService.GetProject:output_type -> bytebase.v1.Project
- 4, // 32: bytebase.v1.ProjectService.ListProjects:output_type -> bytebase.v1.ListProjectsResponse
- 6, // 33: bytebase.v1.ProjectService.SearchProjects:output_type -> bytebase.v1.SearchProjectsResponse
- 14, // 34: bytebase.v1.ProjectService.CreateProject:output_type -> bytebase.v1.Project
- 14, // 35: bytebase.v1.ProjectService.UpdateProject:output_type -> bytebase.v1.Project
- 28, // 36: bytebase.v1.ProjectService.DeleteProject:output_type -> google.protobuf.Empty
- 14, // 37: bytebase.v1.ProjectService.UndeleteProject:output_type -> bytebase.v1.Project
- 25, // 38: bytebase.v1.ProjectService.GetIamPolicy:output_type -> bytebase.v1.IamPolicy
- 12, // 39: bytebase.v1.ProjectService.BatchGetIamPolicy:output_type -> bytebase.v1.BatchGetIamPolicyResponse
- 25, // 40: bytebase.v1.ProjectService.SetIamPolicy:output_type -> bytebase.v1.IamPolicy
- 14, // 41: bytebase.v1.ProjectService.AddWebhook:output_type -> bytebase.v1.Project
- 14, // 42: bytebase.v1.ProjectService.UpdateWebhook:output_type -> bytebase.v1.Project
- 14, // 43: bytebase.v1.ProjectService.RemoveWebhook:output_type -> bytebase.v1.Project
- 19, // 44: bytebase.v1.ProjectService.TestWebhook:output_type -> bytebase.v1.TestWebhookResponse
- 31, // [31:45] is the sub-list for method output_type
- 17, // [17:31] is the sub-list for method input_type
- 17, // [17:17] is the sub-list for extension type_name
- 17, // [17:17] is the sub-list for extension extendee
- 0, // [0:17] is the sub-list for field type_name
+ 23, // 9: bytebase.v1.Project.execution_retry_policy:type_name -> bytebase.v1.Project.ExecutionRetryPolicy
+ 20, // 10: bytebase.v1.AddWebhookRequest.webhook:type_name -> bytebase.v1.Webhook
+ 20, // 11: bytebase.v1.UpdateWebhookRequest.webhook:type_name -> bytebase.v1.Webhook
+ 24, // 12: bytebase.v1.UpdateWebhookRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 20, // 13: bytebase.v1.RemoveWebhookRequest.webhook:type_name -> bytebase.v1.Webhook
+ 20, // 14: bytebase.v1.TestWebhookRequest.webhook:type_name -> bytebase.v1.Webhook
+ 0, // 15: bytebase.v1.Webhook.type:type_name -> bytebase.v1.Webhook.Type
+ 1, // 16: bytebase.v1.Webhook.notification_types:type_name -> bytebase.v1.Activity.Type
+ 26, // 17: bytebase.v1.BatchGetIamPolicyResponse.PolicyResult.policy:type_name -> bytebase.v1.IamPolicy
+ 2, // 18: bytebase.v1.ProjectService.GetProject:input_type -> bytebase.v1.GetProjectRequest
+ 3, // 19: bytebase.v1.ProjectService.ListProjects:input_type -> bytebase.v1.ListProjectsRequest
+ 5, // 20: bytebase.v1.ProjectService.SearchProjects:input_type -> bytebase.v1.SearchProjectsRequest
+ 7, // 21: bytebase.v1.ProjectService.CreateProject:input_type -> bytebase.v1.CreateProjectRequest
+ 8, // 22: bytebase.v1.ProjectService.UpdateProject:input_type -> bytebase.v1.UpdateProjectRequest
+ 9, // 23: bytebase.v1.ProjectService.DeleteProject:input_type -> bytebase.v1.DeleteProjectRequest
+ 10, // 24: bytebase.v1.ProjectService.UndeleteProject:input_type -> bytebase.v1.UndeleteProjectRequest
+ 27, // 25: bytebase.v1.ProjectService.GetIamPolicy:input_type -> bytebase.v1.GetIamPolicyRequest
+ 11, // 26: bytebase.v1.ProjectService.BatchGetIamPolicy:input_type -> bytebase.v1.BatchGetIamPolicyRequest
+ 28, // 27: bytebase.v1.ProjectService.SetIamPolicy:input_type -> bytebase.v1.SetIamPolicyRequest
+ 15, // 28: bytebase.v1.ProjectService.AddWebhook:input_type -> bytebase.v1.AddWebhookRequest
+ 16, // 29: bytebase.v1.ProjectService.UpdateWebhook:input_type -> bytebase.v1.UpdateWebhookRequest
+ 17, // 30: bytebase.v1.ProjectService.RemoveWebhook:input_type -> bytebase.v1.RemoveWebhookRequest
+ 18, // 31: bytebase.v1.ProjectService.TestWebhook:input_type -> bytebase.v1.TestWebhookRequest
+ 14, // 32: bytebase.v1.ProjectService.GetProject:output_type -> bytebase.v1.Project
+ 4, // 33: bytebase.v1.ProjectService.ListProjects:output_type -> bytebase.v1.ListProjectsResponse
+ 6, // 34: bytebase.v1.ProjectService.SearchProjects:output_type -> bytebase.v1.SearchProjectsResponse
+ 14, // 35: bytebase.v1.ProjectService.CreateProject:output_type -> bytebase.v1.Project
+ 14, // 36: bytebase.v1.ProjectService.UpdateProject:output_type -> bytebase.v1.Project
+ 29, // 37: bytebase.v1.ProjectService.DeleteProject:output_type -> google.protobuf.Empty
+ 14, // 38: bytebase.v1.ProjectService.UndeleteProject:output_type -> bytebase.v1.Project
+ 26, // 39: bytebase.v1.ProjectService.GetIamPolicy:output_type -> bytebase.v1.IamPolicy
+ 12, // 40: bytebase.v1.ProjectService.BatchGetIamPolicy:output_type -> bytebase.v1.BatchGetIamPolicyResponse
+ 26, // 41: bytebase.v1.ProjectService.SetIamPolicy:output_type -> bytebase.v1.IamPolicy
+ 14, // 42: bytebase.v1.ProjectService.AddWebhook:output_type -> bytebase.v1.Project
+ 14, // 43: bytebase.v1.ProjectService.UpdateWebhook:output_type -> bytebase.v1.Project
+ 14, // 44: bytebase.v1.ProjectService.RemoveWebhook:output_type -> bytebase.v1.Project
+ 19, // 45: bytebase.v1.ProjectService.TestWebhook:output_type -> bytebase.v1.TestWebhookResponse
+ 32, // [32:46] is the sub-list for method output_type
+ 18, // [18:32] is the sub-list for method input_type
+ 18, // [18:18] is the sub-list for extension type_name
+ 18, // [18:18] is the sub-list for extension extendee
+ 0, // [0:18] is the sub-list for field type_name
}
func init() { file_v1_project_service_proto_init() }
@@ -1790,7 +1849,7 @@ func file_v1_project_service_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_project_service_proto_rawDesc), len(file_v1_project_service_proto_rawDesc)),
NumEnums: 2,
- NumMessages: 21,
+ NumMessages: 22,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/proto/generated-go/v1/rollout_service.pb.go b/proto/generated-go/v1/rollout_service.pb.go
index de616e304a..11d028ce3b 100644
--- a/proto/generated-go/v1/rollout_service.pb.go
+++ b/proto/generated-go/v1/rollout_service.pb.go
@@ -278,6 +278,7 @@ const (
TaskRunLogEntry_TASK_RUN_STATUS_UPDATE TaskRunLogEntry_Type = 4
TaskRunLogEntry_TRANSACTION_CONTROL TaskRunLogEntry_Type = 5
TaskRunLogEntry_PRIOR_BACKUP TaskRunLogEntry_Type = 6
+ TaskRunLogEntry_RETRY_INFO TaskRunLogEntry_Type = 7
)
// Enum value maps for TaskRunLogEntry_Type.
@@ -290,6 +291,7 @@ var (
4: "TASK_RUN_STATUS_UPDATE",
5: "TRANSACTION_CONTROL",
6: "PRIOR_BACKUP",
+ 7: "RETRY_INFO",
}
TaskRunLogEntry_Type_value = map[string]int32{
"TYPE_UNSPECIFIED": 0,
@@ -299,6 +301,7 @@ var (
"TASK_RUN_STATUS_UPDATE": 4,
"TRANSACTION_CONTROL": 5,
"PRIOR_BACKUP": 6,
+ "RETRY_INFO": 7,
}
)
@@ -1825,6 +1828,7 @@ type TaskRunLogEntry struct {
TaskRunStatusUpdate *TaskRunLogEntry_TaskRunStatusUpdate `protobuf:"bytes,5,opt,name=task_run_status_update,json=taskRunStatusUpdate,proto3" json:"task_run_status_update,omitempty"`
TransactionControl *TaskRunLogEntry_TransactionControl `protobuf:"bytes,7,opt,name=transaction_control,json=transactionControl,proto3" json:"transaction_control,omitempty"`
PriorBackup *TaskRunLogEntry_PriorBackup `protobuf:"bytes,8,opt,name=prior_backup,json=priorBackup,proto3" json:"prior_backup,omitempty"`
+ RetryInfo *TaskRunLogEntry_RetryInfo `protobuf:"bytes,9,opt,name=retry_info,json=retryInfo,proto3" json:"retry_info,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -1922,6 +1926,13 @@ func (x *TaskRunLogEntry) GetPriorBackup() *TaskRunLogEntry_PriorBackup {
return nil
}
+func (x *TaskRunLogEntry) GetRetryInfo() *TaskRunLogEntry_RetryInfo {
+ if x != nil {
+ return x.RetryInfo
+ }
+ return nil
+}
+
type GetTaskRunSessionRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}
@@ -3163,6 +3174,66 @@ func (x *TaskRunLogEntry_PriorBackup) GetError() string {
return ""
}
+type TaskRunLogEntry_RetryInfo struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
+ RetryCount int32 `protobuf:"varint,2,opt,name=retry_count,json=retryCount,proto3" json:"retry_count,omitempty"`
+ MaximumRetries int32 `protobuf:"varint,3,opt,name=maximum_retries,json=maximumRetries,proto3" json:"maximum_retries,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *TaskRunLogEntry_RetryInfo) Reset() {
+ *x = TaskRunLogEntry_RetryInfo{}
+ mi := &file_v1_rollout_service_proto_msgTypes[42]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *TaskRunLogEntry_RetryInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TaskRunLogEntry_RetryInfo) ProtoMessage() {}
+
+func (x *TaskRunLogEntry_RetryInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_rollout_service_proto_msgTypes[42]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TaskRunLogEntry_RetryInfo.ProtoReflect.Descriptor instead.
+func (*TaskRunLogEntry_RetryInfo) Descriptor() ([]byte, []int) {
+ return file_v1_rollout_service_proto_rawDescGZIP(), []int{20, 6}
+}
+
+func (x *TaskRunLogEntry_RetryInfo) GetError() string {
+ if x != nil {
+ return x.Error
+ }
+ return ""
+}
+
+func (x *TaskRunLogEntry_RetryInfo) GetRetryCount() int32 {
+ if x != nil {
+ return x.RetryCount
+ }
+ return 0
+}
+
+func (x *TaskRunLogEntry_RetryInfo) GetMaximumRetries() int32 {
+ if x != nil {
+ return x.MaximumRetries
+ }
+ return 0
+}
+
type TaskRunLogEntry_CommandExecute_CommandResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
LogTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=log_time,json=logTime,proto3" json:"log_time,omitempty"`
@@ -3177,7 +3248,7 @@ type TaskRunLogEntry_CommandExecute_CommandResponse struct {
func (x *TaskRunLogEntry_CommandExecute_CommandResponse) Reset() {
*x = TaskRunLogEntry_CommandExecute_CommandResponse{}
- mi := &file_v1_rollout_service_proto_msgTypes[42]
+ mi := &file_v1_rollout_service_proto_msgTypes[43]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3189,7 +3260,7 @@ func (x *TaskRunLogEntry_CommandExecute_CommandResponse) String() string {
func (*TaskRunLogEntry_CommandExecute_CommandResponse) ProtoMessage() {}
func (x *TaskRunLogEntry_CommandExecute_CommandResponse) ProtoReflect() protoreflect.Message {
- mi := &file_v1_rollout_service_proto_msgTypes[42]
+ mi := &file_v1_rollout_service_proto_msgTypes[43]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3247,7 +3318,7 @@ type TaskRunSession_Postgres struct {
func (x *TaskRunSession_Postgres) Reset() {
*x = TaskRunSession_Postgres{}
- mi := &file_v1_rollout_service_proto_msgTypes[43]
+ mi := &file_v1_rollout_service_proto_msgTypes[44]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3259,7 +3330,7 @@ func (x *TaskRunSession_Postgres) String() string {
func (*TaskRunSession_Postgres) ProtoMessage() {}
func (x *TaskRunSession_Postgres) ProtoReflect() protoreflect.Message {
- mi := &file_v1_rollout_service_proto_msgTypes[43]
+ mi := &file_v1_rollout_service_proto_msgTypes[44]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3319,7 +3390,7 @@ type TaskRunSession_Postgres_Session struct {
func (x *TaskRunSession_Postgres_Session) Reset() {
*x = TaskRunSession_Postgres_Session{}
- mi := &file_v1_rollout_service_proto_msgTypes[44]
+ mi := &file_v1_rollout_service_proto_msgTypes[45]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3331,7 +3402,7 @@ func (x *TaskRunSession_Postgres_Session) String() string {
func (*TaskRunSession_Postgres_Session) ProtoMessage() {}
func (x *TaskRunSession_Postgres_Session) ProtoReflect() protoreflect.Message {
- mi := &file_v1_rollout_service_proto_msgTypes[44]
+ mi := &file_v1_rollout_service_proto_msgTypes[45]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3632,7 +3703,7 @@ const file_v1_rollout_service_proto_rawDesc = "" +
"TaskRunLog\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x126\n" +
"\aentries\x18\x02 \x03(\v2\x1c.bytebase.v1.TaskRunLogEntryR\aentries:v\xeaAs\n" +
- "\x17bytebase.com/TaskRunLog\x12Xprojects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/log\"\xce\x10\n" +
+ "\x17bytebase.com/TaskRunLog\x12Xprojects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/log\"\x92\x12\n" +
"\x0fTaskRunLogEntry\x125\n" +
"\x04type\x18\x01 \x01(\x0e2!.bytebase.v1.TaskRunLogEntry.TypeR\x04type\x125\n" +
"\blog_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\alogTime\x12\x1b\n" +
@@ -3643,7 +3714,9 @@ const file_v1_rollout_service_proto_rawDesc = "" +
"\rdatabase_sync\x18\x04 \x01(\v2).bytebase.v1.TaskRunLogEntry.DatabaseSyncR\fdatabaseSync\x12e\n" +
"\x16task_run_status_update\x18\x05 \x01(\v20.bytebase.v1.TaskRunLogEntry.TaskRunStatusUpdateR\x13taskRunStatusUpdate\x12`\n" +
"\x13transaction_control\x18\a \x01(\v2/.bytebase.v1.TaskRunLogEntry.TransactionControlR\x12transactionControl\x12K\n" +
- "\fprior_backup\x18\b \x01(\v2(.bytebase.v1.TaskRunLogEntry.PriorBackupR\vpriorBackup\x1a\x94\x01\n" +
+ "\fprior_backup\x18\b \x01(\v2(.bytebase.v1.TaskRunLogEntry.PriorBackupR\vpriorBackup\x12E\n" +
+ "\n" +
+ "retry_info\x18\t \x01(\v2&.bytebase.v1.TaskRunLogEntry.RetryInfoR\tretryInfo\x1a\x94\x01\n" +
"\n" +
"SchemaDump\x129\n" +
"\n" +
@@ -3684,7 +3757,12 @@ const file_v1_rollout_service_proto_rawDesc = "" +
"start_time\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\tstartTime\x125\n" +
"\bend_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\aendTime\x12V\n" +
"\x13prior_backup_detail\x18\x03 \x01(\v2&.bytebase.v1.TaskRun.PriorBackupDetailR\x11priorBackupDetail\x12\x14\n" +
- "\x05error\x18\x04 \x01(\tR\x05error\"\x9c\x01\n" +
+ "\x05error\x18\x04 \x01(\tR\x05error\x1ak\n" +
+ "\tRetryInfo\x12\x14\n" +
+ "\x05error\x18\x01 \x01(\tR\x05error\x12\x1f\n" +
+ "\vretry_count\x18\x02 \x01(\x05R\n" +
+ "retryCount\x12'\n" +
+ "\x0fmaximum_retries\x18\x03 \x01(\x05R\x0emaximumRetries\"\xac\x01\n" +
"\x04Type\x12\x14\n" +
"\x10TYPE_UNSPECIFIED\x10\x00\x12\x0f\n" +
"\vSCHEMA_DUMP\x10\x01\x12\x13\n" +
@@ -3692,7 +3770,9 @@ const file_v1_rollout_service_proto_rawDesc = "" +
"\rDATABASE_SYNC\x10\x03\x12\x1a\n" +
"\x16TASK_RUN_STATUS_UPDATE\x10\x04\x12\x17\n" +
"\x13TRANSACTION_CONTROL\x10\x05\x12\x10\n" +
- "\fPRIOR_BACKUP\x10\x06\"Q\n" +
+ "\fPRIOR_BACKUP\x10\x06\x12\x0e\n" +
+ "\n" +
+ "RETRY_INFO\x10\a\"Q\n" +
"\x18GetTaskRunSessionRequest\x125\n" +
"\x06parent\x18\x01 \x01(\tB\x1d\xe2A\x01\x02\xfaA\x16\n" +
"\x14bytebase.com/TaskRunR\x06parent\"\xc0\t\n" +
@@ -3771,7 +3851,7 @@ func file_v1_rollout_service_proto_rawDescGZIP() []byte {
}
var file_v1_rollout_service_proto_enumTypes = make([]protoimpl.EnumInfo, 7)
-var file_v1_rollout_service_proto_msgTypes = make([]protoimpl.MessageInfo, 45)
+var file_v1_rollout_service_proto_msgTypes = make([]protoimpl.MessageInfo, 46)
var file_v1_rollout_service_proto_goTypes = []any{
(Task_Status)(0), // 0: bytebase.v1.Task.Status
(Task_Type)(0), // 1: bytebase.v1.Task.Type
@@ -3822,21 +3902,22 @@ var file_v1_rollout_service_proto_goTypes = []any{
(*TaskRunLogEntry_TaskRunStatusUpdate)(nil), // 46: bytebase.v1.TaskRunLogEntry.TaskRunStatusUpdate
(*TaskRunLogEntry_TransactionControl)(nil), // 47: bytebase.v1.TaskRunLogEntry.TransactionControl
(*TaskRunLogEntry_PriorBackup)(nil), // 48: bytebase.v1.TaskRunLogEntry.PriorBackup
- (*TaskRunLogEntry_CommandExecute_CommandResponse)(nil), // 49: bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse
- (*TaskRunSession_Postgres)(nil), // 50: bytebase.v1.TaskRunSession.Postgres
- (*TaskRunSession_Postgres_Session)(nil), // 51: bytebase.v1.TaskRunSession.Postgres.Session
- (*Plan)(nil), // 52: bytebase.v1.Plan
- (*timestamppb.Timestamp)(nil), // 53: google.protobuf.Timestamp
- (ExportFormat)(0), // 54: bytebase.v1.ExportFormat
- (*Position)(nil), // 55: bytebase.v1.Position
+ (*TaskRunLogEntry_RetryInfo)(nil), // 49: bytebase.v1.TaskRunLogEntry.RetryInfo
+ (*TaskRunLogEntry_CommandExecute_CommandResponse)(nil), // 50: bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse
+ (*TaskRunSession_Postgres)(nil), // 51: bytebase.v1.TaskRunSession.Postgres
+ (*TaskRunSession_Postgres_Session)(nil), // 52: bytebase.v1.TaskRunSession.Postgres.Session
+ (*Plan)(nil), // 53: bytebase.v1.Plan
+ (*timestamppb.Timestamp)(nil), // 54: google.protobuf.Timestamp
+ (ExportFormat)(0), // 55: bytebase.v1.ExportFormat
+ (*Position)(nil), // 56: bytebase.v1.Position
}
var file_v1_rollout_service_proto_depIdxs = []int32{
22, // 0: bytebase.v1.ListRolloutsResponse.rollouts:type_name -> bytebase.v1.Rollout
22, // 1: bytebase.v1.CreateRolloutRequest.rollout:type_name -> bytebase.v1.Rollout
- 52, // 2: bytebase.v1.PreviewRolloutRequest.plan:type_name -> bytebase.v1.Plan
+ 53, // 2: bytebase.v1.PreviewRolloutRequest.plan:type_name -> bytebase.v1.Plan
25, // 3: bytebase.v1.ListTaskRunsResponse.task_runs:type_name -> bytebase.v1.TaskRun
23, // 4: bytebase.v1.Rollout.stages:type_name -> bytebase.v1.Stage
- 53, // 5: bytebase.v1.Rollout.create_time:type_name -> google.protobuf.Timestamp
+ 54, // 5: bytebase.v1.Rollout.create_time:type_name -> google.protobuf.Timestamp
24, // 6: bytebase.v1.Stage.tasks:type_name -> bytebase.v1.Task
0, // 7: bytebase.v1.Task.status:type_name -> bytebase.v1.Task.Status
1, // 8: bytebase.v1.Task.type:type_name -> bytebase.v1.Task.Type
@@ -3845,79 +3926,80 @@ var file_v1_rollout_service_proto_depIdxs = []int32{
34, // 11: bytebase.v1.Task.database_schema_update:type_name -> bytebase.v1.Task.DatabaseSchemaUpdate
35, // 12: bytebase.v1.Task.database_data_update:type_name -> bytebase.v1.Task.DatabaseDataUpdate
36, // 13: bytebase.v1.Task.database_data_export:type_name -> bytebase.v1.Task.DatabaseDataExport
- 53, // 14: bytebase.v1.TaskRun.create_time:type_name -> google.protobuf.Timestamp
- 53, // 15: bytebase.v1.TaskRun.update_time:type_name -> google.protobuf.Timestamp
+ 54, // 14: bytebase.v1.TaskRun.create_time:type_name -> google.protobuf.Timestamp
+ 54, // 15: bytebase.v1.TaskRun.update_time:type_name -> google.protobuf.Timestamp
2, // 16: bytebase.v1.TaskRun.status:type_name -> bytebase.v1.TaskRun.Status
- 53, // 17: bytebase.v1.TaskRun.start_time:type_name -> google.protobuf.Timestamp
+ 54, // 17: bytebase.v1.TaskRun.start_time:type_name -> google.protobuf.Timestamp
3, // 18: bytebase.v1.TaskRun.export_archive_status:type_name -> bytebase.v1.TaskRun.ExportArchiveStatus
37, // 19: bytebase.v1.TaskRun.prior_backup_detail:type_name -> bytebase.v1.TaskRun.PriorBackupDetail
38, // 20: bytebase.v1.TaskRun.scheduler_info:type_name -> bytebase.v1.TaskRun.SchedulerInfo
27, // 21: bytebase.v1.TaskRunLog.entries:type_name -> bytebase.v1.TaskRunLogEntry
4, // 22: bytebase.v1.TaskRunLogEntry.type:type_name -> bytebase.v1.TaskRunLogEntry.Type
- 53, // 23: bytebase.v1.TaskRunLogEntry.log_time:type_name -> google.protobuf.Timestamp
+ 54, // 23: bytebase.v1.TaskRunLogEntry.log_time:type_name -> google.protobuf.Timestamp
43, // 24: bytebase.v1.TaskRunLogEntry.schema_dump:type_name -> bytebase.v1.TaskRunLogEntry.SchemaDump
44, // 25: bytebase.v1.TaskRunLogEntry.command_execute:type_name -> bytebase.v1.TaskRunLogEntry.CommandExecute
45, // 26: bytebase.v1.TaskRunLogEntry.database_sync:type_name -> bytebase.v1.TaskRunLogEntry.DatabaseSync
46, // 27: bytebase.v1.TaskRunLogEntry.task_run_status_update:type_name -> bytebase.v1.TaskRunLogEntry.TaskRunStatusUpdate
47, // 28: bytebase.v1.TaskRunLogEntry.transaction_control:type_name -> bytebase.v1.TaskRunLogEntry.TransactionControl
48, // 29: bytebase.v1.TaskRunLogEntry.prior_backup:type_name -> bytebase.v1.TaskRunLogEntry.PriorBackup
- 50, // 30: bytebase.v1.TaskRunSession.postgres:type_name -> bytebase.v1.TaskRunSession.Postgres
- 54, // 31: bytebase.v1.Task.DatabaseDataExport.format:type_name -> bytebase.v1.ExportFormat
- 39, // 32: bytebase.v1.TaskRun.PriorBackupDetail.items:type_name -> bytebase.v1.TaskRun.PriorBackupDetail.Item
- 53, // 33: bytebase.v1.TaskRun.SchedulerInfo.report_time:type_name -> google.protobuf.Timestamp
- 41, // 34: bytebase.v1.TaskRun.SchedulerInfo.waiting_cause:type_name -> bytebase.v1.TaskRun.SchedulerInfo.WaitingCause
- 40, // 35: bytebase.v1.TaskRun.PriorBackupDetail.Item.source_table:type_name -> bytebase.v1.TaskRun.PriorBackupDetail.Item.Table
- 40, // 36: bytebase.v1.TaskRun.PriorBackupDetail.Item.target_table:type_name -> bytebase.v1.TaskRun.PriorBackupDetail.Item.Table
- 55, // 37: bytebase.v1.TaskRun.PriorBackupDetail.Item.start_position:type_name -> bytebase.v1.Position
- 55, // 38: bytebase.v1.TaskRun.PriorBackupDetail.Item.end_position:type_name -> bytebase.v1.Position
- 42, // 39: bytebase.v1.TaskRun.SchedulerInfo.WaitingCause.task:type_name -> bytebase.v1.TaskRun.SchedulerInfo.WaitingCause.Task
- 53, // 40: bytebase.v1.TaskRunLogEntry.SchemaDump.start_time:type_name -> google.protobuf.Timestamp
- 53, // 41: bytebase.v1.TaskRunLogEntry.SchemaDump.end_time:type_name -> google.protobuf.Timestamp
- 53, // 42: bytebase.v1.TaskRunLogEntry.CommandExecute.log_time:type_name -> google.protobuf.Timestamp
- 49, // 43: bytebase.v1.TaskRunLogEntry.CommandExecute.response:type_name -> bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse
- 53, // 44: bytebase.v1.TaskRunLogEntry.DatabaseSync.start_time:type_name -> google.protobuf.Timestamp
- 53, // 45: bytebase.v1.TaskRunLogEntry.DatabaseSync.end_time:type_name -> google.protobuf.Timestamp
- 5, // 46: bytebase.v1.TaskRunLogEntry.TaskRunStatusUpdate.status:type_name -> bytebase.v1.TaskRunLogEntry.TaskRunStatusUpdate.Status
- 6, // 47: bytebase.v1.TaskRunLogEntry.TransactionControl.type:type_name -> bytebase.v1.TaskRunLogEntry.TransactionControl.Type
- 53, // 48: bytebase.v1.TaskRunLogEntry.PriorBackup.start_time:type_name -> google.protobuf.Timestamp
- 53, // 49: bytebase.v1.TaskRunLogEntry.PriorBackup.end_time:type_name -> google.protobuf.Timestamp
- 37, // 50: bytebase.v1.TaskRunLogEntry.PriorBackup.prior_backup_detail:type_name -> bytebase.v1.TaskRun.PriorBackupDetail
- 53, // 51: bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse.log_time:type_name -> google.protobuf.Timestamp
- 51, // 52: bytebase.v1.TaskRunSession.Postgres.session:type_name -> bytebase.v1.TaskRunSession.Postgres.Session
- 51, // 53: bytebase.v1.TaskRunSession.Postgres.blocking_sessions:type_name -> bytebase.v1.TaskRunSession.Postgres.Session
- 51, // 54: bytebase.v1.TaskRunSession.Postgres.blocked_sessions:type_name -> bytebase.v1.TaskRunSession.Postgres.Session
- 53, // 55: bytebase.v1.TaskRunSession.Postgres.Session.backend_start:type_name -> google.protobuf.Timestamp
- 53, // 56: bytebase.v1.TaskRunSession.Postgres.Session.xact_start:type_name -> google.protobuf.Timestamp
- 53, // 57: bytebase.v1.TaskRunSession.Postgres.Session.query_start:type_name -> google.protobuf.Timestamp
- 13, // 58: bytebase.v1.RolloutService.GetRollout:input_type -> bytebase.v1.GetRolloutRequest
- 14, // 59: bytebase.v1.RolloutService.ListRollouts:input_type -> bytebase.v1.ListRolloutsRequest
- 16, // 60: bytebase.v1.RolloutService.CreateRollout:input_type -> bytebase.v1.CreateRolloutRequest
- 17, // 61: bytebase.v1.RolloutService.PreviewRollout:input_type -> bytebase.v1.PreviewRolloutRequest
- 18, // 62: bytebase.v1.RolloutService.ListTaskRuns:input_type -> bytebase.v1.ListTaskRunsRequest
- 20, // 63: bytebase.v1.RolloutService.GetTaskRun:input_type -> bytebase.v1.GetTaskRunRequest
- 21, // 64: bytebase.v1.RolloutService.GetTaskRunLog:input_type -> bytebase.v1.GetTaskRunLogRequest
- 28, // 65: bytebase.v1.RolloutService.GetTaskRunSession:input_type -> bytebase.v1.GetTaskRunSessionRequest
- 7, // 66: bytebase.v1.RolloutService.BatchRunTasks:input_type -> bytebase.v1.BatchRunTasksRequest
- 9, // 67: bytebase.v1.RolloutService.BatchSkipTasks:input_type -> bytebase.v1.BatchSkipTasksRequest
- 11, // 68: bytebase.v1.RolloutService.BatchCancelTaskRuns:input_type -> bytebase.v1.BatchCancelTaskRunsRequest
- 30, // 69: bytebase.v1.RolloutService.PreviewTaskRunRollback:input_type -> bytebase.v1.PreviewTaskRunRollbackRequest
- 22, // 70: bytebase.v1.RolloutService.GetRollout:output_type -> bytebase.v1.Rollout
- 15, // 71: bytebase.v1.RolloutService.ListRollouts:output_type -> bytebase.v1.ListRolloutsResponse
- 22, // 72: bytebase.v1.RolloutService.CreateRollout:output_type -> bytebase.v1.Rollout
- 22, // 73: bytebase.v1.RolloutService.PreviewRollout:output_type -> bytebase.v1.Rollout
- 19, // 74: bytebase.v1.RolloutService.ListTaskRuns:output_type -> bytebase.v1.ListTaskRunsResponse
- 25, // 75: bytebase.v1.RolloutService.GetTaskRun:output_type -> bytebase.v1.TaskRun
- 26, // 76: bytebase.v1.RolloutService.GetTaskRunLog:output_type -> bytebase.v1.TaskRunLog
- 29, // 77: bytebase.v1.RolloutService.GetTaskRunSession:output_type -> bytebase.v1.TaskRunSession
- 8, // 78: bytebase.v1.RolloutService.BatchRunTasks:output_type -> bytebase.v1.BatchRunTasksResponse
- 10, // 79: bytebase.v1.RolloutService.BatchSkipTasks:output_type -> bytebase.v1.BatchSkipTasksResponse
- 12, // 80: bytebase.v1.RolloutService.BatchCancelTaskRuns:output_type -> bytebase.v1.BatchCancelTaskRunsResponse
- 31, // 81: bytebase.v1.RolloutService.PreviewTaskRunRollback:output_type -> bytebase.v1.PreviewTaskRunRollbackResponse
- 70, // [70:82] is the sub-list for method output_type
- 58, // [58:70] is the sub-list for method input_type
- 58, // [58:58] is the sub-list for extension type_name
- 58, // [58:58] is the sub-list for extension extendee
- 0, // [0:58] is the sub-list for field type_name
+ 49, // 30: bytebase.v1.TaskRunLogEntry.retry_info:type_name -> bytebase.v1.TaskRunLogEntry.RetryInfo
+ 51, // 31: bytebase.v1.TaskRunSession.postgres:type_name -> bytebase.v1.TaskRunSession.Postgres
+ 55, // 32: bytebase.v1.Task.DatabaseDataExport.format:type_name -> bytebase.v1.ExportFormat
+ 39, // 33: bytebase.v1.TaskRun.PriorBackupDetail.items:type_name -> bytebase.v1.TaskRun.PriorBackupDetail.Item
+ 54, // 34: bytebase.v1.TaskRun.SchedulerInfo.report_time:type_name -> google.protobuf.Timestamp
+ 41, // 35: bytebase.v1.TaskRun.SchedulerInfo.waiting_cause:type_name -> bytebase.v1.TaskRun.SchedulerInfo.WaitingCause
+ 40, // 36: bytebase.v1.TaskRun.PriorBackupDetail.Item.source_table:type_name -> bytebase.v1.TaskRun.PriorBackupDetail.Item.Table
+ 40, // 37: bytebase.v1.TaskRun.PriorBackupDetail.Item.target_table:type_name -> bytebase.v1.TaskRun.PriorBackupDetail.Item.Table
+ 56, // 38: bytebase.v1.TaskRun.PriorBackupDetail.Item.start_position:type_name -> bytebase.v1.Position
+ 56, // 39: bytebase.v1.TaskRun.PriorBackupDetail.Item.end_position:type_name -> bytebase.v1.Position
+ 42, // 40: bytebase.v1.TaskRun.SchedulerInfo.WaitingCause.task:type_name -> bytebase.v1.TaskRun.SchedulerInfo.WaitingCause.Task
+ 54, // 41: bytebase.v1.TaskRunLogEntry.SchemaDump.start_time:type_name -> google.protobuf.Timestamp
+ 54, // 42: bytebase.v1.TaskRunLogEntry.SchemaDump.end_time:type_name -> google.protobuf.Timestamp
+ 54, // 43: bytebase.v1.TaskRunLogEntry.CommandExecute.log_time:type_name -> google.protobuf.Timestamp
+ 50, // 44: bytebase.v1.TaskRunLogEntry.CommandExecute.response:type_name -> bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse
+ 54, // 45: bytebase.v1.TaskRunLogEntry.DatabaseSync.start_time:type_name -> google.protobuf.Timestamp
+ 54, // 46: bytebase.v1.TaskRunLogEntry.DatabaseSync.end_time:type_name -> google.protobuf.Timestamp
+ 5, // 47: bytebase.v1.TaskRunLogEntry.TaskRunStatusUpdate.status:type_name -> bytebase.v1.TaskRunLogEntry.TaskRunStatusUpdate.Status
+ 6, // 48: bytebase.v1.TaskRunLogEntry.TransactionControl.type:type_name -> bytebase.v1.TaskRunLogEntry.TransactionControl.Type
+ 54, // 49: bytebase.v1.TaskRunLogEntry.PriorBackup.start_time:type_name -> google.protobuf.Timestamp
+ 54, // 50: bytebase.v1.TaskRunLogEntry.PriorBackup.end_time:type_name -> google.protobuf.Timestamp
+ 37, // 51: bytebase.v1.TaskRunLogEntry.PriorBackup.prior_backup_detail:type_name -> bytebase.v1.TaskRun.PriorBackupDetail
+ 54, // 52: bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse.log_time:type_name -> google.protobuf.Timestamp
+ 52, // 53: bytebase.v1.TaskRunSession.Postgres.session:type_name -> bytebase.v1.TaskRunSession.Postgres.Session
+ 52, // 54: bytebase.v1.TaskRunSession.Postgres.blocking_sessions:type_name -> bytebase.v1.TaskRunSession.Postgres.Session
+ 52, // 55: bytebase.v1.TaskRunSession.Postgres.blocked_sessions:type_name -> bytebase.v1.TaskRunSession.Postgres.Session
+ 54, // 56: bytebase.v1.TaskRunSession.Postgres.Session.backend_start:type_name -> google.protobuf.Timestamp
+ 54, // 57: bytebase.v1.TaskRunSession.Postgres.Session.xact_start:type_name -> google.protobuf.Timestamp
+ 54, // 58: bytebase.v1.TaskRunSession.Postgres.Session.query_start:type_name -> google.protobuf.Timestamp
+ 13, // 59: bytebase.v1.RolloutService.GetRollout:input_type -> bytebase.v1.GetRolloutRequest
+ 14, // 60: bytebase.v1.RolloutService.ListRollouts:input_type -> bytebase.v1.ListRolloutsRequest
+ 16, // 61: bytebase.v1.RolloutService.CreateRollout:input_type -> bytebase.v1.CreateRolloutRequest
+ 17, // 62: bytebase.v1.RolloutService.PreviewRollout:input_type -> bytebase.v1.PreviewRolloutRequest
+ 18, // 63: bytebase.v1.RolloutService.ListTaskRuns:input_type -> bytebase.v1.ListTaskRunsRequest
+ 20, // 64: bytebase.v1.RolloutService.GetTaskRun:input_type -> bytebase.v1.GetTaskRunRequest
+ 21, // 65: bytebase.v1.RolloutService.GetTaskRunLog:input_type -> bytebase.v1.GetTaskRunLogRequest
+ 28, // 66: bytebase.v1.RolloutService.GetTaskRunSession:input_type -> bytebase.v1.GetTaskRunSessionRequest
+ 7, // 67: bytebase.v1.RolloutService.BatchRunTasks:input_type -> bytebase.v1.BatchRunTasksRequest
+ 9, // 68: bytebase.v1.RolloutService.BatchSkipTasks:input_type -> bytebase.v1.BatchSkipTasksRequest
+ 11, // 69: bytebase.v1.RolloutService.BatchCancelTaskRuns:input_type -> bytebase.v1.BatchCancelTaskRunsRequest
+ 30, // 70: bytebase.v1.RolloutService.PreviewTaskRunRollback:input_type -> bytebase.v1.PreviewTaskRunRollbackRequest
+ 22, // 71: bytebase.v1.RolloutService.GetRollout:output_type -> bytebase.v1.Rollout
+ 15, // 72: bytebase.v1.RolloutService.ListRollouts:output_type -> bytebase.v1.ListRolloutsResponse
+ 22, // 73: bytebase.v1.RolloutService.CreateRollout:output_type -> bytebase.v1.Rollout
+ 22, // 74: bytebase.v1.RolloutService.PreviewRollout:output_type -> bytebase.v1.Rollout
+ 19, // 75: bytebase.v1.RolloutService.ListTaskRuns:output_type -> bytebase.v1.ListTaskRunsResponse
+ 25, // 76: bytebase.v1.RolloutService.GetTaskRun:output_type -> bytebase.v1.TaskRun
+ 26, // 77: bytebase.v1.RolloutService.GetTaskRunLog:output_type -> bytebase.v1.TaskRunLog
+ 29, // 78: bytebase.v1.RolloutService.GetTaskRunSession:output_type -> bytebase.v1.TaskRunSession
+ 8, // 79: bytebase.v1.RolloutService.BatchRunTasks:output_type -> bytebase.v1.BatchRunTasksResponse
+ 10, // 80: bytebase.v1.RolloutService.BatchSkipTasks:output_type -> bytebase.v1.BatchSkipTasksResponse
+ 12, // 81: bytebase.v1.RolloutService.BatchCancelTaskRuns:output_type -> bytebase.v1.BatchCancelTaskRunsResponse
+ 31, // 82: bytebase.v1.RolloutService.PreviewTaskRunRollback:output_type -> bytebase.v1.PreviewTaskRunRollbackResponse
+ 71, // [71:83] is the sub-list for method output_type
+ 59, // [59:71] is the sub-list for method input_type
+ 59, // [59:59] is the sub-list for extension type_name
+ 59, // [59:59] is the sub-list for extension extendee
+ 0, // [0:59] is the sub-list for field type_name
}
func init() { file_v1_rollout_service_proto_init() }
@@ -3944,14 +4026,14 @@ func file_v1_rollout_service_proto_init() {
(*TaskRun_SchedulerInfo_WaitingCause_ConnectionLimit)(nil),
(*TaskRun_SchedulerInfo_WaitingCause_Task_)(nil),
}
- file_v1_rollout_service_proto_msgTypes[44].OneofWrappers = []any{}
+ file_v1_rollout_service_proto_msgTypes[45].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_rollout_service_proto_rawDesc), len(file_v1_rollout_service_proto_rawDesc)),
NumEnums: 7,
- NumMessages: 45,
+ NumMessages: 46,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/proto/store/project.proto b/proto/store/project.proto
index 9d27f6c907..5e1ba76421 100644
--- a/proto/store/project.proto
+++ b/proto/store/project.proto
@@ -35,4 +35,12 @@ message Project {
// Whether to allow the issue creator to self-approve the issue.
bool allow_self_approval = 10;
+
+ // Execution retry policy for the task run.
+ ExecutionRetryPolicy execution_retry_policy = 11;
+
+ message ExecutionRetryPolicy {
+ // The maximum number of retries for the lock timeout issue.
+ int32 maximum_retries = 1;
+ }
}
diff --git a/proto/store/task_run_log.proto b/proto/store/task_run_log.proto
index 6615e0286f..986e6c2070 100644
--- a/proto/store/task_run_log.proto
+++ b/proto/store/task_run_log.proto
@@ -19,6 +19,7 @@ message TaskRunLog {
TRANSACTION_CONTROL = 8;
PRIOR_BACKUP_START = 9;
PRIOR_BACKUP_END = 10;
+ RETRY_INFO = 11;
}
Type type = 1;
string deploy_id = 12;
@@ -32,6 +33,7 @@ message TaskRunLog {
TransactionControl transaction_control = 9;
PriorBackupStart prior_backup_start = 10;
PriorBackupEnd prior_backup_end = 11;
+ RetryInfo retry_info = 13;
message SchemaDumpStart {}
message SchemaDumpEnd {
@@ -79,4 +81,9 @@ message TaskRunLog {
PriorBackupDetail prior_backup_detail = 1;
string error = 2;
}
+ message RetryInfo {
+ string error = 1;
+ int32 retry_count = 2;
+ int32 maximum_retries = 3;
+ }
}
diff --git a/proto/v1/project_service.proto b/proto/v1/project_service.proto
index 55a47c5937..12baee27cb 100644
--- a/proto/v1/project_service.proto
+++ b/proto/v1/project_service.proto
@@ -331,6 +331,14 @@ message Project {
// Whether to allow the issue creator to self-approve the issue.
bool allow_self_approval = 21;
+
+ // Execution retry policy for the task run.
+ ExecutionRetryPolicy execution_retry_policy = 22;
+
+ message ExecutionRetryPolicy {
+ // The maximum number of retries for the lock timeout issue.
+ int32 maximum_retries = 1;
+ }
}
message AddWebhookRequest {
diff --git a/proto/v1/rollout_service.proto b/proto/v1/rollout_service.proto
index 77fb9ad7e9..f5f2185a08 100644
--- a/proto/v1/rollout_service.proto
+++ b/proto/v1/rollout_service.proto
@@ -558,6 +558,7 @@ message TaskRunLogEntry {
TASK_RUN_STATUS_UPDATE = 4;
TRANSACTION_CONTROL = 5;
PRIOR_BACKUP = 6;
+ RETRY_INFO = 7;
}
Type type = 1;
google.protobuf.Timestamp log_time = 6;
@@ -568,6 +569,7 @@ message TaskRunLogEntry {
TaskRunStatusUpdate task_run_status_update = 5;
TransactionControl transaction_control = 7;
PriorBackup prior_backup = 8;
+ RetryInfo retry_info = 9;
message SchemaDump {
google.protobuf.Timestamp start_time = 1;
@@ -625,6 +627,12 @@ message TaskRunLogEntry {
TaskRun.PriorBackupDetail prior_backup_detail = 3;
string error = 4;
}
+
+ message RetryInfo {
+ string error = 1;
+ int32 retry_count = 2;
+ int32 maximum_retries = 3;
+ }
}
message GetTaskRunSessionRequest {