-
ProblemCurrently the criteria for emitting docs, publishing Docker images and deploying to staging is as follows: Source: https://docs.openverse.org/meta/ci_cd/proof_of_functionality.html DescriptionThis approach was taken because
This is not 100% ideal because
DiscussionThe goal is to determine answers to these questions:
ReferenceThis concern was raised by @sarayourfriend in a review for #1001. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Things to consider: API and ingestion server unit tests are fast. They wouldn't add much more than a minute. Hardly worth skipping, in my opinion, if we assume they're actually useful tests. While Playwright tests are flaky, frontend unit tests should not be. And frontend unit tests, when well written, exercise the core functionality of our components through semi-real user interaction via testing-library. These should not be skipped. They do not take that much time to run and would not delay deployment more than a couple of minutes. That being said, I don't think skipping Playwright tests is good either, assuming again that we wrote those tests for a reason and that they validate something real. If a particular test is flaky then we should fix it ASAP or skip it or even remove it if we don't think it's a useful test (see #1824). In short: why have tests if we don't rely on them to verify the application works before deploying it? Additionally: not deploying a given staging PR implies that people are not testing their changes in staging right away. That reduces confidence in anyone who subsequently wants to deploy production. Is the assumption that features in staging may be untested in a live environment? That's not a good assumption and I personally do not want to be responsible for deploying code written by others, reviewed by others, but then subsequently untested by anyone in a live environment. If that release to production starts to fail, suddenly I'm responsible for rolling back code that was never tested in a live environment. Rolling back already isn't fun, but rolling back preventable errors is even less fun. Furthermore, if staging sometimes randomly doesn't deploy even though the PR passed, and that particular PR that was merged was a critical PR that calls for an immediate production deployment after verification in staging, we've just put ourselves in a tidy little corner. We'd need to manually deploy staging to the new image. Anyway, that's to say: if our test suite is flaky, that is a critical issue that demands immediate attention. Unless the test suite isn't fully useful. And if that's the case, then we should delete the tests. Alternatively, if they're unfixably flaky but still useful, run them as "nightly" tests with plenty of retries. |
Beta Was this translation helpful? Give feedback.
-
I think the current approach works works well for the API, ingestion server, and catalog. As Sara says, those tests are reasonably fast and there's no reason we shouldn't run them. I don't have a strong opinion on the frontend, but I agree that if we don't want playwright to be required for deployment, we should have it run nightly. |
Beta Was this translation helpful? Give feedback.
-
@dhruvkb any news on a resolution for this discussion? It is marked high priority but has been open and remains unresolved for quite some time. Is there additional input you're waiting on from anyone or is more clarification needed to identify the final conclusion from our discussion? |
Beta Was this translation helpful? Give feedback.
PR #2275 is up.