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

Add filters docs and external doc tests support #89

Merged
merged 4 commits into from
Aug 25, 2020
Merged

Conversation

iffyio
Copy link
Collaborator

@iffyio iffyio commented Aug 23, 2020

  • Add external documentation under /docs around filters
    and their configuration.
  • Add support for running tests in external docs. This includes
    adding a nightly compiler and updating cloudbuild to run them
    in ci.

Work on #62

* Add external documentation under `/docs` around filters
  and their configuration.
* Add support for running tests in external docs. This includes
  adding a nightly compiler and updating cloudbuild to run them
  in ci.

Work on #62

* Although we have in this example, a filter called `drop`, every filter in the filter chain has the same ability to *drop* or *update* a packet - if any filter drops a packet then no more work needs to be done regarding that packet so the next filter in the pipeline never has any knowledge that the dropped packet ever existed.

* The filter chain is consulted for every received packet, in the same order regardless of the direction of the packet - a packet received downstream will be fed into `append` and the result from `drop` is forwarded upstream - a packet received upstream will be fed into `append` and the result from `drop` is forwarded downstream.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We need to instead go through the chain in reverse order when a packet goes in the opposite direction? so that e.g if we compress then encrypt, on the way back we decrypt first before decompressing.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah we do - this isn't implemented yet though. Would be good to have a good example (or these filters?), so we can test this is working as expected.

Copy link
Member

@markmandel markmandel left a comment

Choose a reason for hiding this comment

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

A couple of minor things, but this is awesome 👍

I also just build the CI image and pushed it up 👍 (if you want access to be able to do that, lemme know)

cloudbuild.yaml Show resolved Hide resolved
cloudbuild.yaml Outdated
@@ -23,6 +23,9 @@ steps:
args: ["clippy"]
id: clippy
- name: gcr.io/$PROJECT_ID/ci
args: ["test"]
args: ["test", "--lib"]
Copy link
Member

Choose a reason for hiding this comment

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

Reading https://doc.rust-lang.org/cargo/commands/cargo-test.html and testing this out, doesn't this skip the integration tests?

Would this be better served by --tests ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, good point I didn't see that caveat. Updated to use --tests instead

docs/extensions/filters/debug_filter.md Show resolved Hide resolved
docs/extensions/filters/debug_filter.md Show resolved Hide resolved
docs/extensions/filters/debug_filter.md Show resolved Hide resolved
Copy link
Member

@markmandel markmandel left a comment

Choose a reason for hiding this comment

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

Dooo it!

@markmandel markmandel merged commit b8e6b7f into master Aug 25, 2020
@markmandel markmandel added area/tests Unit tests, integration tests, anything to make sure things don't break kind/documentation Improvements or additions to documentation labels Aug 25, 2020
@markmandel markmandel deleted the iu/filter-docs branch April 30, 2021 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tests Unit tests, integration tests, anything to make sure things don't break cla: yes kind/documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants