-
Notifications
You must be signed in to change notification settings - Fork 2
Integration test coverage for path filtering #313
Conversation
I added a new integration test that uses a Do you expect tiles from the advertiser hosts with invalid path filters to be ignored? I'm seeing a |
It seems that the |
Ah! Good catch! The panic would get recorded by Sentry, and the code enforces a terminating slash. |
That's quite surprising to me. I'd guess all the Actix servers (i.e. workers) would load the same settings, shouldn't they all panic? How did it serve the request and return 200 🤔
Yep, I think we can do that although it'll be preferred to fail soon and loud. |
Based on the results in the integration tests, I am wondering if only workers that happen to process tiles from partner API for an advertiser for which there is an invalid path filter in the settings panic and all other workers are not impacted. Could that be the case? Does settings loading happen lazily? |
I'm not seeing any panic running the Indeed rust's panic will only affect the current thread (potentially only one actix-web worker while the others continue). However contile's initialization of settings occur within |
FWIW, #314 has removed this panic, instead, it simply returns an error when detecting malformed path filters (e.g. prefix values without the trailing "/" or exact values without the leading "/"). |
It does still "panic" though -- for the sake of this PR the behavior is the same (it was changed to return Errors but such initialization errors are propagated out to contile's main function, ultimately causing it to abort w/ a non zero return code before the server is launched). |
83e1e9f
to
1d76dfa
Compare
I rebased this branch to reorder, fixup and reword some of the commits. I also renamed what we originally called |
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.
LGTM, thanks!
command: | | ||
docker-compose --version | ||
set +e # We need this so that the run doesn't exit after docker-compose | ||
docker-compose \ |
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.
Not needed now, but you can use timeout --kill-after=DURATION --signal=SIGNAL ...
to automatically kill a command with SIGNAL after DURATION seconds.
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.
Okay. Here with --abort-on-container-exit
docker compose will shut down all services as soon as the contile
service exits or if that doesn't happen after the client
exits because the test ran.
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.
LGTM 👍
Description
This pull request is a follow-up for #311 and uses that branch as a base. I will rebase this once #311 is merged.
Please see the test scenario descriptions in
integration-tests/volumes/client/scenarios.yml
and let me know if you have any questions about the scenarios.Note that I've observed unexpected behavior when working this, which I described in #311 (comment). 🚧
Testing
Verify that the following 2 new integration tests run and pass on CI:
advertiser_url_path_filter_prefix
advertiser_url_path_filter_exact
Issue(s)
See #311