Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

GET "/api/v1/metadata" returns null during K8s api downtime #2870

Closed
3 tasks
christian-kreuzberger-dtx opened this issue Dec 28, 2020 · 1 comment · Fixed by #2954
Closed
3 tasks

GET "/api/v1/metadata" returns null during K8s api downtime #2870

christian-kreuzberger-dtx opened this issue Dec 28, 2020 · 1 comment · Fixed by #2954
Assignees
Labels
area:api area:cli type:bug Something is not working as intended/documented
Milestone

Comments

@christian-kreuzberger-dtx
Copy link
Member

christian-kreuzberger-dtx commented Dec 28, 2020

With Keptn 0.8.0-alpha, accessing GET "/api/v1/metadata" returns null during K8s api downtime.

This is especially inconvenient as in the CLI we get the following message:

$ keptn-080-alpha status
* Warning: Your Keptn CLI version (0.8.0-alpha) and Keptn cluster version () don't match. This can lead to problems. Please make sure to use the same versions.Starting to authenticate

Definition of Done

  • Unit test available which tetest this edge case (the fake package may be used to mock the kubernetes API)
  • API returns a sensible error message (or even better a proper response) in case of Kubernetes Api not being reachable
  • CLI needs a line-break after the message "Please make sure to use the same versions."
@christian-kreuzberger-dtx christian-kreuzberger-dtx added type:bug Something is not working as intended/documented area:cli area:api labels Dec 28, 2020
@christian-kreuzberger-dtx christian-kreuzberger-dtx added this to the 0.8.0 milestone Dec 28, 2020
@christian-kreuzberger-dtx christian-kreuzberger-dtx added this to Backlog in Working items via automation Dec 28, 2020
@christian-kreuzberger-dtx christian-kreuzberger-dtx added the ready-for-refinement Issue is relevant for the next backlog refinment label Dec 28, 2020
@johannes-b johannes-b added next-sprint Items that should be discussed and implemented in the next sprint and removed ready-for-refinement Issue is relevant for the next backlog refinment labels Jan 12, 2021
@johannes-b
Copy link
Member

To reproduce this problem, trigger a manual upgrade of a GKE cluster (example given on GKE).

@johannes-b johannes-b added this to Backlog in Working items via automation Jan 12, 2021
@bacherfl bacherfl self-assigned this Jan 20, 2021
@bacherfl bacherfl moved this from Backlog to In progress in Working items Jan 20, 2021
@bacherfl bacherfl moved this from In progress to Assigned and committed in Working items Jan 20, 2021
@johannes-b johannes-b removed the next-sprint Items that should be discussed and implemented in the next sprint label Jan 20, 2021
@bacherfl bacherfl moved this from Assigned and committed to In progress in Working items Jan 20, 2021
bacherfl added a commit that referenced this issue Jan 20, 2021
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
bacherfl added a commit that referenced this issue Jan 20, 2021
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
bacherfl added a commit that referenced this issue Jan 21, 2021
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
bacherfl added a commit that referenced this issue Jan 21, 2021
…ehave as expected; unit tests

Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
@bacherfl bacherfl moved this from In progress to Ready for review in Working items Jan 21, 2021
bacherfl added a commit that referenced this issue Feb 1, 2021
…ized

Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
bacherfl added a commit that referenced this issue Feb 3, 2021
* #2870 refactored metadata handler for better testability

Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>

* #2870 added error case for unit tests

Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>

* #2870 added line break after unmatched version warning

Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>

* #2870 added proper error message in case metadata endpoint does not behave as expected; unit tests

Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>

* #2870 log the error message in case a k8s client could not be initialized

Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
DarthBenro008 pushed a commit to DarthBenro008/keptn that referenced this issue Feb 4, 2021
* keptn#2870 refactored metadata handler for better testability

Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>

* keptn#2870 added error case for unit tests

Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>

* keptn#2870 added line break after unmatched version warning

Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>

* keptn#2870 added proper error message in case metadata endpoint does not behave as expected; unit tests

Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>

* keptn#2870 log the error message in case a k8s client could not be initialized

Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
@johannes-b johannes-b moved this from Ready for review to Done/presented in community review (column will be cleaned regularly) in Working items Feb 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:api area:cli type:bug Something is not working as intended/documented
Projects
No open projects
Working items
Done/presented in community review (c...
Development

Successfully merging a pull request may close this issue.

3 participants