public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Matthew Carlson" <macarl@microsoft.com>
To: Laszlo Ersek <lersek@redhat.com>,devel@edk2.groups.io
Subject: Re: [edk2-devel] FW: Discussion: Basetools a separate repo
Date: Tue, 21 Apr 2020 17:05:55 -0700	[thread overview]
Message-ID: <23498.1587513955969647293@groups.io> (raw)
In-Reply-To: <47363f23-b979-c587-ed8c-0e894f13157f@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3249 bytes --]

Hey Lazlo,

This is a great point of discussion. Just to make sure we're on the same page, let me paraphrase your scenario. Two features at the same time or a improperly tested new feature were committed in BaseTools and a new release was spun out. EDK2 was updated to have it's pip-requirements.txt to point to the new version committed. In an ideal world, CI should catch the build break for MdeModulePkg but let's say it didn't catch it. Your scenario is, how do you go back to the previous version of basetools that EDK2 used or perhaps go the the version of BaseTools that last worked.

There are several great ways to do this. The release cadence of a pip based BaseTools hasn't really been discussed but one option was every feature in BaseTools would be a new release (this would be easy to do via pipelines). The exact versioning would need to be discussed but there would likely be some notion of breaking changes with major and minor version. This means that you would be able to easily pip install the basetools 1:1 with the feature commit history. In the scenario you mentioned, it would be easy to roll back to C0, just "pip install -r the previous requirements file". If a virtual environment is setup, this pip install would be entirely localized to the workspace the user is operating in. The git show command you mentioned would show the pip-requirements file. We would likely tag the pip_requirements file to a specific release of BaseTools and there might be another file like pip_suggestions that would allow for a looser version such as 0.3.x were any minor version in 0.3 is fine. That said, determining what exact basetools was used in a given build would likely be best accomplished through build artifacts. We have a BuildToolsReport generator that specifically does this ( https://github.com/tianocore/edk2/tree/master/BaseTools/Plugin/BuildToolsReport ) and it would generate a report that would detail the exact pip version used in that build. Without build artifacts, it grows a little bit more fuzzy, but you can have reasonable confidence since it would need to at least conform to pip suggestions and likely was on pip_requirements. To summarize, moving back in time is simple and even trivial with minimal delay to a developer (pip installs are usually sub-second procedures). There might even be a part of edksetup that might do the pip install for you if that's what the community wants.

Going to the next step, if you wanted to debug the BaseTools at C1, you might want to generate a diff of the basetools to try and see where the error and compare the diff. This I think better addresses your question of bisectability (not sure if that's a word). You could clone the basetools repo and do a pip install -e {path to basetools}. You would checkout the version in C1 pip_requirements and generate the diff between it and C0. Then you could apply changes or revert changes and test them locally as the basetools used in your edk2 repo will be the local repo you cloned. Once you're done, simply do a pip install of your pip_requirements file and the symlinks will be overwritten and things will go back to the way they were before.

Hopefully that addresses your concerns.

Thanks,
- Matthew Carlson

[-- Attachment #2: Type: text/html, Size: 3432 bytes --]

  reply	other threads:[~2020-04-22  0:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20 18:23 [edk2-devel] FW: Discussion: Basetools a separate repo Sean
2020-04-21  4:53 ` Purma, Kondal R
2020-04-21 15:49 ` Laszlo Ersek
2020-04-22  0:05   ` Matthew Carlson [this message]
2020-04-22 17:12     ` Laszlo Ersek
2020-04-22 19:30       ` Matthew Carlson
2020-04-24  9:27         ` Laszlo Ersek
2020-04-26  4:47           ` Purma, Kondal R
     [not found] <MWHPR21MB0799442E11A8E5DB4DE9E89ED1DA0@MWHPR21MB0799.namprd21.prod.outlook.com>
     [not found] ` <MWHPR21MB07998A4AD6385569A5703DE5D1DA0@MWHPR21MB0799.namprd21.prod.outlook.com>
     [not found]   ` <734D49CCEBEEF84792F5B80ED585239D5C4FEF0B@SHSMSX104.ccr.corp.intel.com>
     [not found]     ` <MW2PR2101MB0924A5AA30095DA7BB77CC0BE1D80@MW2PR2101MB0924.namprd21.prod.outlook.com>
     [not found]       ` <734D49CCEBEEF84792F5B80ED585239D5C500738@SHSMSX104.ccr.corp.intel.com>
2020-04-17  1:40         ` Ni, Ray
2020-04-20 12:49           ` [edk2-devel] " Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23498.1587513955969647293@groups.io \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox