From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web10.4031.1589589577725176239 for ; Fri, 15 May 2020 17:39:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=chX4hucx; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: erik.c.bjorge@intel.com) IronPort-SDR: h1ODpyDvv4OsoxNswqOmbE6QZKMmELJoK6Mc/7kSJuJiI3aGE4HDV0laRrpoBGRJK+p+3Dg4l4 9oy10s1j1NEA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2020 17:39:36 -0700 IronPort-SDR: 9LenC0WC7kIbSmwLQdC2w4Hg3uF0LJLltsvANPfz6ppr7/wB26VSjsDlZmopRPW9GJcYs1qtXP HjmfOTFygNlA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,397,1583222400"; d="scan'208";a="281385862" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga002.jf.intel.com with ESMTP; 15 May 2020 17:39:36 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 15 May 2020 17:39:36 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.173) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 15 May 2020 17:39:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MeVr4OYVg8aB/hcJZohIcEPLFxKskwA9VFP6fx/QmV7m8ywfzy0VImUs0gTVYQ1BSVBF87/9QT87XAB/EUeueBc1HfixEHvEFHWCZAsaPSlFt4SqVcxTXIdkmZ462eWfXvcv536RzJvhR8QKzfjqjusFBEcFGkopHTkgw7jcN1WqeyrIvXzLBCOWbAwP8qVwYQ/NugNNG7Vv5HN2PhUnD/UQ0NfFqrNGQ7B3mEz3ejxIfqSopPvI647ylfX07sTzTUBKKosXIsjbekj2aRean66GLICmzhtBSurW3Vsck2tWKqM7Aun5tKQo1UXLbxkGd4vrO2WWSFfXLDDcEFvqMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oF/y1H5wBQDCg7sBMP2OtSF/6OTTHvOXpGovR8XEpuA=; b=mtUNguWV92rELWfNM4u2o9t59ryVjRXKiKqrTcRYq1z/Nxlq/QmYUHLaAk77OkDos2INIlAZ3pwmTZlBu/gTDLSAUbAMteOg0fibg/Hb5AZjEzi0O4BauJDAi4li/F0/vyq3W+pz1gShn2rCxi8aYpmkUz+r/HTgHuJLnKYd+H3KUhvEYbxLWQ4N6gxRLmsh+7mYSynwH9+GkKxruJlKpk0Fbfrl0hP+XMvVCy0gqtvy+UVMMl0H+rA3lz+/g/cKZnjRvagD/OLVXe1D5q+ZPMQn/a8Pm3SY6uH0kAVn4i55yuDvycsjvk1ltpDo7I9cOL8hbRJ/lhizpym9mpJ9pw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oF/y1H5wBQDCg7sBMP2OtSF/6OTTHvOXpGovR8XEpuA=; b=chX4hucx2GWS9sMnpEM0LcT51JU92kNCElcW5v1ND1U+7ECM/oYswSqEMn/JW00XChh5ObujgR62v8jfLR2//W88Zs2ZLX2j1x/myabPoRcM55rb2zv8w/XH5Qqhdas4xtXBZZ/XJFva9GTKjW7lMTrd4ht4snYbhV8ticsq/p8= Received: from SA0PR11MB4557.namprd11.prod.outlook.com (2603:10b6:806:96::7) by SA0PR11MB4654.namprd11.prod.outlook.com (2603:10b6:806:98::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.26; Sat, 16 May 2020 00:39:34 +0000 Received: from SA0PR11MB4557.namprd11.prod.outlook.com ([fe80::1543:41a2:5e33:4932]) by SA0PR11MB4557.namprd11.prod.outlook.com ([fe80::1543:41a2:5e33:4932%3]) with mapi id 15.20.2979.033; Sat, 16 May 2020 00:39:34 +0000 From: "Bjorge, Erik C" To: "Desimone, Ashley E" , "devel@edk2.groups.io" CC: "Desimone, Nathaniel L" , "Pandya, Puja" , Bret Barkelew , "Agyeman, Prince" Subject: Re: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Improve clone error handling. Thread-Topic: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Improve clone error handling. Thread-Index: AQHWKxLLd+IFwymIGUGvpa9+uTgk4Kip3ryw Date: Sat, 16 May 2020 00:39:33 +0000 Message-ID: References: <20200515234412.18064-1-ashley.e.desimone@intel.com> In-Reply-To: <20200515234412.18064-1-ashley.e.desimone@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.2.0.6 dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.52.206] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4aa0695d-7670-467f-af3c-08d7f9319ab7 x-ms-traffictypediagnostic: SA0PR11MB4654: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-forefront-prvs: 040513D301 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: p2szVbU8Bq37eR7Y45LKMRxSvvY0Bj4oVr+oCjUxn+RNo5z6g9GJmGKElEyldwOqttFxvU4xXVi3lhLUvHRQmTs+5PaoLccmZ8S15gMH2pEUYFh+1wba1ArwUvmWUN3zwct8CB1PXbmpD8WtBqYBxAkqrbrU53FkBBFwULKvOm2OaS2mTkfDDGxFfbdE8euO2F1zuKO3ua0nfW9zyShUTkmQ3tsGWf+ONIsm6PAWISUw9em/sOvypsKmv3+Nzu5e6JwxL3x4mqiQXkU4Fr0Fp1PaLi2bc8eHaobqtfK8cT/uIE+D2Gk/6jkQjBMdgrg5XHKPRlK+sXJ1WobjLLWCYri1LqHDUROddc5dACKSoS2vWsOsTt4vycbpFKzS6toXUab97+q5zSbjj1EzqCKusg63IJNxNzrpf1fKCQ7Xqsk3FBtH6YUuK17ay+j/TOiI x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA0PR11MB4557.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(366004)(39860400002)(396003)(346002)(136003)(376002)(55016002)(8936002)(8676002)(9686003)(2906002)(478600001)(316002)(4326008)(107886003)(26005)(76116006)(7696005)(53546011)(86362001)(71200400001)(5660300002)(6506007)(33656002)(66446008)(54906003)(66476007)(66946007)(110136005)(186003)(66556008)(64756008)(52536014);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: s4KXYahCnIZsq9wYC+eE7W7Sf1e0Nj59h+dn16XdiPwxFpr+9c4Goy27EyxEwiDeY5U7eqYsGl2fJb2BqFoxR3ib7Xlg+6UUh9URWQRhBj7cmCCfti6iBtgydlY3XIYCt04qBDL8SggvmzWBMQrbqOjs7sQe+tfAnNuOyG0aRQw75cN71dbwAL1QaQcMeRl83Ym75cYC8qz0rDwV6/hqt7Kbr5LYVCFw6Ow30vwQ6mBD25a2n94B15Nvj5XueDMl7KG3xQhzHn3RXDqo8RXHzoz66VjyqVlspg+8pRcytITQL9UxndO+Ve/kp2huxlzAgnSi9uG+afoyQPrPesXBseLTe5n647Z0t/u/LE8A0x8pAsfTFYj86lpu1N5VT0oWnQkP1He6/VFKgvMwUVPnfsM+CYYaUnawRj/Gg9KMblbbFh1aivLcTidrgrdXA+IyrOS6hCySdAxrS/e5uOcDHQWlxjfWrUdvDqAljJIvfZw= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 4aa0695d-7670-467f-af3c-08d7f9319ab7 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 May 2020 00:39:33.8307 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: bN090iXjFqXeE7VMPXz60Fq2pEnmBBMKk4NI91QntAKFkiltUkl/zAqf29B3COxtP3J7I/0NjmnUBNJ2vg6hRg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4654 Return-Path: erik.c.bjorge@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Erik Bjorge -----Original Message----- From: Desimone, Ashley E =20 Sent: Friday, May 15, 2020 4:44 PM To: devel@edk2.groups.io Cc: Desimone, Nathaniel L ; Pandya, Puja ; Bjorge, Erik C ; Bret Barke= lew ; Agyeman, Prince Subject: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Improve clone error handli= ng. Raise an invalid parameters exception when a project is not found. Signed-off-by: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya Cc: Erik Bjorge Cc: Bret Barkelew Cc: Prince Agyeman --- edkrepo/commands/clone_command.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/edkrepo/commands/clone_command.py b/edkrepo/commands/clone_com= mand.py index 179aaf7..3f2e6e1 100644 --- a/edkrepo/commands/clone_command.py +++ b/edkrepo/commands/clone_command.py @@ -17,6 +17,7 @@ from edkrepo.common.common_repo_functions import clone_re= pos, sparse_checkout, v from edkrepo.common.common_repo_functions import u= pdate_editor_config, combinations_in_manifest from edkrepo.common.common_r= epo_functions import write_included_config, write_conditional_include from= edkrepo.common.edkrepo_exception import EdkrepoInvalidParametersException,= EdkrepoManifestInvalidException +from edkrepo.common.edkrepo_exception import=20 +EdkrepoManifestNotFoundException from edkrepo.common.humble import CLONE_INVALID_WORKSPACE, CLONE_INVALID_P= ROJECT_ARG, CLONE_INVALID_COMBO_ARG from edkrepo.common.humble import SPAR= SE_CHECKOUT, CLONE_INVALID_LOCAL_ROOTS from edkrepo.common.workspace_maint= enance.workspace_maintenance import case_insensitive_single_match @@ -81,12= +82,15 @@ class CloneCommand(EdkrepoCommand): os.makedirs(workspace_dir) =20 cfg, user_cfg, conflicts =3D list_available_manifest_repos(config[= 'cfg_file'], config['user_cfg_file']) - manifest_repo, source_cfg, global_manifest_path =3D find_project_i= n_all_indices(args.ProjectNameOrManifestFile, - config['= cfg_file'], - config['= user_cfg_file'], - PROJ_NOT= _IN_REPO.format(args.ProjectNameOrManifestFile), - SOURCE_M= ANIFEST_REPO_NOT_FOUND.format(args.ProjectNameOrManifestFile), - args.sou= rce_manifest_repo) + try: + manifest_repo, source_cfg, global_manifest_path =3D find_proje= ct_in_all_indices(args.ProjectNameOrManifestFile, + config= ['cfg_file'], + config= ['user_cfg_file'], + PROJ_N= OT_IN_REPO.format(args.ProjectNameOrManifestFile), + SOURCE= _MANIFEST_REPO_NOT_FOUND.format(args.ProjectNameOrManifestFile), + args.s= ource_manifest_repo) + except EdkrepoManifestNotFoundException: + raise=20 + EdkrepoInvalidParametersException(CLONE_INVALID_PROJECT_ARG) =20 # If this manifest is in a defined manifest repository validate th= e manifest within the manifest repo if manifest_repo in cfg: -- 2.16.2.windows.1