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

feat: web metrics preserve data types, allow insecure tls, and make jsonPath optional #731

Merged
merged 1 commit into from
Sep 26, 2020

Conversation

jessesuen
Copy link
Member

Resolves #728, #718, #717

  1. When using jsonPath, the web metric always converted the result into a string. This is why the asFloat and asInt helpers were introduced, in to convert these strings into numbers so that mathematical comparison could be performed. This change preserves the original types so that asFloat and asInt are no longer necessary (as long as the original data types are numeric).

  2. Previously, jsonPath was a required field. This change allows jsonPath to be omitted, in which case the entire body is the payload.

  3. Added an insecure: true field that allows the web metric to disable TLS host verification when making HTTP requests.

@codecov-commenter
Copy link

codecov-commenter commented Sep 23, 2020

Codecov Report

Merging #731 into master will decrease coverage by 0.47%.
The diff coverage is 38.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #731      +/-   ##
==========================================
- Coverage   82.91%   82.44%   -0.48%     
==========================================
  Files          95       95              
  Lines        7926     7992      +66     
==========================================
+ Hits         6572     6589      +17     
- Misses        951      999      +48     
- Partials      403      404       +1     
Impacted Files Coverage Δ
utils/evaluate/evaluate.go 56.86% <32.25%> (-38.98%) ⬇️
metricproviders/webmetric/webmetric.go 65.71% <61.11%> (-4.98%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4fded3d...0be18a8. Read the comment docs.

@jessesuen jessesuen force-pushed the fix-web-metric branch 2 times, most recently from 87482a8 to 567cb1c Compare September 23, 2020 08:59
Copy link
Contributor

@khhirani khhirani left a comment

Choose a reason for hiding this comment

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

LGTM

@jessesuen jessesuen merged commit b5aa6d7 into argoproj:master Sep 26, 2020
@jessesuen jessesuen deleted the fix-web-metric branch September 26, 2020 09:07
jessesuen added a commit that referenced this pull request Sep 28, 2020
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.

web metric jsonPath always returns values as strings
3 participants