Skip to content

Commit 801b82a

Browse files
authored
feat(deprecation): remove 3.6 deprecated features for 4.0 (#14189)
Signed-off-by: Alan Clucas <[email protected]>
1 parent a2924e6 commit 801b82a

File tree

61 files changed

+801
-3015
lines changed

Some content is hidden

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

61 files changed

+801
-3015
lines changed

.features/pending/deprecate-36.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Description: Deprecate singular in favour of plural items
2+
Authors: [Alan Clucas](https://github.com/Joibel)
3+
Component: General
4+
Issues: 14977
5+
6+
Deprecation: remove singluar `mutex`, `semaphore` and `schedule` from the specs, all were replaced by the plural version in 3.6

api/jsonschema/schema.json

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/openapi-spec/swagger.json

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/argo/commands/cron/backfill.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func backfillCronWorkflow(ctx context.Context, cronWFName string, cliOps backfil
104104
if err != nil {
105105
return err
106106
}
107-
cronTab, err := cron.ParseStandard(cronWF.Spec.Schedule)
107+
cronTab, err := cron.ParseStandard(cronWF.Spec.GetScheduleString())
108108
if err != nil {
109109
return err
110110
}
@@ -121,7 +121,7 @@ func backfillCronWorkflow(ctx context.Context, cronWFName string, cliOps backfil
121121
if !cliOps.parallel {
122122
wf.Spec.Priority = &priority
123123
wf.Spec.Synchronization = &v1alpha1.Synchronization{
124-
Mutex: &v1alpha1.Mutex{Name: cliOps.name},
124+
Mutexes: []*v1alpha1.Mutex{{Name: cliOps.name}},
125125
}
126126
}
127127
wf.Spec.Arguments.Parameters = append(wf.Spec.Arguments.Parameters, param)

cmd/argo/commands/cron/create.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ func CreateCronWorkflows(ctx context.Context, filePaths []string, cliOpts *cliCr
6161

6262
for _, cronWf := range cronWorkflows {
6363
if cliOpts.schedule != "" {
64-
cronWf.Spec.Schedule = cliOpts.schedule
64+
// This option replaces the schedule
65+
cronWf.Spec.Schedules = []string{cliOpts.schedule}
6566
}
6667

6768
newWf := wfv1.Workflow{Spec: cronWf.Spec.WorkflowSpec}

cmd/argo/commands/cron/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
func GetNextRuntime(ctx context.Context, cwf *v1alpha1.CronWorkflow) (time.Time, error) {
2424
var nextRunTime time.Time
2525
now := time.Now().UTC()
26-
for _, schedule := range cwf.Spec.GetSchedulesWithTimezone(ctx) {
26+
for _, schedule := range cwf.Spec.GetSchedulesWithTimezone() {
2727
cronSchedule, err := cron.ParseStandard(schedule)
2828
if err != nil {
2929
return time.Time{}, err

docs/cron-workflows.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ You can use `CronWorkflow.spec.workflowMetadata` to add `labels` and `annotation
4444

4545
| Option Name | Default Value | Description |
4646
|:----------------------------:|:----------------------:|-------------|
47-
| `schedule` | None | [Cron schedule](#cron-schedule-syntax) to run `Workflows`. Example: `5 4 * * *`. Deprecated, use `schedules`. |
48-
| `schedules` | None | v3.6 and after: List of [Cron schedules](#cron-schedule-syntax) to run `Workflows`. Example: `5 4 * * *`, `0 1 * * *`. Either `schedule` or `schedules` must be provided. |
47+
| `schedules` | None | v3.6 and after: List of [Cron schedules](#cron-schedule-syntax) to run `Workflows`. Example: `5 4 * * *`, `0 1 * * *`. Required to be a non-empty list. |
4948
| `timezone` | Machine timezone | [IANA Timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) to run `Workflows`. Example: `America/Los_Angeles` |
5049
| `suspend` | `false` | If `true` Workflow scheduling will not occur. Can be set from the CLI, GitOps, or directly |
5150
| `concurrencyPolicy` | `Allow` | What to do if multiple `Workflows` are scheduled at the same time. `Allow`: allow all, `Replace`: remove all old before scheduling new, `Forbid`: do not allow any new while there are old |

docs/executor_swagger.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3805,9 +3805,7 @@ of the first container processes are calculated.
38053805

38063806
| Name | Type | Go type | Required | Default | Description | Example |
38073807
|------|------|---------|:--------:| ------- |-------------|---------|
3808-
| mutex | [Mutex](#mutex)| `Mutex` | | | | |
38093808
| mutexes | [][Mutex](#mutex)| `[]*Mutex` | | | v3.6 and after: Mutexes holds the list of Mutex lock details | |
3810-
| semaphore | [SemaphoreRef](#semaphore-ref)| `SemaphoreRef` | | | | |
38113809
| semaphores | [][SemaphoreRef](#semaphore-ref)| `[]*SemaphoreRef` | | | v3.6 and after: Semaphores holds the list of Semaphores configuration | |
38123810

38133811

0 commit comments

Comments
 (0)