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
44 changes: 24 additions & 20 deletions docs/upgrading.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,21 @@
# Upgrading Guide

For the upgrading guide to a specific version of workflows change the documentation version in the lower right corner of your browser.

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 v3.7

See also the list of [new features in 3.7](new-features.md).

For upgrades to older versions of Argo Workflows, please change to the documentation for the version of interest.
## Upgrading to v4.0

### Deprecations

The following features are deprecated and will be removed in a future verison of Argo Workflows:
Several features were marked for deprecation in 3.6, and are now removed:

* The Python SDK is deprecated, we recommend migrating to [Hera](https://github.com/argoproj-labs/hera)
* The Python SDK is removed, we recommend migrating to [Hera](https://github.com/argoproj-labs/hera)
* `schedule` in CronWorkflows, `podPriority`, `mutex` and `semaphore` in Workflows and WorkflowTemplates.

For more information on how to migrate these see [deprecations](deprecations.md)

### Removed Docker Hub Image Publishing

Pull Request [#14457](https://github.com/argoproj/argo-workflows/pull/14457) removed pushing to docker hub.
Argo Workflows exclusively uses quay.io now.

### Made Parameter Value Overriding Consistent

Pull Request [#14462](https://github.com/argoproj/argo-workflows/pull/14462) made parameter value overriding consistent.
This fix changes the priority in which the values are processed, meaning that a Workflow argument will now take priority.
For more details see the example provided [here](https://github.com/argoproj/argo-workflows/issues/14426)

## Upgrading to 4.0

### Logging levels

The logging levels available have been reduced to `debug`, `info`, `warn` and `error`.
Expand All @@ -48,3 +33,22 @@ Use the following command to selectively apply the full CRDs for an existing ins
```bash
kubectl apply --server-side --kustomize https://github.com/argoproj/argo-workflows/manifests/base/crds/full?ref=v4.0.0
```

### Go language (Developers)

If you are importing argo-workflows code into your go project you need to be aware of some changes.

Many go-lang functions have changed signature to require a [context](https://pkg.go.dev/context) as the first parameter.
In almost all cases you will need to provide a logger in your context.
The details are in [logging.go](https://github.com/argoproj/argo-workflows/blob/main/util/logging/logging.go)

The kubernetes client does not require a context.
The API client from [apiclient](https://github.com/argoproj/argo-workflows/blob/main/pkg/apiclient/apiclient.go) is an exception and will create a logger for you if you don't provide one.

In particular:

* Your logger must conform to the logging interface `Logger` from that file.
* Your logger should be retrievable from the context key `logger` (util/logging/logging.go `LoggerKey`)
* You may wish to use the logger from [slog.go](https://github.com/argoproj/argo-workflows/blob/main/util/logging/slog.go)

Apiclient no longer provides `NewClient` or `NewClientFromOpts`, you must use `NewClientFromOptsWithContext`.
21 changes: 0 additions & 21 deletions pkg/apiclient/apiclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,27 +48,6 @@ func (o Opts) String() string {
return fmt.Sprintf("(argoServerOpts=%v,instanceID=%v)", o.ArgoServerOpts, o.InstanceID)
}

// DEPRECATED: use NewClientFromOptsWithContext
func NewClient(argoServer string, authSupplier func() string, clientConfig clientcmd.ClientConfig) (context.Context, Client, error) {
return NewClientFromOptsWithContext(context.Background(), Opts{
ArgoServerOpts: ArgoServerOpts{URL: argoServer},
AuthSupplier: authSupplier,
ClientConfigSupplier: func() clientcmd.ClientConfig {
return clientConfig
},
})
}

// DEPRECATED: use NewClientFromOptsWithContext
func NewClientFromOpts(opts Opts) (context.Context, Client, error) {
ctx := opts.Context
if ctx == nil {
ctx = context.Background()
}

return NewClientFromOptsWithContext(ctx, opts)
}

func NewClientFromOptsWithContext(ctx context.Context, opts Opts) (context.Context, Client, error) {
log := logging.GetLoggerFromContextOrNil(ctx)
if log == nil {
Expand Down
Loading