Re: [edk2-devel] Basetools as a pip module
Laszlo Ersek
On 09/02/20 02:49, Andrew Fish via groups.io wrote:
I've skimmed:On Sep 1, 2020, at 4:35 PM, Matthew Carlson <matthewfcarlson@...> wrote:Matthew, - the earlier discussion linked above (rooted at <https://edk2.groups.io/g/rfc/message/270>), - the even earlier comments in the "Discussion: Basetools a separate repo" thread on edk2-devel: https://edk2.groups.io/g/devel/message/57482 http://mid.mail-archive.com/734D49CCEBEEF84792F5B80ED585239D5C5019CE@SHSMSX104.ccr.corp.intel.com If I still understand / remember correctly, the way at least *I* would use the new feature is the following: - set up a new virtual python environment, - either install the new pip module "permanently" in the virtual environment, or else install it in "editable mode" from a git checkout (but *still* in the virtual environment) - build edk2 with the virtual environment active That is, for me anyway, the key distinguishing factor would be that I'd be in a python virtual environment where this particular python module existed / were installed. Does this answer question (3)? Because, in my case anyway, I wouldn't have to be *notified* about using the separate basetools repo vs. using the one resident in edk2 -- instead, I'd have to *activate* the separate basetools repo myself, as first step. So if that activation brings some queriable feature into the environment (sets a new environment variable or makes a new python package appear in the environment), then I think it's good enough -- the usual tools that I run then can query these artifacts. In short (I guess): commands should use the in-tree variant, unless I activate the virtual environment that has the basetools PIP module installed. I think it would be fine to require that, *if* someone intends to activate such a python virtual environment, *then* they do so *before* running "edksetup.sh". So "edksetup.sh" could check for the python env having the external basetools repo / module active. Hopefully that would be "early enough". Regarding the grace period -- questions (1) and (2): - The patches introducing the new feature to edk2 should be posted to the list. These patches should also add a warning to "edksetup.sh" that urges the developer to use the out-of-tree basetools repo / PIP module, in case "edksetup.sh" determines the current choice is the in-tree variant (that is, the virtual env is inactive, or does not contain the new PIP module) - While the patches are pending approval, BaseTools development is put on hold (no fixes, no features). - For every package (subsystem) listed in Maintainers.txt, in *both* edk2 *and* edk2-platfomrs, at least one "M" person is required to report back with a Tested-by, meaning that they built said package successfully with the new PIP module. - When this feedback is complete, the patch is merged, and the new PIP module becomes the default build system (see the edksetup.sh warning described above). - Optimally, the above (= comprehensive testing feedback, and merging) would occur *early* in the development cycle (just after the last stable tag). - Going forward, bug reports and feature requests are only addressed in the new (out-of-tree) module. If someone reports that they have to switch back, *temporarily*, for whatever reason, to the in-tree variant, and the in-tree variant no longer builds edk2 for them, then such issues can be resolved on a case-by-case basis, *after* the issue is reported. Point being, we make the out-of-tree system the new default because of the comprehensive and strict initial testing requirements (see above); after which the old system is preserved for a while only as a fallback. If the fallback proves lacking later on (but still during the grace period), then the community works to resolve the issue in one of two ways: either help the issue reporter eliminate their need to use the fallback in the first place, or backport the subject bugfix/feature to the fallback. - After the *next* stable release (which still contains both the fallback and the support for the out-of-tree PIP module), the fallback is removed. Ultimately this would make the grace period almost one full development cycle, in which cycle the new system should be tested comprehensively, and become the default, near the beginning of the period. This is just my proposal. Some of the other stewards are temporarily away; I'd suggest waiting for their feedback too. To finish up, I would like to highlight something from the earlier RFC: """ Contribution/Dev Process: Since this is a separate repo, it will follow a slightly different contribution and code review process. 1. Github PR process will be used for contributions and code review feedback a. The yet to be released “Tianocore PR archiver” will be used to send to a dedicated list for basetools patch review archive 2. PRs will only be committed if they keep linear history (no merge commits) 3. The PR review must be approved by at least 2 members of the basetools team (not including the author) 4. The PR must pass all automated checks a. Formatting/style b. Unit tests c. Code coverage (can’t commit change that would decrease overall %) d. DCO enforcement - https://probot.github.io/apps/dco/ e. See other python requirements from the Python coding standard 5. Github Issues will be used for non-security sensitive bugs/issues/feature requests """ Point (1a) is a pre-requisite for merging the edk2 patches! We cannot make the new system the default unless its development process is integrated with the github-to-email gateway (webhook). Thanks! Laszlo
|
|