Skip to content

Ubuntu/devel#303

Merged
blackboxsw merged 22 commits into
canonical:ubuntu/develfrom
blackboxsw:ubuntu/devel
Apr 3, 2020
Merged

Ubuntu/devel#303
blackboxsw merged 22 commits into
canonical:ubuntu/develfrom
blackboxsw:ubuntu/devel

Conversation

@blackboxsw
Copy link
Copy Markdown
Collaborator

@blackboxsw blackboxsw commented Apr 2, 2020

This branch is created for release of 3 feature/bug fixes into focal.

In order to release, we need to re-apply the already released cherry-pick for ec2 full networking because we droppped to fix daily recipe builds. Then we add our other new cherry-picks to that list for this second cherry pick release.

We can't use new-upstream-snapshot --update-patches-only because that presupposes that our next release will be performing a full new-upstream-snapshot, which is untrue during feature freeze.

Instead we manually perform the following:

cat > picks.sh <<EOF
#!/bin/bash
cd /tmp
git clone git@github.com:canonical/cloud-init.git
cd cloud-init
git checkout origin/ubuntu/devel -b ubuntu/devel

# re-apply previously released cherry picks
# ec2: render network on all NICs and add secondary IPs as static (#114)
# NOTE: interactively drop the comment dropped ec2-secondary-nics-cpick
cherry-pick 6600c642

# New cherry picks for 2nd cherry pick release
# move to pytest for test runs
cherry-pick 986f37b01
# Netplan over ENI prioritization
cherry-pick  4fb6fd8a046a6bcce01216c386f3b691a2c466bb

# Azure cc_disk_setup dictkeys runtime error
cherry-pick 04771d75a8670f07ae4c75b5892e3b795e9d1a07

# Picks related to support of dropping underscores from hostnames
cherry-pick c5e949c02a1d5226ae9b1cb39846db19d223c6c2
cherry-pick 2566fdbee06cf5708cfcd988a65fb81cdf794dbf
cherry-pick 4f825b3e6d8fde5c239d29639b04d2bea6d95d0e
cherry-pick c478d0bff412c67280dfe8f08568de733f9425a1
cherry-pick 1bbc4908ff7a2be19483811b3b6fee6ebc916235


# network_state ignoring 'renderer' key from configv2 PR #306
cherry-pick 09fea85fd1f6fd944f4cdd8b97e283090178ae88


# Need to fix 4fb6fd8a as test relied on unrelated bsd changes
quilt push -a
quilt new fix-cpick-4fb6fd8a-net-ubuntu-focal-prioritize-netplan-over-eni.patch
quilt edit tests/unittests/test_render_cloudcfg.py

# delete "openbsd", "netbsd" from line 12
# drop last unit test line 43 TO the end
quilt refresh
quilt header --dep3 -e
# content of edited dep3:
# Description: Drop netbsd and openbsd from cherry pick tests
#  Support for netbsd and openbsd is on in upstream until new-upstream-snapshot.
# Author: Chad Smith <chad.smith@canonical.com>
# Origin: backport
# Forwarded: not-needed
# Last-Update: 2020-04-03
# ---
# This patch header follows DEP-3: http://dep.debian.net/deps/dep3/


quilt pop -a
git add debian/patches

vi debian/changelog
# add the following line
# * d/patches: redact openbsd netbsd from tests until new-upstream-snapshot
#   - fix-cpick-4fb6fd8a-net-ubuntu-focal-prioritize-netplan-over-eni
git commit -am 'add debian/patches to redact openbsd/netbsd from unit tests'

# release with all cpicks to focal
dch --release --distribution=focal
# NOTE: interactively change version 0ubuntu3 -> 0ubuntu3
git commit -m "releasing cloud-init version 20.1-10-g71af48df-0ubuntu3" debian/changelog
EOF
bash ./picks.sh
git push <your_origin> ubuntu/devel

@raharper
Copy link
Copy Markdown
Collaborator

raharper commented Apr 2, 2020

Where are we keeping the list of cherry picks? I wonder if we should have that as a file in the release branch. Otherwise someone repeating your steps might get that wrong?

@raharper
Copy link
Copy Markdown
Collaborator

raharper commented Apr 2, 2020

OK. I've reproduced your branch with:

git checkout ubuntu/devel
git fetch upstream
git reset --hard upstream/ubuntu/devel
cherry-pick 6600c64
cherry-pick  4fb6fd8
cherry-pick 04771d7
cherry-pick c5e949c
cherry-pick 2566fdb
cherry-pick 4f825b3
cherry-pick c478d0b
cherry-pick 1bbc490
dch --release --distribution=focal
git commit -m "releasing cloud-init version 20.1-10-g71af48df-0ubuntu11" debian/changelog
fetch blackboxsw
git diff blackboxsw/ubuntu/devel HEAD

