New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 860072 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 26
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Feature



Sign in to add a comment

chromitize cros_generate{_stateful}_update_payload

Project Member Reported by ahass...@chromium.org, Jul 3

Issue description

we need to eventually add a lot of changes to cros_generate_update_payload and cros_generage_stateful_update_payload for the DLCs and also we need to enhance it for update payload major version 2. Do you guys think it would be a good idea to chromitize these two scripts to make it easier do changes in them. Coding and unittesting in python is much easier than bash :)
 
Components: Infra>Client>ChromeOS>Build
all these scripts should be converted to Python and moved to chromite, so if you have a good reason to do so now, let's go for it
Cc: -tbrindus@chromium.org
Owner: tbrindus@chromium.org
Thanks Mike, We're on it :)
Status: Assigned (was: Untriaged)
Project Member

Comment 5 by bugdroid1@chromium.org, Jul 27

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/3e03eba0a7e24ca8ca0a0d616e4801b38a2260e7

commit 3e03eba0a7e24ca8ca0a0d616e4801b38a2260e7
Author: Tudor Brindus <tbrindus@chromium.org>
Date: Fri Jul 27 19:12:59 2018

cros_generate_update_payload: Convert to chromite

This is a straightforward translation of the previous Bash
cros_generate_update_payload script. There are a number of low-hanging
fruit in terms of cleaning it up, but those will be the target of a
future CL.

BUG= chromium:860072 
TEST=output matches old cros_generate_update_payload on same inputs;
  cros flash works

Change-Id: I2bf38a158d280e7f2d06cbed79ec5802415c7507
Reviewed-on: https://chromium-review.googlesource.com/1145683
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Tudor Brindus <tbrindus@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/3e03eba0a7e24ca8ca0a0d616e4801b38a2260e7/cbuildbot/commands.py
[add] https://crrev.com/3e03eba0a7e24ca8ca0a0d616e4801b38a2260e7/scripts/cros_generate_update_payload.py
[add] https://crrev.com/3e03eba0a7e24ca8ca0a0d616e4801b38a2260e7/bin/cros_generate_update_payload
[add] https://crrev.com/3e03eba0a7e24ca8ca0a0d616e4801b38a2260e7/scripts/cros_generate_update_payload_unittest.py
[modify] https://crrev.com/3e03eba0a7e24ca8ca0a0d616e4801b38a2260e7/lib/constants.py
[add] https://crrev.com/3e03eba0a7e24ca8ca0a0d616e4801b38a2260e7/scripts/cros_generate_update_payload_unittest

Project Member

Comment 6 by bugdroid1@chromium.org, Jul 31

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/bdec1f96aee82b20e3c9c427cdaab8b6642a907f

commit bdec1f96aee82b20e3c9c427cdaab8b6642a907f
Author: Tudor Brindus <tbrindus@google.com>
Date: Tue Jul 31 06:08:26 2018

cros-devutils: Remove cros_generate_update_payload from ebuild

This commit removes cros_generate_update_payload from the ebuild, since
it has been replaced by a chromite version.

CQ-DEPEND=CL:1145683
BUG= chromium:860072 
TEST=package builds

Change-Id: I8c73a55276f886fcda8e593547dfe85414cd390b
Reviewed-on: https://chromium-review.googlesource.com/1145908
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Tudor Brindus <tbrindus@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>

[modify] https://crrev.com/bdec1f96aee82b20e3c9c427cdaab8b6642a907f/chromeos-base/cros-devutils/cros-devutils-9999.ebuild

Project Member

Comment 7 by bugdroid1@chromium.org, Aug 1

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/ad7acbeee774e7e45aa8531a631c363f4bac17ed

commit ad7acbeee774e7e45aa8531a631c363f4bac17ed
Author: Richard Barnette <jrbarnette@chromium.org>
Date: Wed Aug 01 00:57:23 2018

Revert "cros-devutils: Remove cros_generate_update_payload from ebuild"

