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

How to catch dev dependencies that actually need to be included in the distributed presentations of Meltano? #6277

Closed
edgarrmondragon opened this issue Jun 23, 2022 · 5 comments · Fixed by #6395

Comments

@edgarrmondragon
Copy link
Collaborator

edgarrmondragon commented Jun 23, 2022

Just got bit by this with packaging in #6276:

It's a transitive dependency required by tox, but tox is only a dev dependency. So, in CI tests, things look good because dev dependencies are installed by poetry install. But, when meltano is installed from an upstream source or by another tool like pipx, which is the case in end-to-end tests here (pipx install ..), then the transitive dev dependency packaging is not installed and errors are encountered: https://gitlab.com/meltano/legacy-ci/meltano/-/jobs/2632994539#L1237.

$ meltano add orchestrator airflow
2022-06-23T19:10:30.061252Z [info     ] Environment 'dev' is active
No module named 'packaging'

I guess one easy way to ensure we don't fall in that scenario is to have tests that don't rely on Poetry to install Meltano.

@z3z1ma
Copy link
Contributor

z3z1ma commented Jun 23, 2022

Export the lockfile from from poetry to pin deps in a requirements.txt as part of the release process? 🤔

@edgarrmondragon
Copy link
Collaborator Author

edgarrmondragon commented Jun 23, 2022

Export the lockfile from from poetry to pin deps in a requirements.txt as part of the release process? 🤔

@z3z1ma Yeah, I agree that poetry export is the way to go but it probably has to be done only during our testing stage, otherwise we'd have to do it with poetry export --dev for sdist and wheels, which is not ideal because that would include all dev dependencies.

I particularly like the nox + poetry export --dev approach where the exported requirements.txt is used as a pip constraints file to install only dev dependencies specifically required by the dev task.

@aaronsteers
Copy link
Contributor

@pandemicsyn and @edgarrmondragon - What do you think of this being a part of

At least when running in CI, we could use a pipx-installed version of Meltano instead of the Poetry-installed one.

@pandemicsyn
Copy link
Contributor

At least when running in CI, we could use a pipx-installed version of Meltano instead of the Poetry-installed one.

Probably a better discussion for #6218, but sounds fine - at some point we'd probably want a test mirroring the contributor guide which might end up using poetry.

@edgarrmondragon
Copy link
Collaborator Author

The SDK had this exact issue in the v0.6.0 release so I went ahead and started a PR with nox-poetry, which runs tasks against the installed form of the package using the wheel.

meltano/sdk#780

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants