-
Notifications
You must be signed in to change notification settings - Fork 89
Test packages against their deployment environment #1016
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
base: main
Are you sure you want to change the base?
Conversation
… for testing in this slightly different scenarios
It looks like this is working: This run uses this branch with the new
The last point is exactly the thing we want to avoid. If that were |
Problem
We currently test packages against
main
for all dbt- managed packages in all scenarios, whether it's scheduled tests, PR checks, or publishing checks. Packages in this repository are installed locally, and packages likedbt-common
anddbt-core
are installed frommain
from their repositories. This makes sense for scheduled tests and potentially for PR checks. However it leaves a gap when deploying. It is too easy to introduce a dependency across packages and not realize it. This leads to a scenario where the latest versions on PyPI are broken until all of the packages are released. Even if the gap is only a day, this could break Core users who are always on latest. We should be aware of when we do this, and if possible, prevent it from happening.Solution
There are three types of dependencies:
There are five scenarios:
main
main
main
main
main
main
PyPI
PyPI
Open questions:
To accomplish this, I added two new hatch environments,
ci
andcd
, to each package to install the proper dependencies for testing in these slightly different scenarios. This also allowed the dependencies to shrink a bit in each environment.ddtrace
is not needed locally whilepytest-dotenv
andpre-commit
are not needed in GHA.