This reverts commit bdec1f96aee82b20e3c9c427cdaab8b6642a907f.

Reason for revert: breaks the PFQ

BUG=chromium:869691

Original change's description:
> cros-devutils: Remove cros_generate_update_payload from ebuild
> 
> This commit removes cros_generate_update_payload from the ebuild, since
> it has been replaced by a chromite version.
> 
> CQ-DEPEND=CL:1145683
> BUG= chromium:860072 
> TEST=package builds
> 
> Change-Id: I8c73a55276f886fcda8e593547dfe85414cd390b
> Reviewed-on: https://chromium-review.googlesource.com/1145908
> Commit-Ready: Amin Hassani <ahassani@chromium.org>
> Tested-by: Tudor Brindus <tbrindus@chromium.org>
> Reviewed-by: Amin Hassani <ahassani@chromium.org>

Bug:  chromium:860072 
Change-Id: I2b9d521ca3a073df0ba3e47064ad4e91e3fc9168
Reviewed-on: https://chromium-review.googlesource.com/1157465
Reviewed-by: Richard Barnette <jrbarnette@google.com>
Tested-by: Richard Barnette <jrbarnette@google.com>

[modify] https://crrev.com/ad7acbeee774e7e45aa8531a631c363f4bac17ed/chromeos-base/cros-devutils/cros-devutils-9999.ebuild

Cc: tbrindus@chromium.org
Owner: ahass...@chromium.org
Project Member

Comment 9 by bugdroid1@chromium.org, Aug 15

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/crostestutils/+/05c3cbf27b34eb60f87b04e70fed67208d82ffa1

commit 05c3cbf27b34eb60f87b04e70fed67208d82ffa1
Author: Amin Hassani <ahassani@chromium.org>
Date: Wed Aug 15 23:37:18 2018

cros_generate_test_payload.py: start devserver in non-sudo mode

Starting the devserver in sudo excludes the path to chromite binaries. devserver
doesn't need to be run as sudo specially for the purpose of generating payloads.

BUG= chromium:860072 
TEST=betty-chrome-pfq-tryjob

Change-Id: Iccf114cb5cede766bb64a9c66b68834152fb9a9a
Reviewed-on: https://chromium-review.googlesource.com/1174952
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/05c3cbf27b34eb60f87b04e70fed67208d82ffa1/generate_test_payloads/cros_generate_test_payloads.py

Project Member

Comment 10 by bugdroid1@chromium.org, Aug 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/9b1d54d048bb8eba44cf0af565f734214f35e8d0

commit 9b1d54d048bb8eba44cf0af565f734214f35e8d0
Author: Amin Hassani <ahassani@chromium.org>
Date: Thu Aug 16 07:30:13 2018

Reland "cros-devutils: Remove cros_generate_update_payload from ebuild"

This reverts commit ad7acbeee774e7e45aa8531a631c363f4bac17ed.

This patch basically removes the bash cros_generate_update_payload from
being installed in favor of the chromitized version of it. The chromitized
version is already being used. This patch removes any use case of the bash
version entirely.

Reason for revert: <Fixed the root cause in CL:1174952>

BUG=chromium:869691
BUG= chromium:860072 
TEST=tryjob
CQ-DEPEND=CL:1174952

Change-Id: I1b73fa790877125198c917490ba30edfe765e773
Reviewed-on: https://chromium-review.googlesource.com/1173085
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/9b1d54d048bb8eba44cf0af565f734214f35e8d0/chromeos-base/cros-devutils/cros-devutils-9999.ebuild

Project Member

Comment 11 by bugdroid1@chromium.org, Aug 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/5d16bfabefb03fe9de78ce98c28bb963d30af6c7

commit 5d16bfabefb03fe9de78ce98c28bb963d30af6c7
Author: Amin Hassani <ahassani@chromium.org>
Date: Fri Aug 17 18:18:08 2018

Revert "Reland "cros-devutils: Remove cros_generate_update_payload from ebuild""

This reverts commit 9b1d54d048bb8eba44cf0af565f734214f35e8d0.

Reason for revert: <It broke cros flash>

Original change's description:
> Reland "cros-devutils: Remove cros_generate_update_payload from ebuild"
>
> This reverts commit ad7acbeee774e7e45aa8531a631c363f4bac17ed.
>
> This patch basically removes the bash cros_generate_update_payload from
> being installed in favor of the chromitized version of it. The chromitized
> version is already being used. This patch removes any use case of the bash
> version entirely.
>
> Reason for revert: <Fixed the root cause in CL:1174952>
>
> BUG=chromium:869691
> BUG= chromium:860072 
> TEST=tryjob
> CQ-DEPEND=CL:1174952
>
> Change-Id: I1b73fa790877125198c917490ba30edfe765e773
> Reviewed-on: https://chromium-review.googlesource.com/1173085
> Commit-Ready: Amin Hassani <ahassani@chromium.org>
> Tested-by: Amin Hassani <ahassani@chromium.org>
> Reviewed-by: Mike Frysinger <vapier@chromium.org>

BUG= chromium:875068 

Change-Id: I9ea303fd13ad7a629fb3cfa285d8bbd1fa726287
Reviewed-on: https://chromium-review.googlesource.com/1178942
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>

[modify] https://crrev.com/5d16bfabefb03fe9de78ce98c28bb963d30af6c7/chromeos-base/cros-devutils/cros-devutils-9999.ebuild

Project Member

Comment 12 by bugdroid1@chromium.org, Sep 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/57988b451c5ca7db1f6321aecc90fb7af664b838

commit 57988b451c5ca7db1f6321aecc90fb7af664b838
Author: Amin Hassani <ahassani@chromium.org>
Date: Tue Sep 18 21:04:26 2018

dev_server_wrapper.py: Add chromite bin directory when running devserver

Devserver needs chromite's bin directory in order to run
cros_generate_update_payload. But at the same time devserver is run as sudo and
that directory does not exist in sudo. This patch adds the chromite's bin
directory to the path of the devserver.

BUG= chromium:860072 
TEST=cros flash runs from inside and outside the chroot

Change-Id: Ifa4643170797bf35d8af776fc65598219c587924
Reviewed-on: https://chromium-review.googlesource.com/1228257
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/57988b451c5ca7db1f6321aecc90fb7af664b838/lib/dev_server_wrapper.py

Project Member

Comment 13 by bugdroid1@chromium.org, Sep 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/0086f7aa84002656ee8af620d0fa2dad33b061ef

commit 0086f7aa84002656ee8af620d0fa2dad33b061ef
Author: Tudor Brindus <tbrindus@chromium.org>
Date: Wed Sep 19 22:40:44 2018

cros_generate_stateful_update_payload: Convert to chromite

This commit chromitizes cros_generate_stateful_update_payload, and adds
some unittests.

BUG= chromium:860072 
TEST=output matches old cros_generate_stateful_update_payload on same inputs

Change-Id: If57cafde887b84b26619fccfb65350bdec851c05
Reviewed-on: https://chromium-review.googlesource.com/1147616
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[add] https://crrev.com/0086f7aa84002656ee8af620d0fa2dad33b061ef/bin/cros_generate_stateful_update_payload
[add] https://crrev.com/0086f7aa84002656ee8af620d0fa2dad33b061ef/scripts/cros_generate_stateful_update_payload_unittest
[add] https://crrev.com/0086f7aa84002656ee8af620d0fa2dad33b061ef/scripts/cros_generate_stateful_update_payload_unittest.py
[modify] https://crrev.com/0086f7aa84002656ee8af620d0fa2dad33b061ef/cbuildbot/commands.py
[add] https://crrev.com/0086f7aa84002656ee8af620d0fa2dad33b061ef/scripts/cros_generate_stateful_update_payload.py

Project Member

Comment 14 by bugdroid1@chromium.org, Sep 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/3ce9d0909b3ef24c02a54ec2f59c7fb18e60035e

commit 3ce9d0909b3ef24c02a54ec2f59c7fb18e60035e
Author: Amin Hassani <ahassani@chromium.org>
Date: Wed Sep 19 22:40:23 2018

cros-devutils: Remove cros_generate_update_payload from ebuild

This reverts commit 5d16bfabefb03fe9de78ce98c28bb963d30af6c7.

This patch basically removes the bash cros_generate_update_payload from
being installed in favor of the chromitized version of it. The chromitized
version is already being used. This patch removes any use case of the bash
version entirely.

BUG= chromium:860072 
TEST=tryjob
TEST=cros flash from inside and outside chroot
CQ-DEPEND=CL:1228257

Change-Id: I8363e0cfaee0e6b9b20aeb244548785295bdcecb
Reviewed-on: https://chromium-review.googlesource.com/1228734
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/3ce9d0909b3ef24c02a54ec2f59c7fb18e60035e/chromeos-base/cros-devutils/cros-devutils-9999.ebuild

Project Member

Comment 15 by bugdroid1@chromium.org, Sep 21

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/b98fbec3c6744cf450397671b0ee86a6afb8a1d1

commit b98fbec3c6744cf450397671b0ee86a6afb8a1d1
Author: Tudor Brindus <tbrindus@google.com>
Date: Fri Sep 21 20:34:13 2018

cros-devutils: Remove cros_generate_stateful_update_payload from ebuild

This commit removes cros_generate_stateful_update_payload from the
ebuild, since it has been replaced by a chromite version.

BUG= chromium:860072 
TEST=package builds

Change-Id: I1db1b980d213bc2d65b3068f33565e9ec120f2fc
Reviewed-on: https://chromium-review.googlesource.com/1147743
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>

[modify] https://crrev.com/b98fbec3c6744cf450397671b0ee86a6afb8a1d1/chromeos-base/cros-devutils/cros-devutils-9999.ebuild

Project Member

Comment 16 by bugdroid1@chromium.org, Sep 26

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/dev-util/+/835543821d9105b72da9fabf1f3df2acd53f8b2b

commit 835543821d9105b72da9fabf1f3df2acd53f8b2b
Author: Tudor Brindus <tbrindus@google.com>
Date: Wed Sep 26 17:32:31 2018

cros_generate_update_payload: Remove in favor of new chromite version

This commit removes cros_generate_update_payload in favor of the new
chromitized version available.

CQ-DEPEND=CL:1145908
BUG= chromium:860072 
TEST=precq

Change-Id: Ia333df642f78f76fe311e30c7ab3e9bdcb4e55e9
Reviewed-on: https://chromium-review.googlesource.com/1145771
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>

[delete] https://crrev.com/d69ceef729eaa0510c3bf34f2eab2612eb4cdde9/host/cros_generate_update_payload

Project Member

Comment 17 by bugdroid1@chromium.org, Sep 26

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/dev-util/+/825534a49bd5f9730cf4e6e5d511ce51f22879b9

commit 825534a49bd5f9730cf4e6e5d511ce51f22879b9
Author: Tudor Brindus <tbrindus@google.com>
Date: Wed Sep 26 17:32:31 2018

cros_generate_stateful_update_payload: Remove in favor of new chromite version

This commit removes cros_generate_stateful_update_payload in favor of
the new chromitized version available.

CQ-DEPEND=CL:1147743
BUG= chromium:860072 
TEST=precq

Change-Id: I6799fd56e2fce1971a059abfddfde0bf4bd4675c
Reviewed-on: https://chromium-review.googlesource.com/1147745
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>

[delete] https://crrev.com/835543821d9105b72da9fabf1f3df2acd53f8b2b/host/cros_generate_stateful_update_payload

Labels: OS-Chrome
Status: Fixed (was: Assigned)

Sign in to add a comment