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

Log output on failures in helm library #1007

Merged
merged 1 commit into from
May 26, 2021
Merged

Log output on failures in helm library #1007

merged 1 commit into from
May 26, 2021

Conversation

akankshakumari393
Copy link
Contributor

@akankshakumari393 akankshakumari393 commented May 24, 2021

Change Overview

This PR is to add an output log to the helm install function in case of failure.

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

Issues

Test Plan

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E

A scenario where helm install would fail and output error log as well. Here helm install would fail because Kafka helm chart was already installed.
./build/integration-test.sh Kafka

Running integration tests:
~/KASTEN/kanister/pkg/testing ~/KASTEN/kanister
=== RUN   Test
INFO[2021-05-24T14:27:36.371277091+05:30] Running e2e integration test.                 File=reflect/value.go Function=reflect.Value.call Line=476 app=kafka testName=Kafka.TestRun
INFO[2021-05-24T14:27:36.435835746+05:30] Adding repo.                                  File=pkg/app/kafka.go Function="github.com/kanisterio/kanister/pkg/app.(*KafkaCluster).Install" Line=119 app=kafka
INFO[2021-05-24T14:27:40.196822748+05:30] Installing kafka operator using helm.         File=pkg/app/kafka.go Function="github.com/kanisterio/kanister/pkg/app.(*KafkaCluster).Install" Line=124 app=kafka
ERRO[2021-05-24T14:27:42.68865936+05:30] Error installing helm chart                   File=pkg/app/kafka.go Function="github.com/kanisterio/kanister/pkg/app.(*KafkaCluster).Install" Line=125 output="Error: rendered manifests contain a resource that already exists. Unable to continue with install: ClusterRole \"strimzi-cluster-operator-namespaced\" in namespace \"\" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key \"meta.helm.sh/release-name\" must equal \"kafka-65g5f\": current value is \"kafka-q4w87\""
----------------------------------------------------------------------
FAIL: <autogenerated>:1: Kafka.TestRun
integration_test.go:188:
    c.Assert(err, IsNil)
... value *errors.withStack = Error installing operator kafka through helm.: exit status 1 ("Error installing operator kafka through helm.: exit status 1")

Copy link
Contributor

@PrasadG193 PrasadG193 left a comment

Choose a reason for hiding this comment

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

Looks good

@mergify mergify bot merged commit 133b014 into master May 26, 2021
@mergify mergify bot deleted the log_helm branch May 26, 2021 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants