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

Handle invalid utf-8 byte sequences in sql summarizer and DB statement #896

Merged
merged 4 commits into from Nov 18, 2020

Conversation

estolfo
Copy link
Contributor

@estolfo estolfo commented Nov 17, 2020

Fixes #895

  • Enforce utf-8 encoding of sql strings and replace invalid characters with �.
  • Enforce utf-8 encoding of the DB statement and replace invalid characters with �.

Note that we must do this when the Sql::Signature object is created, as opposed to in the Sql::Tokenizer because in case the string cannot be parsed, the first character is returned via @sql.split. That will fail if the first character is an invalid utf-8 byte sequence.

@estolfo estolfo requested a review from mikker November 17, 2020 10:23
Copy link
Contributor

@mikker mikker left a comment

Choose a reason for hiding this comment

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

Great!

What about statement? Do we need to handle binary there too?

@mikker
Copy link
Contributor

mikker commented Nov 17, 2020

(

)

@estolfo
Copy link
Contributor Author

estolfo commented Nov 17, 2020

not unless we call methods on the string. Simply setting it and passing it along in the context won't matter. I'll double check though.

@mikker
Copy link
Contributor

mikker commented Nov 17, 2020

We evetually convert it to JSON which will fail, I think. And we catch those failures, but maybe we want to do it upfront instead?

@apmmachine
Copy link
Collaborator

apmmachine commented Nov 17, 2020

💔 Tests Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #896 updated]

  • Start Time: 2020-11-18T11:01:26.686+0000

  • Duration: 27 min 51 sec

Test stats 🧪

Test Results
Failed 95
Passed 64632
Skipped 82
Total 64809

Test errors 95

Expand to view the tests failures

> Show only the first 10 test failures

Tests / Tests / Ruby:docker.elastic.co/observability-ci/jruby:9.2-12-jdk#rails-5.1 / Rails integration errors when a message is reported sends the message – when a message is reported

    Expand to view the error details

     failed Rails integration errors when a message is reported sends the message 
    

    Expand to view the stacktrace

     
            execution expired
    ["./spec/support/mock_intake.rb:152:in `block in wait_for'", "./spec/support/mock_intake.rb:151:in `block in wait_for'", "./spec/support/mock_intake.rb:150:in `wait_for'", "./spec/integration/rails_spec.rb:335:in `block in <main>'", "/usr/local/bundle/jruby/2.5.0/gems/webmock-3.10.0/lib/webmock/rspec.rb:37:in `block in <main>'"]
           
    

Tests / Tests / Ruby:ruby:2.7#rails-5.2 / Rails integration transactions when json validates the schema – when json

    Expand to view the error details

     failed Rails integration transactions when json validates the schema 
    

    Expand to view the stacktrace

     
            Read of URI at https://raw.githubusercontent.com/elastic/apm-server/master/docs/spec/metadata.json failed
    ["/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:126:in `rescue in read_uri'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:119:in `read_uri'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:91:in `read'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:536:in `rescue in initialize_schema'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:524:in `initialize_schema'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `block in initialize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `synchronize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `initialize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:255:in `new'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:255:in `validate!'", "./spec/support/match_json_schema_matcher.rb:38:in `block (2 levels) in <top (required)>'", "./spec/integration/rails_spec.rb:285:in `block (4 levels) in <top (required)>'", "/usr/local/bundle/gems/webmock-3.10.0/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'"]
           
    

Tests / Tests / Ruby:ruby:2.7#rails-5.2 / Rails integration errors when json validates the schema – when json

    Expand to view the error details

     failed Rails integration errors when json validates the schema 
    

    Expand to view the stacktrace

     
            Read of URI at https://raw.githubusercontent.com/elastic/apm-server/master/docs/spec/errors/error.json failed
    ["/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:126:in `rescue in read_uri'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:119:in `read_uri'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:91:in `read'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:536:in `rescue in initialize_schema'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:524:in `initialize_schema'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `block in initialize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `synchronize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `initialize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:255:in `new'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:255:in `validate!'", "./spec/support/match_json_schema_matcher.rb:38:in `block (2 levels) in <top (required)>'", "./spec/integration/rails_spec.rb:326:in `block (4 levels) in <top (required)>'", "/usr/local/bundle/gems/webmock-3.10.0/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'"]
           
    

