-
Notifications
You must be signed in to change notification settings - Fork 63
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
Add PgPlugin - PosgreSQL #31
Conversation
Hope the tests can be added ASAP |
Yes, am trying for this PR. |
Well, I am not having much luck even running the baseline tests locally, so without that can't actually add any:
|
interval: 5s | ||
timeout: 60s | ||
retries: 120 | ||
image: "docker.io/mysql:latest" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mysql issue It seems that the npm package mysql
can't support mysql8
well. Trying to use a lower version should be successful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the authentication thing, but no, I think its just the test writing sw logging to console, this requires @kezhenxu94 intervention.
What about my problem of running tests locally? |
From the logs, I suspect you may be running a rather old-version docker? |
|
@tom-pytel can you change those version back to 2.1 and try again? I can reproduce this on a Ubuntu machine, though with different error message
|
2.1, the errors are different but still erroring. Also, 17 minutes to test 4 simple plugins?
|
I have encountered this sometimes when my network speed is slow.
This depends on many factors, the network speed, the spec of the machine, etc., but usually, I only run the one test that I'm concerned of, e.g. |
Note that this doesn't have the postgre test yet, will add before merge if sql test runs ok. |
042acb7
to
fbe2483
Compare
I officially give up |
I got this from the GitHub Actions logs, open the raw logs and search @@ -33,9 +33,12 @@ segmentItems:
peer: not null
skipAnalysis: false
tags:
- - { key: http.url, value: 'http://server:5000/postgre' }
- - { key: http.method, value: GET }
- - { key: http.status.code, value: '200' }
+ - key: http.url
+ value: http://server:5000/postgre
+ - key: http.method
+ value: GET
+ - key: http.status.code
+ value: "200"
refs:
- parentEndpoint: ""
networkAddress: server:5000
@@ -52,20 +55,23 @@ segmentItems:
spanLayer: Database
startTime: gt 0
endTime: gt 0
- componentId: 22
+ componentId: 5
spanType: Exit
peer: postgres:5432
skipAnalysis: false
tags:
- - { key: db.type, value: PostgreSQL }
- - { key: db.instance, value: test }
- - { key: db.statement, value: SELECT * FROM "user" where name = 'u1' }
+ - key: db.type
+ value: PostgreSQL
+ - key: db.instance
+ value: test
+ - key: db.statement
+ value: SELECT * FROM `user` WHERE `name` = "u1"
- serviceName: client
segmentSize: 1
segments:
- segmentId: not null
spans:
- - operationName: /postgre
+ - operationName: /postgres
operationId: 0
parentSpanId: -1
spanId: 0
@@ -77,10 +83,13 @@ segmentItems:
peer: not null
skipAnalysis: false
tags:
- - { key: http.url, value: 'http://localhost:5001/postgre' }
- - { key: http.method, value: GET }
- - { key: http.status.code, value: '200' }
- - operationName: /postgre
+ - key: http.url
+ value: http://localhost:5001/postgres
+ - key: http.method
+ value: GET
+ - key: http.status.code
+ value: "200"
+ - operationName: /postgres
operationId: 0
parentSpanId: 0
spanId: 1
@@ -92,7 +101,11 @@ segmentItems:
peer: server:5000
skipAnalysis: false
tags:
- - { key: http.url, value: 'server:5000/postgre' }
- - { key: http.method, value: GET }
- - { key: http.status.code, value: '200' }
- - { key: http.status.msg, value: OK }
+ - key: http.url
+ value: server:5000/postgres
+ - key: http.method
+ value: GET
+ - key: http.status.code
+ value: "200"
+ - key: http.status.msg
+ value: OK
|
Ok, what tool are you using to diff visualize this? |
I was actually using WebStorm to compare and eliminate those |
I wonder if there is a plugin for VSCode, because without it those logs are unreadable. |
I'm not a fan of VS Code so I don't know whether or not there is such plugin. But I may consider building that into the CI workflow (we have similar in skywalking-python repo) to diff the expected data when failure, |
That would be good because for someone without your setup trying to find an error in these raw logs is problematic. Speaking of which, what is it that is failing now? |
OH MY GOD! |
Quick! Merge it before it breaks again! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Some tweaks to the mysql plugin here as well. Will see about tests for both this and mysql plugins, maybe I will add them to this PR if I have time but if no then will have to be a separate one.