Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.5.14-atlan-1.1.4 #18

Open
wants to merge 20 commits into
base: release-3.5.14
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
e26e37e
fix: RetryPolicyOnTransientError also retries on error
tczhao Jun 3, 2024
e60add5
feat: enable template params in wf podspecpatch
tczhao Jun 3, 2024
359f9e1
fix: test
tczhao Jun 4, 2024
5ec52bd
feat: enable various lastRetry parameters in podspecpatch
tczhao Jun 18, 2024
c2d012d
fix: retry parameter issue in evicted pending node
tczhao Jun 19, 2024
63ac4d2
fix: set template metadata from workflow template PodMetadata. Fixes:…
tczhao Jun 27, 2024
3617ff6
refactor: invert conditionals for less nesting in `includeScriptOutpu…
agilgur5 Dec 6, 2023
4198395
feat: support dag and steps level scheduling constraints. Fixes: #125…
shuangkun Mar 15, 2024
57f6479
feat: load git from s3 first
tczhao Oct 11, 2024
129a80f
feat: support dynamic templateref naming. Fixes: #10542 (#12842)
shuangkun Apr 12, 2024
757b9a7
fix: make etcd errors transient (#12567)
Joibel Jan 24, 2024
7af4017
feat: add WORKFLOW_VALIDATION_PATTERN
tczhao Nov 24, 2024
c8dcdbc
fix: pause before leading
tczhao Nov 26, 2024
3614777
feat: soft affinity for retry
tczhao Nov 28, 2024
7dfbc29
feat: label actor action when making change to workflow/template. Fix…
tczhao Jan 23, 2025
fdd308a
Revert "fix: cronOperator/serverResubmitWf retry create workflow on t…
tczhao Jan 24, 2025
7bbefe3
fix: creator email label #14122
tczhao Jan 24, 2025
50660e5
feat: version 3.5.14-atlan-1.1.4
tczhao Feb 17, 2025
325c0cd
Revert "fix: validate template of the same name. Fixes #13763 (#14043)"
tczhao Feb 18, 2025
f933c14
Revert "fix(controller): validation failed when dynamic templateRef i…
tczhao Feb 19, 2025
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: 1 addition & 0 deletions cmd/workflow-controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ func NewRootCommand() *cobra.Command {
Callbacks: leaderelection.LeaderCallbacks{
OnStartedLeading: func(ctx context.Context) {
dummyCancel()
time.Sleep(time.Second)
go wfController.Run(ctx, workflowWorkers, workflowTTLWorkers, podCleanupWorkers, cronWorkflowWorkers)
go wfController.RunMetricsServer(ctx, false)
},
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/workflow/v1alpha1/cluster_workflow_template_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ func (cwftmpl *ClusterWorkflowTemplate) GetResourceScope() ResourceScope {
return ResourceScopeCluster
}

// GetPodMetadata returns the PodMetadata of cluster workflow template.
func (cwftmpl *ClusterWorkflowTemplate) GetPodMetadata() *Metadata {
return cwftmpl.Spec.PodMetadata
}

// GetWorkflowSpec returns the WorkflowSpec of cluster workflow template.
func (cwftmpl *ClusterWorkflowTemplate) GetWorkflowSpec() *WorkflowSpec {
return &cwftmpl.Spec
Expand Down
1 change: 1 addition & 0 deletions pkg/apis/workflow/v1alpha1/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type TemplateHolder interface {
GroupVersionKind() schema.GroupVersionKind
GetTemplateByName(name string) *Template
GetResourceScope() ResourceScope
GetPodMetadata() *Metadata
}

// WorkflowSpecHolder is an object that holds a WorkflowSpec; e.g., WorkflowTemplate, and ClusterWorkflowTemplate
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/workflow/v1alpha1/workflow_template_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ func (wftmpl *WorkflowTemplate) GetResourceScope() ResourceScope {
return ResourceScopeNamespaced
}

// GetPodMetadata returns the PodMetadata of workflow template.
func (wftmpl *WorkflowTemplate) GetPodMetadata() *Metadata {
return wftmpl.Spec.PodMetadata
}

// GetWorkflowSpec returns the WorkflowSpec of workflow template.
func (wftmpl *WorkflowTemplate) GetWorkflowSpec() *WorkflowSpec {
return &wftmpl.Spec
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/workflow/v1alpha1/workflow_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -3409,6 +3409,11 @@ func (wf *Workflow) GetResourceScope() ResourceScope {
return ResourceScopeLocal
}

// GetPodMetadata returns the PodMetadata of a workflow.
func (wf *Workflow) GetPodMetadata() *Metadata {
return wf.Spec.PodMetadata
}

// GetWorkflowSpec returns the Spec of a workflow.
func (wf *Workflow) GetWorkflowSpec() WorkflowSpec {
return wf.Spec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (cwts *ClusterWorkflowTemplateServer) CreateClusterWorkflowTemplate(ctx con
return nil, serverutils.ToStatusError(fmt.Errorf("cluster workflow template was not found in the request body"), codes.InvalidArgument)
}
cwts.instanceIDService.Label(req.Template)
creator.Label(ctx, req.Template)
creator.LabelCreator(ctx, req.Template)
cwftmplGetter := templateresolution.WrapClusterWorkflowTemplateInterface(wfClient.ArgoprojV1alpha1().ClusterWorkflowTemplates())
err := validate.ValidateClusterWorkflowTemplate(nil, cwftmplGetter, req.Template, validate.ValidateOpts{})
if err != nil {
Expand Down Expand Up @@ -100,7 +100,7 @@ func (cwts *ClusterWorkflowTemplateServer) DeleteClusterWorkflowTemplate(ctx con

func (cwts *ClusterWorkflowTemplateServer) LintClusterWorkflowTemplate(ctx context.Context, req *clusterwftmplpkg.ClusterWorkflowTemplateLintRequest) (*v1alpha1.ClusterWorkflowTemplate, error) {
cwts.instanceIDService.Label(req.Template)
creator.Label(ctx, req.Template)
creator.LabelCreator(ctx, req.Template)
wfClient := auth.GetWfClient(ctx)
cwftmplGetter := templateresolution.WrapClusterWorkflowTemplateInterface(wfClient.ArgoprojV1alpha1().ClusterWorkflowTemplates())

Expand All @@ -116,6 +116,7 @@ func (cwts *ClusterWorkflowTemplateServer) UpdateClusterWorkflowTemplate(ctx con
if req.Template == nil {
return nil, serverutils.ToStatusError(fmt.Errorf("ClusterWorkflowTemplate is not found in Request body"), codes.InvalidArgument)
}
creator.LabelActor(ctx, req.Template, creator.ActionUpdate)
err := cwts.instanceIDService.Validate(req.Template)
if err != nil {
return nil, serverutils.ToStatusError(err, codes.InvalidArgument)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/go-jose/go-jose/v3/jwt"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"k8s.io/client-go/kubernetes/fake"

clusterwftmplpkg "github.com/argoproj/argo-workflows/v3/pkg/apiclient/clusterworkflowtemplate"
Expand All @@ -15,6 +16,7 @@ import (
"github.com/argoproj/argo-workflows/v3/server/auth/types"
"github.com/argoproj/argo-workflows/v3/util/instanceid"
"github.com/argoproj/argo-workflows/v3/workflow/common"
"github.com/argoproj/argo-workflows/v3/workflow/creator"
)

var unlabelled, cwftObj2, cwftObj3 v1alpha1.ClusterWorkflowTemplate
Expand Down Expand Up @@ -267,9 +269,10 @@ func TestWorkflowTemplateServer_UpdateClusterWorkflowTemplate(t *testing.T) {
}
req.Template.Spec.Templates[0].Container.Image = "alpine:latest"
cwftRsp, err := server.UpdateClusterWorkflowTemplate(ctx, req)
if assert.NoError(t, err) {
assert.Equal(t, "alpine:latest", cwftRsp.Spec.Templates[0].Container.Image)
}
require.NoError(t, err)
assert.Contains(t, cwftRsp.Labels, common.LabelKeyActor)
assert.Equal(t, string(creator.ActionUpdate), cwftRsp.Labels[common.LabelKeyAction])
assert.Equal(t, "alpine:latest", cwftRsp.Spec.Templates[0].Container.Image)
})
t.Run("Unlabelled", func(t *testing.T) {
_, err := server.UpdateClusterWorkflowTemplate(ctx, &clusterwftmplpkg.ClusterWorkflowTemplateUpdateRequest{
Expand Down
5 changes: 3 additions & 2 deletions server/cronworkflow/cron_workflow_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (c *cronWorkflowServiceServer) LintCronWorkflow(ctx context.Context, req *c
wftmplGetter := templateresolution.WrapWorkflowTemplateInterface(wfClient.ArgoprojV1alpha1().WorkflowTemplates(req.Namespace))
cwftmplGetter := templateresolution.WrapClusterWorkflowTemplateInterface(wfClient.ArgoprojV1alpha1().ClusterWorkflowTemplates())
c.instanceIDService.Label(req.CronWorkflow)
creator.Label(ctx, req.CronWorkflow)
creator.LabelCreator(ctx, req.CronWorkflow)
err := validate.ValidateCronWorkflow(wftmplGetter, cwftmplGetter, req.CronWorkflow)
if err != nil {
return nil, sutils.ToStatusError(err, codes.InvalidArgument)
Expand All @@ -61,7 +61,7 @@ func (c *cronWorkflowServiceServer) CreateCronWorkflow(ctx context.Context, req
return nil, sutils.ToStatusError(fmt.Errorf("cron workflow was not found in the request body"), codes.NotFound)
}
c.instanceIDService.Label(req.CronWorkflow)
creator.Label(ctx, req.CronWorkflow)
creator.LabelCreator(ctx, req.CronWorkflow)
wftmplGetter := templateresolution.WrapWorkflowTemplateInterface(wfClient.ArgoprojV1alpha1().WorkflowTemplates(req.Namespace))
cwftmplGetter := templateresolution.WrapClusterWorkflowTemplateInterface(wfClient.ArgoprojV1alpha1().ClusterWorkflowTemplates())
err := validate.ValidateCronWorkflow(wftmplGetter, cwftmplGetter, req.CronWorkflow)
Expand Down Expand Up @@ -89,6 +89,7 @@ func (c *cronWorkflowServiceServer) UpdateCronWorkflow(ctx context.Context, req
if err != nil {
return nil, sutils.ToStatusError(err, codes.Internal)
}
creator.LabelActor(ctx, req.CronWorkflow, creator.ActionUpdate)
wftmplGetter := templateresolution.WrapWorkflowTemplateInterface(wfClient.ArgoprojV1alpha1().WorkflowTemplates(req.Namespace))
cwftmplGetter := templateresolution.WrapClusterWorkflowTemplateInterface(wfClient.ArgoprojV1alpha1().ClusterWorkflowTemplates())
if err := validate.ValidateCronWorkflow(wftmplGetter, cwftmplGetter, req.CronWorkflow); err != nil {
Expand Down
9 changes: 6 additions & 3 deletions server/cronworkflow/cron_workflow_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/go-jose/go-jose/v3/jwt"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

cronworkflowpkg "github.com/argoproj/argo-workflows/v3/pkg/apiclient/cronworkflow"
wfv1 "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1"
Expand All @@ -14,6 +15,7 @@ import (
"github.com/argoproj/argo-workflows/v3/server/auth/types"
"github.com/argoproj/argo-workflows/v3/util/instanceid"
"github.com/argoproj/argo-workflows/v3/workflow/common"
"github.com/argoproj/argo-workflows/v3/workflow/creator"
)

func Test_cronWorkflowServiceServer(t *testing.T) {
Expand Down Expand Up @@ -103,9 +105,10 @@ metadata:
})
t.Run("Labelled", func(t *testing.T) {
cronWf, err := server.UpdateCronWorkflow(ctx, &cronworkflowpkg.UpdateCronWorkflowRequest{Namespace: "my-ns", CronWorkflow: &cronWf})
if assert.NoError(t, err) {
assert.NotNil(t, cronWf)
}
assert.Contains(t, cronWf.Labels, common.LabelKeyActor)
assert.Equal(t, string(creator.ActionUpdate), cronWf.Labels[common.LabelKeyAction])
require.NoError(t, err)
assert.NotNil(t, cronWf)
})
t.Run("Unlabelled", func(t *testing.T) {
_, err := server.UpdateCronWorkflow(ctx, &cronworkflowpkg.UpdateCronWorkflowRequest{Namespace: "my-ns", CronWorkflow: &unlabelled})
Expand Down
2 changes: 1 addition & 1 deletion server/event/dispatch/operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (o *Operation) dispatch(ctx context.Context, wfeb wfv1.WorkflowEventBinding

// users will always want to know why a workflow was submitted,
// so we label with creator (which is a standard) and the name of the triggering event
creator.Label(o.ctx, wf)
creator.LabelCreator(o.ctx, wf)
labels.Label(wf, common.LabelKeyWorkflowEventBinding, wfeb.Name)
if submit.Arguments != nil {
for _, p := range submit.Arguments.Parameters {
Expand Down
6 changes: 3 additions & 3 deletions server/workflow/workflow_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (s *workflowServer) CreateWorkflow(ctx context.Context, req *workflowpkg.Wo
}

s.instanceIDService.Label(req.Workflow)
creator.Label(ctx, req.Workflow)
creator.LabelCreator(ctx, req.Workflow)

wftmplGetter := templateresolution.WrapWorkflowTemplateInterface(wfClient.ArgoprojV1alpha1().WorkflowTemplates(req.Namespace))
cwftmplGetter := templateresolution.WrapClusterWorkflowTemplateInterface(wfClient.ArgoprojV1alpha1().ClusterWorkflowTemplates())
Expand Down Expand Up @@ -640,7 +640,7 @@ func (s *workflowServer) LintWorkflow(ctx context.Context, req *workflowpkg.Work
wftmplGetter := templateresolution.WrapWorkflowTemplateInterface(wfClient.ArgoprojV1alpha1().WorkflowTemplates(req.Namespace))
cwftmplGetter := templateresolution.WrapClusterWorkflowTemplateInterface(wfClient.ArgoprojV1alpha1().ClusterWorkflowTemplates())
s.instanceIDService.Label(req.Workflow)
creator.Label(ctx, req.Workflow)
creator.LabelCreator(ctx, req.Workflow)

err := validate.ValidateWorkflow(wftmplGetter, cwftmplGetter, req.Workflow, validate.ValidateOpts{Lint: true})
if err != nil {
Expand Down Expand Up @@ -756,7 +756,7 @@ func (s *workflowServer) SubmitWorkflow(ctx context.Context, req *workflowpkg.Wo
}

s.instanceIDService.Label(wf)
creator.Label(ctx, wf)
creator.LabelCreator(ctx, wf)
err := util.ApplySubmitOpts(wf, req.SubmitOptions)
if err != nil {
return nil, sutils.ToStatusError(err, codes.Internal)
Expand Down
31 changes: 18 additions & 13 deletions server/workflow/workflow_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/go-jose/go-jose/v3/jwt"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
authorizationv1 "k8s.io/api/authorization/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand All @@ -31,6 +32,7 @@ import (
"github.com/argoproj/argo-workflows/v3/util"
"github.com/argoproj/argo-workflows/v3/util/instanceid"
"github.com/argoproj/argo-workflows/v3/workflow/common"
"github.com/argoproj/argo-workflows/v3/workflow/creator"
)

const unlabelled = `{
Expand Down Expand Up @@ -813,15 +815,17 @@ func TestRetryWorkflow(t *testing.T) {
func TestSuspendResumeWorkflow(t *testing.T) {
server, ctx := getWorkflowServer()
wf, err := server.SuspendWorkflow(ctx, &workflowpkg.WorkflowSuspendRequest{Name: "hello-world-9tql2-run", Namespace: "workflows"})
if assert.NoError(t, err) {
assert.NotNil(t, wf)
assert.Equal(t, true, *wf.Spec.Suspend)
wf, err = server.ResumeWorkflow(ctx, &workflowpkg.WorkflowResumeRequest{Name: wf.Name, Namespace: wf.Namespace})
if assert.NoError(t, err) {
assert.NotNil(t, wf)
assert.Nil(t, wf.Spec.Suspend)
}
}
require.NoError(t, err)
assert.NotNil(t, wf)
assert.True(t, *wf.Spec.Suspend)
assert.Contains(t, wf.Labels, common.LabelKeyActor)
assert.Equal(t, string(creator.ActionSuspend), wf.Labels[common.LabelKeyAction])
wf, err = server.ResumeWorkflow(ctx, &workflowpkg.WorkflowResumeRequest{Name: wf.Name, Namespace: wf.Namespace})
require.NoError(t, err)
assert.NotNil(t, wf)
assert.Contains(t, wf.Labels, common.LabelKeyActor)
assert.Equal(t, string(creator.ActionResume), wf.Labels[common.LabelKeyAction])
assert.Nil(t, wf.Spec.Suspend)
}

func TestSuspendResumeWorkflowWithNotFound(t *testing.T) {
Expand Down Expand Up @@ -872,10 +876,11 @@ func TestStopWorkflow(t *testing.T) {
assert.NoError(t, err)
rsmWfReq := workflowpkg.WorkflowStopRequest{Name: wf.Name, Namespace: wf.Namespace}
wf, err = server.StopWorkflow(ctx, &rsmWfReq)
if assert.NoError(t, err) {
assert.NotNil(t, wf)
assert.Equal(t, v1alpha1.WorkflowRunning, wf.Status.Phase)
}
require.NoError(t, err)
assert.NotNil(t, wf)
assert.Equal(t, v1alpha1.WorkflowRunning, wf.Status.Phase)
assert.Contains(t, wf.Labels, common.LabelKeyActor)
assert.Equal(t, string(creator.ActionStop), wf.Labels[common.LabelKeyAction])
}

func TestResubmitWorkflow(t *testing.T) {
Expand Down
5 changes: 3 additions & 2 deletions server/workflowtemplate/workflow_template_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (wts *WorkflowTemplateServer) CreateWorkflowTemplate(ctx context.Context, r
return nil, sutils.ToStatusError(fmt.Errorf("workflow template was not found in the request body"), codes.InvalidArgument)
}
wts.instanceIDService.Label(req.Template)
creator.Label(ctx, req.Template)
creator.LabelCreator(ctx, req.Template)
wftmplGetter := templateresolution.WrapWorkflowTemplateInterface(wfClient.ArgoprojV1alpha1().WorkflowTemplates(req.Namespace))
cwftmplGetter := templateresolution.WrapClusterWorkflowTemplateInterface(wfClient.ArgoprojV1alpha1().ClusterWorkflowTemplates())
err := validate.ValidateWorkflowTemplate(wftmplGetter, cwftmplGetter, req.Template, validate.ValidateOpts{})
Expand Down Expand Up @@ -170,7 +170,7 @@ func (wts *WorkflowTemplateServer) DeleteWorkflowTemplate(ctx context.Context, r
func (wts *WorkflowTemplateServer) LintWorkflowTemplate(ctx context.Context, req *workflowtemplatepkg.WorkflowTemplateLintRequest) (*v1alpha1.WorkflowTemplate, error) {
wfClient := auth.GetWfClient(ctx)
wts.instanceIDService.Label(req.Template)
creator.Label(ctx, req.Template)
creator.LabelCreator(ctx, req.Template)
wftmplGetter := templateresolution.WrapWorkflowTemplateInterface(wfClient.ArgoprojV1alpha1().WorkflowTemplates(req.Namespace))
cwftmplGetter := templateresolution.WrapClusterWorkflowTemplateInterface(wfClient.ArgoprojV1alpha1().ClusterWorkflowTemplates())
err := validate.ValidateWorkflowTemplate(wftmplGetter, cwftmplGetter, req.Template, validate.ValidateOpts{Lint: true})
Expand All @@ -188,6 +188,7 @@ func (wts *WorkflowTemplateServer) UpdateWorkflowTemplate(ctx context.Context, r
if err != nil {
return nil, sutils.ToStatusError(err, codes.InvalidArgument)
}
creator.LabelActor(ctx, req.Template, creator.ActionUpdate)
wfClient := auth.GetWfClient(ctx)
wftmplGetter := templateresolution.WrapWorkflowTemplateInterface(wfClient.ArgoprojV1alpha1().WorkflowTemplates(req.Namespace))
cwftmplGetter := templateresolution.WrapClusterWorkflowTemplateInterface(wfClient.ArgoprojV1alpha1().ClusterWorkflowTemplates())
Expand Down
9 changes: 6 additions & 3 deletions server/workflowtemplate/workflow_template_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/go-jose/go-jose/v3/jwt"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes/fake"

Expand All @@ -16,6 +17,7 @@ import (
"github.com/argoproj/argo-workflows/v3/server/auth/types"
"github.com/argoproj/argo-workflows/v3/util/instanceid"
"github.com/argoproj/argo-workflows/v3/workflow/common"
"github.com/argoproj/argo-workflows/v3/workflow/creator"
)

const unlabelled = `{
Expand Down Expand Up @@ -268,9 +270,10 @@ func TestWorkflowTemplateServer_UpdateWorkflowTemplate(t *testing.T) {
Namespace: "default",
Template: &wftObj1,
})
if assert.NoError(t, err) {
assert.Equal(t, "alpine:latest", wftRsp.Spec.Templates[0].Container.Image)
}
require.NoError(t, err)
assert.Contains(t, wftRsp.Labels, common.LabelKeyActor)
assert.Equal(t, string(creator.ActionUpdate), wftRsp.Labels[common.LabelKeyAction])
assert.Equal(t, "alpine:latest", wftRsp.Spec.Templates[0].Container.Image)
})
t.Run("Unlabelled", func(t *testing.T) {
_, err := server.UpdateWorkflowTemplate(ctx, &workflowtemplatepkg.WorkflowTemplateUpdateRequest{
Expand Down
11 changes: 8 additions & 3 deletions util/errors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func isTransientErr(err error) bool {
return false
}
err = argoerrs.Cause(err)
return isExceededQuotaErr(err) ||
isTransient := isExceededQuotaErr(err) ||
apierr.IsTooManyRequests(err) ||
isResourceQuotaConflictErr(err) ||
isResourceQuotaTimeoutErr(err) ||
Expand All @@ -56,8 +56,13 @@ func isTransientErr(err error) bool {
apierr.IsServiceUnavailable(err) ||
isTransientEtcdErr(err) ||
matchTransientErrPattern(err) ||
errors.Is(err, NewErrTransient("")) ||
isTransientSqbErr(err)
errors.Is(err, NewErrTransient(""))
if isTransient {
log.Infof("Transient error: %v", err)
} else {
log.Warnf("Non-transient error: %v", err)
}
return isTransient
}

func matchTransientErrPattern(err error) bool {
Expand Down
1 change: 1 addition & 0 deletions version.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func GetVersion() wfv1.Version {
versionStr += "+unknown"
}
}
versionStr = "v3.5.14-atlan-1.1.4"
return wfv1.Version{
Version: versionStr,
BuildDate: buildDate,
Expand Down
3 changes: 3 additions & 0 deletions workflow/artifacts/azure/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,19 @@ func (azblobDriver *ArtifactDriver) Load(artifact *wfv1.Artifact, path string) e
}
isEmptyFile = true
} else if !bloberror.HasCode(origErr, bloberror.BlobNotFound) {
_ = os.Remove(path)
return fmt.Errorf("unable to download blob %s: %s", artifact.Azure.Blob, origErr)
}

isDir, err := azblobDriver.IsDirectory(artifact)
if err != nil {
_ = os.Remove(path)
return fmt.Errorf("unable to determine if %s is a directory: %s", artifact.Azure.Blob, err)
}

// It's not a directory and the file doesn't exist, Return the original NoSuchKey error.
if !isDir && !isEmptyFile {
_ = os.Remove(path)
return argoerrors.New(argoerrors.CodeNotFound, origErr.Error())
}

Expand Down
5 changes: 5 additions & 0 deletions workflow/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ const (
LabelKeyCreator = workflow.WorkflowFullName + "/creator"
LabelKeyCreatorEmail = workflow.WorkflowFullName + "/creator-email"
LabelKeyCreatorPreferredUsername = workflow.WorkflowFullName + "/creator-preferred-username"
// Who action on this workflow.
LabelKeyActor = workflow.WorkflowFullName + "/actor"
LabelKeyActorEmail = workflow.WorkflowFullName + "/actor-email"
LabelKeyActorPreferredUsername = workflow.WorkflowFullName + "/actor-preferred-username"
LabelKeyAction = workflow.WorkflowFullName + "/action"
// LabelKeyCompleted is the metadata label applied on workflows and workflow pods to indicates if resource is completed
// Workflows and pods with a completed=true label will be ignored by the controller.
// See also `LabelKeyWorkflowArchivingStatus`.
Expand Down
2 changes: 1 addition & 1 deletion workflow/controller/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ func (woc *wfOperationCtx) createAgentPod(ctx context.Context) (*apiv1.Pod, erro
}

tmpl := &wfv1.Template{}
addSchedulingConstraints(pod, woc.execWf.Spec.DeepCopy(), tmpl)
woc.addSchedulingConstraints(pod, woc.execWf.Spec.DeepCopy(), tmpl, "")
woc.addMetadata(pod, tmpl)
woc.addDNSConfig(pod)

Expand Down
Loading
Loading