Tests / Tests / Ruby:ruby:2.4#rails-5.0 / Rails integration transactions when json validates the schema – when json

    Expand to view the error details

     failed Rails integration transactions when json validates the schema 
    

    Expand to view the stacktrace

     
            Read of URI at https://raw.githubusercontent.com/elastic/apm-server/master/docs/spec/metadata.json failed
    ["/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:126:in `rescue in read_uri'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:119:in `read_uri'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:91:in `read'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:536:in `rescue in initialize_schema'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:524:in `initialize_schema'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `block in initialize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `synchronize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `initialize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:255:in `new'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:255:in `validate!'", "./spec/support/match_json_schema_matcher.rb:38:in `block (2 levels) in <top (required)>'", "./spec/integration/rails_spec.rb:285:in `block (4 levels) in <top (required)>'", "/usr/local/bundle/gems/webmock-3.10.0/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'"]
           
    

Tests / Tests / Ruby:ruby:2.4#rails-5.0 / Rails integration errors when json validates the schema – when json

    Expand to view the error details

     failed Rails integration errors when json validates the schema 
    

    Expand to view the stacktrace

     
            Read of URI at https://raw.githubusercontent.com/elastic/apm-server/master/docs/spec/errors/error.json failed
    ["/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:126:in `rescue in read_uri'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:119:in `read_uri'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:91:in `read'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:536:in `rescue in initialize_schema'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:524:in `initialize_schema'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `block in initialize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `synchronize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `initialize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:255:in `new'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:255:in `validate!'", "./spec/support/match_json_schema_matcher.rb:38:in `block (2 levels) in <top (required)>'", "./spec/integration/rails_spec.rb:326:in `block (4 levels) in <top (required)>'", "/usr/local/bundle/gems/webmock-3.10.0/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'"]
           
    

Tests / Tests / Ruby:ruby:2.6#rails-5.0 / Rails integration transactions when json validates the schema – when json

    Expand to view the error details

     failed Rails integration transactions when json validates the schema 
    

    Expand to view the stacktrace

     
            Read of URI at https://raw.githubusercontent.com/elastic/apm-server/master/docs/spec/metadata.json failed
    ["/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:126:in `rescue in read_uri'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:119:in `read_uri'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:91:in `read'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:536:in `rescue in initialize_schema'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:524:in `initialize_schema'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `block in initialize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `synchronize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `initialize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:255:in `new'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:255:in `validate!'", "./spec/support/match_json_schema_matcher.rb:38:in `block (2 levels) in <top (required)>'", "./spec/integration/rails_spec.rb:285:in `block (4 levels) in <top (required)>'", "/usr/local/bundle/gems/webmock-3.10.0/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'"]
           
    

Tests / Tests / Ruby:ruby:2.6#rails-5.0 / Rails integration errors when json validates the schema – when json

    Expand to view the error details

     failed Rails integration errors when json validates the schema 
    

    Expand to view the stacktrace

     
            Read of URI at https://raw.githubusercontent.com/elastic/apm-server/master/docs/spec/errors/error.json failed
    ["/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:126:in `rescue in read_uri'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:119:in `read_uri'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:91:in `read'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:536:in `rescue in initialize_schema'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:524:in `initialize_schema'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `block in initialize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `synchronize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `initialize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:255:in `new'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:255:in `validate!'", "./spec/support/match_json_schema_matcher.rb:38:in `block (2 levels) in <top (required)>'", "./spec/integration/rails_spec.rb:326:in `block (4 levels) in <top (required)>'", "/usr/local/bundle/gems/webmock-3.10.0/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'"]
           
    

Tests / Tests / Ruby:ruby:2.4#rails-5.2 / Rails integration errors when json validates the schema – when json

    Expand to view the error details

     failed Rails integration errors when json validates the schema 
    

    Expand to view the stacktrace

     
            Read of URI at https://raw.githubusercontent.com/elastic/apm-server/master/docs/spec/errors/error.json failed
    ["/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:126:in `rescue in read_uri'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:119:in `read_uri'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:91:in `read'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:536:in `rescue in initialize_schema'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:524:in `initialize_schema'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `block in initialize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `synchronize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `initialize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:255:in `new'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:255:in `validate!'", "./spec/support/match_json_schema_matcher.rb:38:in `block (2 levels) in <top (required)>'", "./spec/integration/rails_spec.rb:326:in `block (4 levels) in <top (required)>'", "/usr/local/bundle/gems/webmock-3.10.0/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'"]
           
    

