feat(settings): Make suggestion providers much more configurable at runtime #125
Conversation
@hackebrot I made some changes to the |
Thank you for letting me know, @mythmon! I'll take a look tomorrow morning. 📋 |
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.
Hi @mythmon! 👋🏻 I added my comments inline.
|
||
```text | ||
docker compose -f test-engineering/docker-compose.yml up --abort-on-container-exit --build | ||
docker-compose -f test-engineering/docker-compose.yml up --abort-on-container-exit --build |
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.
Newer versions of docker
come with a compose
subcommand. Probably makes sense to refer to the docker-compose
script for compatibility here.
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.
Ah, interesting. My version of docker does not have a compose subcommand, and this is a typo I make very often, so I assumed it was the same.
//! Merino's APIs using more opaque techniques. They cannot configure the server | ||
//! per test, and are more concerned with external contracts and behavior. | ||
//! | ||
//! For more details see the README.md file in the `test-engineering` directory. |
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.
I didn't know about this docs page! This is super helpful. Thank you for documenting the new tests here. 📝
//! There are two major testing strategies used in this repository: unit tests, | ||
//! and integration tests. | ||
//! There are three major testing strategies used in this repository: unit tests, | ||
//! Rust integration tests, and Python system tests. |
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.
I'd probably not mention that the system tests are written in Python since it's not relevant to the coverage that these tests provide. What's more important is that a HTTP client running in a Docker container sends HTTP requests to Merino running in a Docker container (which is closer to how Merino runs in prod that compared to unit or the Rust integration tests).
@@ -3,26 +3,11 @@ services: | |||
merino: | |||
# See `docker-image-build` job in `.circleci/config.yml` | |||
image: app:build | |||
build: .. |
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.
Good idea! 👍🏻
@@ -51,3 +55,11 @@ | |||
//! | |||
//! For more details, see the documentation of the `merino-integration-tests` | |||
//! crate. | |||
//! | |||
//! ## System tests |
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.
I suggest we also rename the CircleCI job to reflect this definition! 🤖
Looks like the system tests failed on CI with a timeout connecting to Merino:
For some reason it still ran the pytest tests after that. 🤔 |
By default |
I was looking into the timeout issues again today. The log message below suggests that Merino is running on a port config: http:
# The host and port Merino listens on
listen: "0.0.0.0:8000" log:
|
Well that's not good. I'll look into that and see what's going on. |
@@ -79,10 +79,6 @@ COPY --from=builder /app/bin /app/bin | |||
COPY --from=builder /app/version.json /app | |||
COPY --from=builder /app/config /app/config | |||
|
|||
ARG HOST=0.0.0.0 | |||
ARG PORT=8080 | |||
ENV MERINO_HTTP__LISTEN="${HOST}:${PORT}" |
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.
This was the real fix. The rest of the changes in this commit are useful things I figured out while debugging this.
The integration tests job failed with the following error:
Looks like something is wrong with the command for the |
@hackebrot btw, every commit of the form |
2796bcb
to
dd66b62
Compare
Rebased to fix merge conflicts |
@mozilla-services/context-services This should be ready for review now that @hackebrot fixed up the tests. |
fixes #120
BREAKING CHANGE: The configuration of providers is more free-form now, and the old settings will need updated.