GithubHelp home page GithubHelp logo

Comments (6)

zombiezen avatar zombiezen commented on May 8, 2024

(This is broadly applicable, not just to runtimeconfig.)

from go-cloud.

cflewis avatar cflewis commented on May 8, 2024

Looks like messages are matched exactly.

The simplest thing is probably to inspect the protos and scrub them when they go in and when they go out.

This might be what we should do for HTTP too; just have a wrapper transport that scrubs rather than reloading the file.

from go-cloud.

cflewis avatar cflewis commented on May 8, 2024

It is not clear to me that rpcreplay can be chained as it doesn't expose the invoking functions that it uses for interception. It's possible that DialOptions handle chained calls to WithUnaryInterceptor correctly, but I am skeptical. I'll try and see.

from go-cloud.

cflewis avatar cflewis commented on May 8, 2024

As feared, chaining WithUnaryInterceptor is not possible. I will need to open a PR on rpcreplay that exposes the interceptors.

from go-cloud.

cflewis avatar cflewis commented on May 8, 2024

Exposing the interceptors doesn't help. The invoker is what sends the RPC upstream. The invoker is passed by GRPC, so there's no way to wrap it. Without doing major surgery on rpcreplay itself (which we could do by just forking it), the only thing to do is to expose the entry struct so entries in the replay file can be unmarshaled, load the replay file, scrub the protos and then save them into a new file, delete the old one then move the new file into place.

I do not like either option.

from go-cloud.

cflewis avatar cflewis commented on May 8, 2024

This remains more involved than expected, but progress is being made.

@jba recommended modifying rpcreplay to take callbacks for before/after messages are sent. That I have done, but am not going to send the change until I'm confident what I did was correct.

It looks like NewGCPDialOptions will need to take a scrubber as an argument that is passed by the tests. The reason the tests need to define the scrubber is that you don't know what the possible protos are beforehand, nor where possible sensitive data might be.

from go-cloud.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.