Tests / Tests / Ruby:ruby:2.4#rails-5.2 / Rails integration transactions when json validates the schema – when json

    Expand to view the error details

     failed Rails integration transactions when json validates the schema 
    

    Expand to view the stacktrace

     
            Read of URI at https://raw.githubusercontent.com/elastic/apm-server/master/docs/spec/metadata.json failed
    ["/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:126:in `rescue in read_uri'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:119:in `read_uri'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:91:in `read'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:536:in `rescue in initialize_schema'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:524:in `initialize_schema'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `block in initialize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `synchronize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `initialize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:255:in `new'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:255:in `validate!'", "./spec/support/match_json_schema_matcher.rb:38:in `block (2 levels) in <top (required)>'", "./spec/integration/rails_spec.rb:285:in `block (4 levels) in <top (required)>'", "/usr/local/bundle/gems/webmock-3.10.0/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'"]
           
    

Tests / Tests / Ruby:ruby:2.7#rails-6.0 / Rails integration transactions when json validates the schema – when json

    Expand to view the error details

     failed Rails integration transactions when json validates the schema 
    

    Expand to view the stacktrace

     
            Read of URI at https://raw.githubusercontent.com/elastic/apm-server/master/docs/spec/metadata.json failed
    ["/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:126:in `rescue in read_uri'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:119:in `read_uri'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/schema/reader.rb:91:in `read'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:536:in `rescue in initialize_schema'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:524:in `initialize_schema'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `block in initialize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `synchronize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:53:in `initialize'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:255:in `new'", "/usr/local/bundle/gems/json-schema-2.8.1/lib/json-schema/validator.rb:255:in `validate!'", "./spec/support/match_json_schema_matcher.rb:38:in `block (2 levels) in <top (required)>'", "./spec/integration/rails_spec.rb:285:in `block (4 levels) in <top (required)>'", "/usr/local/bundle/gems/webmock-3.10.0/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'"]
           
    

Steps errors 141

Expand to view the steps failures

Show only the first 10 steps failures

Shell Script

  • Took 2 min 24 sec . View more details on here
  • Description: ./spec/scripts/spec.sh ruby:2.7 rails-6.0

Shell Script

  • Took 2 min 12 sec . View more details on here
  • Description: ./spec/scripts/spec.sh ruby:2.7 rails-6.0

Error signal

  • Took 0 min 0 sec . View more details on here
  • Description: Ruby:ruby:2.7#rails-6.0 tests failed : hudson.AbortException: script returned exit code 1

Shell Script

  • Took 3 min 44 sec . View more details on here
  • Description: ./spec/scripts/spec.sh ruby:2.7 rails-5.2

Shell Script

  • Took 3 min 31 sec . View more details on here
  • Description: ./spec/scripts/spec.sh ruby:2.7 rails-5.2

Error signal

  • Took 0 min 0 sec . View more details on here
  • Description: Ruby:ruby:2.7#rails-5.2 tests failed : hudson.AbortException: script returned exit code 1

Shell Script

  • Took 3 min 41 sec . View more details on here
  • Description: ./spec/scripts/spec.sh ruby:2.7 rails-5.1

Shell Script

  • Took 2 min 27 sec . View more details on here
  • Description: ./spec/scripts/spec.sh ruby:2.7 rails-5.1

Error signal

  • Took 0 min 0 sec . View more details on here
  • Description: Ruby:ruby:2.7#rails-5.1 tests failed : hudson.AbortException: script returned exit code 1

Shell Script

  • Took 3 min 52 sec . View more details on here
  • Description: ./spec/scripts/spec.sh ruby:2.7 rails-5.0

Log output

Expand to view the last 100 lines of log output

[2020-11-18T11:28:06.913Z] Installing aws-sdk-core 3.109.3
[2020-11-18T11:28:06.913Z] Installing activesupport 6.0.3.4
[2020-11-18T11:28:07.848Z] Fetching json-schema 2.8.1
[2020-11-18T11:28:07.848Z] Fetching webmock 3.10.0
[2020-11-18T11:28:07.848Z] Fetching domain_name 0.5.20190701
[2020-11-18T11:28:07.848Z] Installing json-schema 2.8.1
[2020-11-18T11:28:07.848Z] Installing webmock 3.10.0
[2020-11-18T11:28:07.848Z] Installing domain_name 0.5.20190701
[2020-11-18T11:28:08.107Z] Fetching http-parser 1.2.2
[2020-11-18T11:28:08.107Z] Fetching elasticsearch-transport 7.10.0
[2020-11-18T11:28:08.107Z] Installing http-parser 1.2.2 with native extensions
[2020-11-18T11:28:08.107Z] Installing elasticsearch-transport 7.10.0
[2020-11-18T11:28:09.483Z] Fetching rspec-its 1.3.0
[2020-11-18T11:28:09.483Z] Fetching grpc 1.32.0 (x86_64-linux)
[2020-11-18T11:28:09.483Z] Fetching rspec 3.10.0
[2020-11-18T11:28:09.483Z] Installing rspec-its 1.3.0
[2020-11-18T11:28:09.483Z] Installing rspec 3.10.0
[2020-11-18T11:28:09.483Z] Fetching sinatra 2.1.0
[2020-11-18T11:28:09.483Z] Fetching sneakers 2.12.0
[2020-11-18T11:28:09.483Z] Installing sneakers 2.12.0
[2020-11-18T11:28:09.483Z] Installing sinatra 2.1.0
[2020-11-18T11:28:09.483Z] Fetching simplecov-cobertura 1.4.1
[2020-11-18T11:28:09.483Z] Fetching aws-sdk-dynamodb 1.57.0
[2020-11-18T11:28:09.483Z] Installing simplecov-cobertura 1.4.1
[2020-11-18T11:28:09.483Z] Fetching aws-sdk-sqs 1.34.0
[2020-11-18T11:28:09.741Z] Installing aws-sdk-dynamodb 1.57.0
[2020-11-18T11:28:09.741Z] Fetching shoryuken 5.0.5
[2020-11-18T11:28:09.741Z] Installing aws-sdk-sqs 1.34.0
[2020-11-18T11:28:09.741Z] Fetching protobuf-cucumber 3.10.8
[2020-11-18T11:28:09.741Z] Installing shoryuken 5.0.5
[2020-11-18T11:28:10.001Z] Installing protobuf-cucumber 3.10.8
[2020-11-18T11:28:10.001Z] Fetching http-cookie 1.0.3
[2020-11-18T11:28:10.001Z] Installing http-cookie 1.0.3
[2020-11-18T11:28:10.001Z] Fetching elasticsearch 7.10.0
[2020-11-18T11:28:10.260Z] Installing elasticsearch 7.10.0
[2020-11-18T11:28:10.260Z] Fetching yarjuf 2.0.0
[2020-11-18T11:28:10.260Z] Fetching resque 2.0.0
[2020-11-18T11:28:10.260Z] Installing yarjuf 2.0.0
[2020-11-18T11:28:10.260Z] Installing resque 2.0.0
[2020-11-18T11:28:10.519Z] Fetching http 4.4.1
[2020-11-18T11:28:10.519Z] Installing grpc 1.32.0 (x86_64-linux)
[2020-11-18T11:28:10.519Z] Fetching cucumber-messages 13.2.0
[2020-11-18T11:28:10.519Z] Installing http 4.4.1
[2020-11-18T11:28:10.519Z] Installing cucumber-messages 13.2.0
[2020-11-18T11:28:10.519Z] Fetching cucumber-gherkin 15.0.2
[2020-11-18T11:28:10.778Z] Installing cucumber-gherkin 15.0.2
[2020-11-18T11:28:10.778Z] Fetching cucumber-create-meta 2.0.4
[2020-11-18T11:28:10.778Z] Fetching cucumber-html-formatter 9.0.0
[2020-11-18T11:28:10.778Z] Installing cucumber-create-meta 2.0.4
[2020-11-18T11:28:10.778Z] Using elastic-apm 3.12.1 from source at `.`
[2020-11-18T11:28:10.778Z] Fetching cucumber-core 8.0.1
[2020-11-18T11:28:11.037Z] Installing cucumber-html-formatter 9.0.0
[2020-11-18T11:28:11.037Z] Installing cucumber-core 8.0.1
[2020-11-18T11:28:11.296Z] Fetching cucumber-wire 4.0.1
[2020-11-18T11:28:11.556Z] Installing cucumber-wire 4.0.1
[2020-11-18T11:28:11.556Z] Fetching cucumber 5.2.0
[2020-11-18T11:28:11.556Z] Installing cucumber 5.2.0
[2020-11-18T11:28:12.123Z] Bundle complete! 33 Gemfile dependencies, 104 gems now installed.
[2020-11-18T11:28:12.123Z] Bundled gems are installed into `./vendor/2.7`
[2020-11-18T11:28:12.123Z] Post-install message from i18n:
[2020-11-18T11:28:12.123Z] 
[2020-11-18T11:28:12.123Z] HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
[2020-11-18T11:28:12.123Z] But that may break your application.
[2020-11-18T11:28:12.123Z] 
[2020-11-18T11:28:12.123Z] If you are upgrading your Rails application from an older version of Rails:
[2020-11-18T11:28:12.123Z] 
[2020-11-18T11:28:12.123Z] Please check your Rails app for 'config.i18n.fallbacks = true'.
[2020-11-18T11:28:12.123Z] If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
[2020-11-18T11:28:12.123Z] 'config.i18n.fallbacks = [I18n.default_locale]'.
[2020-11-18T11:28:12.123Z] If not, fallbacks will be broken in your app by I18n 1.1.x.
[2020-11-18T11:28:12.123Z] 
[2020-11-18T11:28:12.123Z] If you are starting a NEW Rails application, you can ignore this notice.
[2020-11-18T11:28:12.123Z] 
[2020-11-18T11:28:12.123Z] For more info see:
[2020-11-18T11:28:12.123Z] https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
[2020-11-18T11:28:12.123Z] 
[2020-11-18T11:28:12.123Z] Post-install message from sucker_punch:
[2020-11-18T11:28:12.123Z] Sucker Punch v2.0 introduces backwards-incompatible changes.
[2020-11-18T11:28:12.123Z] Please see https://github.com/brandonhilkert/sucker_punch/blob/master/CHANGES.md#200 for details.
[2020-11-18T11:28:14.656Z] Coverage report generated for RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec, RSpec to /app/coverage/coverage.xml. 2939 / 3870 LOC (75.94%) covered.
[2020-11-18T11:28:15.250Z] [Cobertura] Publishing Cobertura coverage report...
[2020-11-18T11:28:15.251Z] 
[2020-11-18T11:28:15.475Z] [Cobertura] Publishing Cobertura coverage results...
[2020-11-18T11:28:15.475Z] 
[2020-11-18T11:28:15.482Z] [Cobertura] Cobertura coverage report found.
[2020-11-18T11:28:15.482Z] 
[2020-11-18T11:28:16.738Z] Failed in branch Tests
[2020-11-18T11:28:16.820Z] Stage "Benchmarks" skipped due to earlier failure(s)
[2020-11-18T11:28:16.833Z] Stage "Benchmarks" skipped due to earlier failure(s)
[2020-11-18T11:28:16.881Z] Stage "Benchmarks" skipped due to earlier failure(s)
[2020-11-18T11:28:16.964Z] Stage "Release" skipped due to earlier failure(s)
[2020-11-18T11:28:16.977Z] Stage "Release" skipped due to earlier failure(s)
[2020-11-18T11:28:17.026Z] Stage "Release" skipped due to earlier failure(s)
[2020-11-18T11:28:17.077Z] Stage "Release" skipped due to earlier failure(s)
[2020-11-18T11:28:17.309Z] Running on Jenkins in /var/lib/jenkins/workspace/t-ruby_apm-agent-ruby-mbp_PR-896
[2020-11-18T11:28:17.342Z] [INFO] getVaultSecret: Getting secrets
[2020-11-18T11:28:17.481Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-11-18T11:28:18.111Z] + chmod 755 generate-build-data.sh
[2020-11-18T11:28:18.111Z] + ./generate-build-data.sh https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-ruby/apm-agent-ruby-mbp/PR-896/ https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-ruby/apm-agent-ruby-mbp/PR-896/runs/4 FAILURE 1611168
[2020-11-18T11:28:18.362Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-ruby/apm-agent-ruby-mbp/PR-896/runs/4/steps/?limit=10000 -o steps-info.json

@estolfo
Copy link
Contributor Author

estolfo commented Nov 17, 2020

Yes, you're right. You'd get this with invalid utf-8 bytes when serializing to JSON:
JSON::GeneratorError: source sequence is illegal/malformed utf-8

@estolfo estolfo requested a review from mikker November 17, 2020 12:43
Copy link
Contributor

@mikker mikker left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@mikker
Copy link
Contributor

mikker commented Nov 17, 2020

Remember changelog entry

@AlexanderWert AlexanderWert added this to Planned in APM-Agents (OLD) via automation Nov 18, 2020
@AlexanderWert AlexanderWert moved this from Planned to In Progress in APM-Agents (OLD) Nov 18, 2020
@estolfo estolfo changed the title Handle invalid utf-8 byte sequences in sql summarizer Handle invalid utf-8 byte sequences in sql summarizer and DB statement Nov 18, 2020
@estolfo estolfo merged commit 9d19e6c into elastic:master Nov 18, 2020
APM-Agents (OLD) automation moved this from In Progress to Done Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

ElasticAPM::Sql module breaks when a sql string contains a binary column value
4 participants