% git diff blackboxsw/ubuntu/devel HEAD
diff --git a/debian/changelog b/debian/changelog
index d56c757a4..d75ef1ef1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,7 +15,7 @@ cloud-init (20.1-10-g71af48df-0ubuntu11) focal; urgency=medium
   * cherry-pick 1bbc4908: distros: drop leading/trailing hyphens from
     mirror URL labels

- -- Chad Smith <chad.smith@canonical.com>  Thu, 02 Apr 2020 16:39:34 -0600
+ -- Ryan Harper <ryan.harper@canonical.com>  Thu, 02 Apr 2020 18:06:50 -0500

 cloud-init (20.1-10-g71af48df-0ubuntu2) focal; urgency=medium

@raharper
Copy link
Copy Markdown
Collaborator

raharper commented Apr 3, 2020

ERROR: Failure: ImportError (No module named 'pytest')

Do we need a debian dep updated here?

@blackboxsw blackboxsw force-pushed the ubuntu/devel branch 3 times, most recently from 4c614d3 to 74995dc Compare April 3, 2020 18:25
@blackboxsw
Copy link
Copy Markdown
Collaborator Author

ERROR: Failure: ImportError (No module named 'pytest')

Do we need a debian dep updated here?

We determined that Travis CI doesn't apply patches from debian/patches directory when determining build-deps, so our cherry-picked unit tests that import pytest can't find the pytest because we also have another cherry-pick which adds pytest to the test-requirements.txt, but that patch it not yet applied by packages/bddeb. This is something we can address separately because sbuild does apply all debian/patches before trying to calculate and install build-depends.

@blackboxsw
Copy link
Copy Markdown
Collaborator Author

Just added a final cherry-pick for PR #306. And added steps which manually add another quilt patch which can drop netbsd and openbsd from the tests/unittests/test_render_cloudcfg.py because that render support is only present in upstream until our next new-upstream-snapshot

@blackboxsw blackboxsw force-pushed the ubuntu/devel branch 3 times, most recently from 24746d0 to 5cb4246 Compare April 3, 2020 19:39
@raharper
Copy link
Copy Markdown
Collaborator

raharper commented Apr 3, 2020

OK. I can reproduce your branch, I've source built and sbuild the output successfully. +1

% git diff blackboxsw/ubuntu/devel HEAD 
diff --git a/debian/changelog b/debian/changelog
index 10061a46f..2f55d12e1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-cloud-init (20.1-10-g71af48df-0ubuntu3) focal; urgency=medium
+cloud-init (20.1-10-g71af48df-0ubuntu13) focal; urgency=medium
 
   * d/patches: redact openbsd netbsd from tests until new-upstream-snapshot
     - fix-cpick-4fb6fd8a-net-ubuntu-focal-prioritize-netplan-over-eni
@@ -21,7 +21,7 @@ cloud-init (20.1-10-g71af48df-0ubuntu3) focal; urgency=medium
   * cherry-pick 09fea85f: net: ignore 'renderer' key in netplan config
     (#306) (LP: #1870421)
 
- -- Chad Smith <chad.smith@canonical.com>  Fri, 03 Apr 2020 13:57:52 -0600
+ -- Ryan Harper <ryan.harper@canonical.com>  Fri, 03 Apr 2020 15:02:26 -0500
 
 cloud-init (20.1-10-g71af48df-0ubuntu2) focal; urgency=medium
 
diff --git a/debian/patches/fix-cpick-4fb6fd8a-net-ubuntu-focal-prioritize-netplan-over-eni.patch b/debian/patches/fix-cpick-4fb6fd8a-net-ubuntu-focal-prioritize-netplan-over-eni.patch
index 1d6ff6d2b..d43880cc2 100644
--- a/debian/patches/fix-cpick-4fb6fd8a-net-ubuntu-focal-prioritize-netplan-over-eni.patch
+++ b/debian/patches/fix-cpick-4fb6fd8a-net-ubuntu-focal-prioritize-netplan-over-eni.patch
@@ -6,10 +6,8 @@ Forwarded: not-needed
 Last-Update: 2020-04-03
 ---
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-Index: cloud-init/tests/unittests/test_render_cloudcfg.py
-===================================================================
---- cloud-init.orig/tests/unittests/test_render_cloudcfg.py
-+++ cloud-init/tests/unittests/test_render_cloudcfg.py
+--- a/tests/unittests/test_render_cloudcfg.py
++++ b/tests/unittests/test_render_cloudcfg.py
 @@ -9,7 +9,7 @@ from cloudinit import util
  
  # TODO(Look to align with tools.render-cloudcfg or cloudinit.distos.OSFAMILIES)

@blackboxsw blackboxsw merged commit b6e1537 into canonical:ubuntu/devel Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants