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

fix(webhook-service): Added missing webhook-config version check #7832

Merged
merged 3 commits into from May 24, 2022

Conversation

odubajDT
Copy link
Contributor

@odubajDT odubajDT commented May 23, 2022

Signed-off-by: odubajDT ondrej.dubaj@dynatrace.com

Notes

When retrieving resources from git repository, the first step is decoding the content of webhook.yaml to a struct. Here we have two versions (alpha and beta) which are mostly normalized the same way except beta has a few additional checks. These checks were executed only if the version of the webhook-config was v1beta1, if it was different, additional checks were not executed. So actually the in the integration test, we had a valid webhook-config, so if the extra pre-check is or is not executed, it does not matter, the webhook is executed normally (and it's working), just the extra pre-checks were not executed.

Integration tests

https://github.com/keptn/keptn/actions/runs/2372897926

@odubajDT odubajDT added the CI:trigger-build-everything Trigger CI Build: Set BUILD_EVERYTHING=TRUE label May 23, 2022
@odubajDT odubajDT requested a review from a team as a code owner May 23, 2022 08:58
RealAnna
RealAnna previously approved these changes May 23, 2022
Copy link
Contributor

@RealAnna RealAnna left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented May 23, 2022

Codecov Report

Merging #7832 (ad45606) into master (8444b48) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #7832      +/-   ##
==========================================
+ Coverage   60.07%   60.09%   +0.02%     
==========================================
  Files         569      569              
  Lines       33351    33363      +12     
  Branches     1655     1655              
==========================================
+ Hits        20035    20051      +16     
+ Misses      12006    12003       -3     
+ Partials     1310     1309       -1     
Impacted Files Coverage Δ
webhook-service/lib/webhook_config.go 91.30% <100.00%> (+0.39%) ⬆️
shipyard-controller/handler/shipyardcontroller.go 52.52% <0.00%> (-0.13%) ⬇️
shipyard-controller/models/sequence_execution.go 100.00% <0.00%> (ø)
...project-settings/ktb-project-settings.component.ts 80.21% <0.00%> (+0.54%) ⬆️
Flag Coverage Δ
api 88.35% <ø> (ø)
approval-service 64.61% <ø> (ø)
bridge-server 67.62% <ø> (ø)
bridge2 74.20% <ø> (+0.01%) ⬆️
cli 43.04% <ø> (ø)
configuration-service 9.17% <ø> (ø)
helm-service 49.07% <ø> (ø)
lighthouse-service 72.95% <ø> (ø)
mongodb-datastore 58.39% <ø> (ø)
remediation-service 79.77% <ø> (ø)
resource-service 81.37% <ø> (ø)
secret-service 81.47% <ø> (ø)
shipyard-controller 60.91% <ø> (+0.09%) ⬆️
statistics-service 59.29% <ø> (ø)
webhook-service 84.04% <100.00%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@odubajDT odubajDT removed the CI:trigger-build-everything Trigger CI Build: Set BUILD_EVERYTHING=TRUE label May 23, 2022
RealAnna
RealAnna previously approved these changes May 23, 2022
Copy link
Contributor

@RealAnna RealAnna left a comment

Choose a reason for hiding this comment

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

LGTM

@odubajDT odubajDT added the CI:trigger-build-everything Trigger CI Build: Set BUILD_EVERYTHING=TRUE label May 23, 2022
@odubajDT odubajDT changed the title test: Increase timeout when waiting for delivery in CustomEndpointsTest fix(webhook-service): Added missing webhook-config version check May 23, 2022
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
@sonarcloud
Copy link

sonarcloud bot commented May 23, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@odubajDT odubajDT merged commit 445000a into master May 24, 2022
@mowies mowies deleted the fix/test branch September 27, 2022 11:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CI:trigger-build-everything Trigger CI Build: Set BUILD_EVERYTHING=TRUE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants