Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ This document outlines environment variables that can be used to customize behav
| `EXPRESSION_TEMPLATES` | `bool` | `true` | Escape hatch to disable expression templates. |
| `EVENT_AGGREGATION_WITH_ANNOTATIONS` | `bool` | `false` | Whether event annotations will be used when aggregating events. |
| `GZIP_IMPLEMENTATION` | `string` | `PGZip` | The implementation of compression/decompression. Currently only "`PGZip`" and "`GZip`" are supported. |
| `INFORMER_WRITE_BACK` | `bool` | `false` | Whether to write back to informer instead of catching up. |
| `HEALTHZ_AGE` | `time.Duration` | `5m` | How old a un-reconciled workflow is to report unhealthy. |
| `INDEX_WORKFLOW_SEMAPHORE_KEYS` | `bool` | `true` | Whether or not to index semaphores. |
| `LEADER_ELECTION_IDENTITY` | `string` | Controller's `metadata.name` | The ID used for workflow controllers to elect a leader. |
Expand Down
9 changes: 9 additions & 0 deletions docs/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ For the upgrading guide to a specific version of workflows change the documentat
Breaking changes typically (sometimes we don't realise they are breaking) have "!" in the commit message, as per
the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#summary).

## Upgrading to v4.1

### INFORMER_WRITE_BACK environment variable removed

The `INFORMER_WRITE_BACK` environment variable has been removed.
This variable controlled whether to write workflow updates back to the informer cache (`true`) or sleep for 1 second (`false`, the default) after persisting updates.
Alternative mechanisms now prevent reprocessing, making both behaviors unnecessary.
If you have this variable set, it can be safely removed from your configuration.

## Upgrading to v4.0

### Deprecations
Expand Down
25 changes: 0 additions & 25 deletions workflow/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -816,19 +816,6 @@ func (woc *wfOperationCtx) persistUpdates(ctx context.Context) {

woc.log.WithFields(logging.Fields{"resourceVersion": woc.wf.ResourceVersion, "phase": woc.wf.Status.Phase}).Info(ctx, "Workflow update successful")

switch os.Getenv("INFORMER_WRITE_BACK") {
// this does not reduce errors, but does reduce
// conflicts and therefore we log fewer warning messages.
case "true":
if err := woc.writeBackToInformer(); err != nil {
_ = woc.markWorkflowError(ctx, err)
return
}
// no longer write back to informer cache as default (as per v4.0)
case "", "false":
time.Sleep(1 * time.Second)
}

// Make sure the workflow completed.
if woc.wf.Status.Fulfilled() {
woc.controller.metrics.CompleteRealtimeMetricsForWfUID(string(woc.wf.GetUID()))
Expand Down Expand Up @@ -868,18 +855,6 @@ func (woc *wfOperationCtx) deleteTaskResults(ctx context.Context) error {
)
}

func (woc *wfOperationCtx) writeBackToInformer() error {
un, err := wfutil.ToUnstructured(woc.wf)
if err != nil {
return fmt.Errorf("failed to convert workflow to unstructured: %w", err)
}
err = woc.controller.wfInformer.GetStore().Update(un)
if err != nil {
return fmt.Errorf("failed to update informer store: %w", err)
}
return nil
}

// persistWorkflowSizeLimitErr will fail a the workflow with an error when we hit the resource size limit
// See https://github.com/argoproj/argo-workflows/issues/913
func (woc *wfOperationCtx) persistWorkflowSizeLimitErr(ctx context.Context, wfClient v1alpha1.WorkflowInterface, err error) {
Expand Down
Loading