-
Notifications
You must be signed in to change notification settings - Fork 0
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
Make use of Poetry parametrized #26
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## poetry #26 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 2
Lines 7 7
=========================================
Hits 7 7 ☔ View full report in Codecov by Sentry. |
442fedf
to
b5a3cca
Compare
This only occurs in the case of push and PR within the DevOps repo itself. But it's still necessary to cover this case, and it should use the Poetry- based variant, as this is based on the DevOps branch that already uses Poetry. Maybe a cleaner solution could be done with ENV variables? IDK
Thanks for doing the work! Renaming to We could also have different workflows, like |
Indeed the python versions were a main motivation for doing this now 🙃 I think with the flag solution we'll have even less places to update things. |
Since we decided to go with option 2. and call this branch |
The current "solution" of dealing with repos that use Poetry and also those that don't using two separate branches is not ideal. As we recently saw, any changes to the workflow in general have to be applied to both branches, which is cumbersome. I tried to let the workflow automatically decide which one to use based on the custom repo property that I included in most of our repos some time ago and has a Poetry flag. However, these (rather new in GH) properties are not directly accessible from the workflow, and getting them via the GH API and some creative JSON juggling might be doable but feels super hacky. Rather than that, I decided the best approach would be to add an optional parameter as a Poetry flag. This way, we can use the same workflow for all repos and simply pass a parameter if Poetry should be used.
To allow this change to be possible without breaking anything, I see two options:
poetry
branch and make the flag True by default, that way any repos currently using this on the poetry branch without any parameter will get the same behavior as before. Any non-poetry repos are unaffected, but can be slowly switched over to using thepoetry
branch with the flag set to False (which is somewhat confusing, "use poetry but actually don't", oh well).main
and don't merge it anywhere (which would mean closing the PR), and leave the flag to default to False (or not, doesn't actually make a functional difference in this case, as no current workflows would get there without manually changing the branch). Once all non-poetry repos are switched over to using this version as described in 1., the newmain
branch can be set as the default branch, and the oldmaster
discontinued. Similarly, once all poetry-based repos are using the newmain
branch with the flag True, we can discontinue the currentpoetry
branch.Which option do you prefer @hugobuddel ?