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

Render all output artifacts #352

Merged
merged 1 commit into from
Oct 11, 2019
Merged

Render all output artifacts #352

merged 1 commit into from
Oct 11, 2019

Conversation

DeepikaDixit
Copy link
Contributor

Change Overview

actionSet fails if all output artifacts are not specified

Pull request type

Please check the type of change your PR introduces:

  • Work in Progress
  • Refactoring (no functional changes, no api changes)
  • Trivial/Minor
  • Bugfix
  • Feature
  • Documentation

Test Plan

  • Manual
  • Unit test
  • E2E

@@ -92,13 +92,21 @@ func describeBackupsPodFunc(cli kubernetes.Interface, tp param.TemplateParams, n
break
case strings.Contains(err.Error(), restic.PasswordIncorrect):
return map[string]interface{}{
DescribeBackupsSnapshotIDs: nil,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we updated the unit test in data_test.go to catch this issue please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In data_test we only runAction, so this was not caught.
When I ran this action against a cluster, it failed like this:

time="2019-10-11T03:38:26Z" level=info msg="Completed phase describeBackupsForRepo"
time="2019-10-11T03:38:26Z" level=error msg="Failed to render output artifacts template: config:1:10: executing \"config\" at <.Phases.describeBackupsForRepo.Output.fileCount>: map has no entry for key \"fileCount\"\nvendor/github.com/kanisterio/kanister/pkg/param.renderStringArg\n\t/root/src/github.com/kastenhq/k10/go/src/vendor/github.com/kanisterio/kanister/pkg/param/render.go:115\nvendor/github.com/kanisterio/kanister/pkg/param.RenderArtifacts\n\t/root/src/github.com/kastenhq/k10/go/src/vendor/github.com/kanisterio/kanister/pkg/param/render.go:94\nvendor/github.com/kanisterio/kanister/pkg/controller.(*Controller).runAction.func1\n\t/root/src/github.com/kastenhq/k10/go/src/vendor/github.com/kanisterio/kanister/pkg/controller/controller.go:447\nvendor/gopkg.in/tomb%2ev2.(*Tomb).run\n\t/root/src/github.com/kastenhq/k10/go/src/vendor/gopkg.in/tomb.v2/tomb.go:163\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1337"
time="2019-10-11T03:38:26Z" level=info msg="Updated ActionSet 'k10-describe-k10-dr-bp-8jn57-catalog-svc-kasten-io-deploympbtsp' Status->failed"

We need controller level tests to catch this

@mergify mergify bot merged commit eb3762d into master Oct 11, 2019
@mergify mergify bot deleted the add-all-output-arts branch October 11, 2019 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants