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

Implement non application error codes fix #895 #907

Merged
merged 11 commits into from
Mar 11, 2019

Conversation

mstoykov
Copy link
Contributor

No description provided.

@mstoykov mstoykov force-pushed the feature/NonApplicationProtocolErrorCodes branch from 3e74fb4 to df4aa05 Compare January 29, 2019 06:46
@codecov-io
Copy link

codecov-io commented Feb 7, 2019

Codecov Report

Merging #907 into master will increase coverage by 0.36%.
The diff coverage is 90.29%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #907      +/-   ##
==========================================
+ Coverage   70.35%   70.72%   +0.36%     
==========================================
  Files         118      121       +3     
  Lines        9111     9188      +77     
==========================================
+ Hits         6410     6498      +88     
+ Misses       2294     2283      -11     
  Partials      407      407
Impacted Files Coverage Δ
lib/netext/httpext/response_type_gen.go 10% <ø> (ø)
lib/options.go 91.81% <ø> (ø) ⬆️
js/common/context.go 100% <ø> (ø) ⬆️
lib/netext/httpext/tracer.go 96.42% <ø> (ø)
js/modules/k6/http/cookiejar.go 73.33% <ø> (+5.98%) ⬆️
js/modules/k6/ws/ws.go 79.26% <100%> (ø) ⬆️
lib/context.go 100% <100%> (ø)
js/modules/k6/k6.go 91.11% <100%> (ø) ⬆️
lib/netext/dialer.go 94.36% <100%> (+0.16%) ⬆️
stats/cloud/data.go 93.24% <100%> (ø) ⬆️
... and 17 more

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 04bf54c...139899d. Read the comment docs.

@mstoykov mstoykov force-pushed the feature/NonApplicationProtocolErrorCodes branch from 9baec92 to dc30a2a Compare February 8, 2019 09:52
Copy link
Member

@na-- na-- left a comment

Choose a reason for hiding this comment

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

Mostly LGTM, though I think that we should also add a new error_code metric tag with this PR, that will also be part of the DefaultSystemTagList as well.

I'm not sure if we should remove the error tag from DefaultSystemTagList though. On the one hand, the error_code tag will do the same job, but on the other hand, some people may rely on it currently, and you've fixed its biggest issue (the highly variable string values). So I think we should leave both error and error_code there for now, at least in the next few releases.

js/modules/k6/http/error_codes.go Outdated Show resolved Hide resolved
js/modules/k6/http/error_codes_test.go Outdated Show resolved Hide resolved
js/modules/k6/http/error_codes.go Outdated Show resolved Hide resolved
js/modules/k6/http/response.go Outdated Show resolved Hide resolved
js/modules/k6/http/error_codes.go Outdated Show resolved Hide resolved
js/modules/k6/http/error_codes.go Outdated Show resolved Hide resolved
@mstoykov mstoykov force-pushed the feature/NonApplicationProtocolErrorCodes branch from b074e8a to 9366d78 Compare March 1, 2019 08:06
mstoykov and others added 3 commits March 7, 2019 15:21
This currently only supports http and the errors currently codified are
based on what errors were seen the most.

Some errors have new custom messages - this has been done to errors with
changing messages with the new custom message primarely removing the
changing parts, usually ip/ports and such.
#928)

I would've liked if I have moved more or ... less but this is the amount
of code that will be useful for future development and is the amount
that I could move with some amount of certainty that I am not totally
breaking the whole project.

There is the very real possibility that some types like URL and Response
might need to be copied because of further problems with goja but for
the moment this appears to be working.
@mstoykov mstoykov force-pushed the feature/NonApplicationProtocolErrorCodes branch from 9366d78 to 8af7f5c Compare March 7, 2019 13:22
This also sets the error tag to the now more non dynamic messages.

This also changes a little bit of the behaviour specifically in that if
there is an error while making the http request that is not from the
RoundTripper than we consider this to be exception worthy now and
independantly of `throw` it will result in a exception. This should not
be ... common at all: the only error that is suppose to be able to
happen is if a redirect has an unparsable/missing location.
@mstoykov mstoykov force-pushed the feature/NonApplicationProtocolErrorCodes branch from c77b461 to 9b6f7cc Compare March 7, 2019 15:01
@mstoykov mstoykov mentioned this pull request Mar 8, 2019
js/modules/k6/http/request_test.go Outdated Show resolved Hide resolved
js/modules/k6/http/request_test.go Outdated Show resolved Hide resolved
js/modules/k6/http/response.go Show resolved Hide resolved
lib/netext/httpext/transport.go Show resolved Hide resolved
lib/netext/httpext/request.go Show resolved Hide resolved
lib/netext/httpext/request.go Show resolved Hide resolved
lib/netext/httpext/transport.go Show resolved Hide resolved
@mstoykov mstoykov force-pushed the feature/NonApplicationProtocolErrorCodes branch from de0b781 to 6e3cf8c Compare March 11, 2019 09:57
@mstoykov
Copy link
Contributor Author

About removing error from the default tags: removing it will prevent us from more easily identifying currently non captured errors and to give them codes. So I am all for leaving it

This is primary needed because if digest and ntlm authentication as in
all other cases we actually make a new transport
Copy link
Member

@na-- na-- left a comment

Choose a reason for hiding this comment

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

LGTM

@mstoykov mstoykov merged commit cf8bccc into master Mar 11, 2019
@mstoykov mstoykov deleted the feature/NonApplicationProtocolErrorCodes branch March 11, 2019 11:06
@mstoykov mstoykov mentioned this pull request Apr 5, 2019
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.

3 participants