Move most of min_requirements.py to the framework #86
Labels
No labels
approved
bug
dependencies
DO-NOT-MERGE
enhancement
good-first-issue
help-wanted
historical-reviewed
historical-reviewing
needs-adoption
needs-ci
needs-design-approval
needs-info
needs-preceding-pr
needs-review
needs-reviewer
needs-work
priority-high
priority-low
priority-medium
priority-scheduled
priority-very-high
single-reviewer
size-l
size-m
size-s
size-xs
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-Mbed-TLS/mbedtls-framework#86
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We want to keep
scripts/min_requirements.pyin each branch (3.6 and development), as that's the entry point that the CI is calling. But we want to move most of its code to the framework, as a module that can be imported. So, the end result would probably havescripts/min_requirements.pyin each branch looking likeand then the current body of
scripts/min_requirements.pywould be moved to the framework repo, inscripts/mbedtls_framework(as a non-executable file).In terms of history, we probably want to first completely move
min_requirements.pyto the framework (so that its full history is present there) and then add back the new stub in 3.6 and development.Question:
min_requirements.pyusesscripts/ci.requirements.txtandscripts/driver.requirements.txtwhich are on the samescriptsfolder and which are identical betweenmbedtls-3.6anddevelopment. Can I move those files as well to the framework? Or is better to keep a copy for each branch so that they are allowed to diverge in the future if needed?We're not entirely decided about the long-term future of the
.requirements.txtfiles but for now I think they'll remain in each branch until we've made a decision.The most technically correct approach would be to have each
requirements.txtline in the same repository that contains theimportline that provides this requirement. I'm not sure if we have to adhere to this strictly, but I suspect that in the medium term, we'll want to do it. Otherwise it's going to be a pain to manage requirements changes.I don't know if we want to keep the same separate
*.requirements.txtfiles going forward. I had initially separated them so that different types of users could stick to a minimal Python environment for their needs. But in practice there only seem to be two kinds of users:jsonschemaandjinja2.We don't necessarily have to do it that way. The Groovy code already calls
min_requirements.pyconditionally, because it (still) supports older branches without it. We could change it to also look inframework/scriptsbeforescripts. (And changeinfo.has_min_requirementsto a nullable string containing the path, I suppose.)Yeah, but I was hoping to simplify the Groovy code by removing the part where it still support older branches without it. (Even 2.28 has this script, and it's EOL very soon.)
More generally speaking, if we have to choose between making some python code a bit more complex or some groovy code a bit more complex, I'm inclined to put the complexity on the python side, because python is more familiar than groovy to most team members.
That said, I agree the way suggested here is not the only one, and we can absolutely revisit that decision in the future, but I wanted to pick something that allows us to move forward with little friction.