Skip to content

TOOL-16941 cloud-init: upstream merge conflict resolution#60

Merged
prakashsurya merged 2 commits into
6.0/stagefrom
dlpx/pr/prakashsurya/907649c0-72da-4850-8b13-df116a57f63f
Nov 30, 2022
Merged

TOOL-16941 cloud-init: upstream merge conflict resolution#60
prakashsurya merged 2 commits into
6.0/stagefrom
dlpx/pr/prakashsurya/907649c0-72da-4850-8b13-df116a57f63f

Conversation

@prakashsurya
Copy link
Copy Markdown
Contributor

No description provided.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 3.0 (quilt)
Source: cloud-init
Binary: cloud-init
Architecture: all
Version: 22.3.4-0ubuntu1~20.04.1
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Homepage: https://cloud-init.io/
Standards-Version: 4.4.1
Vcs-Browser: https://github.com/canonical/cloud-init/tree/ubuntu/devel
Vcs-Git: https://github.com/canonical/cloud-init -b ubuntu/devel
Build-Depends: debhelper-compat (= 10), dh-python, iproute2, pep8, po-debconf, python3, python3-configobj, python3-debconf, python3-httpretty, python3-jinja2, python3-jsonpatch, python3-jsonschema, python3-mock, python3-netifaces, python3-oauthlib, python3-pytest, python3-pytest-mock, python3-requests, python3-serial, python3-setuptools, python3-yaml, python3-responses
Package-List:
 cloud-init deb admin optional arch=all
Checksums-Sha1:
 bf2732a89b1434b445b4f7d1dcf09c7b1dbf567c 1411035 cloud-init_22.3.4.orig.tar.gz
 c2bccae1a01927291a180d2823aba549982c64df 86892 cloud-init_22.3.4-0ubuntu1~20.04.1.debian.tar.xz
Checksums-Sha256:
 75ec2eefecda83d4aea6a10e96c089ee63f83d3ab78b80ab61d93474e95b24b3 1411035 cloud-init_22.3.4.orig.tar.gz
 dc96e494081527100cb81e336044fd946300c3e8f66b87cdd812e31a8222d625 86892 cloud-init_22.3.4-0ubuntu1~20.04.1.debian.tar.xz
Files:
 33bcc2bf9b6c2bd8207e69939a2f66d9 1411035 cloud-init_22.3.4.orig.tar.gz
 17ff17fd4990cd7278489c8b73537261 86892 cloud-init_22.3.4-0ubuntu1~20.04.1.debian.tar.xz
Python-Version: all

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE4lRR4CIbV3Pev/F47NrLFgmVrYkFAmM7Lk0ACgkQ7NrLFgmV
rYnmSxAAuH/fme74VV6VTZSe6+hu9PDbCPbA9BDs0/jrUhN2uLq2EZ2kJRJTXK9g
n7s9IClZClJLw5WiWriiOD3GupenSQF+SEjt/wEYv8srFIQvPpsC6UUGojzoIE0P
UQJdg6YDoe8MdbvnEjHhlceazmWs9I2pzi76gXXZBnIBfReUxAgrxipOi9jhhHBI
JrNZsCWA4L4Hkdk01WuG6gBTBRtdFuynD7pGVhFVBb8cwoV8cHR05Q1+AZqqZHGJ
G6dQ0YoOf77QtcJLVFKqostv0ZgEG5smUMunSuPUCOpKfz1psQpEckEPi75BaVPJ
PwbWhDuLKu/eILIcySxY2oh4oMRjveBa/1rL99f1i+c05INrOLLIOvTeQjcqmh9I
JzQJzYIQ3GzEkl2DkBqJvcLyabvQJMLdMh8F68PeKqk7zv/ksGArHCihJXrkvbiP
sUEjEqXr1FManJKF9Rdh36abn8xzy8xdLEApWgqtpFrnIoULZAXe38WRvNEQJULL
vapHBv1dpIJvEAC6eYDqSd/DNMTejESbyWadjj1mff2mhtY+sL9xE8lRETTDb029
KC4hAjeA1Ni0R3JpQcZ8k98y/wXpYsALB2i5sTfboEobHwGdbXbNbfuNaKZ0tSNC
t4kzEOfUgmNmltdGabfNxiqRFsU+qiPFY69I5F8vfybg8SOz2Ho=
=yEyl
-----END PGP SIGNATURE-----
@prakashsurya prakashsurya force-pushed the dlpx/pr/prakashsurya/907649c0-72da-4850-8b13-df116a57f63f branch 3 times, most recently from 28a2407 to 61d5115 Compare November 29, 2022 19:02
@prakashsurya prakashsurya changed the title Merge remote-tracking branch 'origin/upstreams/6.0/stage' into 6.0/stage TOOL-16941 cloud-init: upstream merge conflict resolution Nov 29, 2022
@prakashsurya prakashsurya force-pushed the dlpx/pr/prakashsurya/907649c0-72da-4850-8b13-df116a57f63f branch from edc7e59 to f7e0b65 Compare November 29, 2022 19:49
@prakashsurya prakashsurya force-pushed the dlpx/pr/prakashsurya/907649c0-72da-4850-8b13-df116a57f63f branch from 0fd6cc2 to 8598288 Compare November 29, 2022 20:47
@prakashsurya prakashsurya marked this pull request as ready for review November 30, 2022 04:31
@mmaybee
Copy link
Copy Markdown

mmaybee commented Nov 30, 2022

Could you provide a description of the merge conflicts that were resolved here? It would be nice to know which files were in conflict and why. This could help future merge conflict resolutions.

@prakashsurya
Copy link
Copy Markdown
Contributor Author

prakashsurya commented Nov 30, 2022

Could you provide a description of the merge conflicts that were resolved here?

here's a link to the output of git show on the merge commit.

the non test conflicts were relatively easy to fix.. e.g.

-     (hostname, fqdn) = util.get_hostname_fqdn(cfg, cloud)
+     (hostname, fqdn, is_default) = util.get_hostname_fqdn(cfg, cloud)
+    if fqdn[-1] == '.':
+        fqdn = fqdn[:-1]

here, we added some code downstream #59, and upstream made a change in the line above, so we had to manually merge them together.. but didn't actually conflict (changes to different, but adjacent, lines).

-             "match": {"match": nicname},
 -            "match": {"macaddress": mac.lower()},
++            "match": {"match": nic_name},

here, we just needed to update based on the name changes.. i.e. nicname to nic_name.. this is due to upstream matching on macaddress, and us changing that to match on name.. and then the variable containing the nic name changing..

+                 interface_config = {
                      "mtu": MTU,
-                     "dhcp4": False,
-                     "dhcp6": False,
 -                    "match": {"macaddress": mac_address},
 +                    "match": {"name": name},
+                     "dhcp6": False,
+                     "dhcp4": is_primary,
                  }

here, we just needed to update the code to match based on NIC name, instead of mac address.. this is basically to re-apply the work we previously did to new code.. prior work being PRs like #21 and #23..

then, there were also conflicts in test files.. due to us having removed tests previously, and then those tests being modified.. since modifications to code that we've deleted isn't automatically handled, we need to manually resolve that.. I resolved it by just removing the tests (again), and effectively taking our version of the code..

and lastly, some new tests where added, and needed to be updated to reflect the fact that we're matching on NIC name, rather than MAC address.. e.g. in test_azure.py:

+                     "ethernets": {
+                         "eth0": {
+                             "dhcp4": True,
+                             "dhcp4-overrides": {"route-metric": 100},
+                             "dhcp6": False,
 -                            "match": {"macaddress": "00:0d:3a:04:75:98"},
++                            "match": {"name": "eth0"},
+                             "set-name": "eth0",
+                         }
+                     },

@mmaybee does this help?

@mmaybee
Copy link
Copy Markdown

mmaybee commented Nov 30, 2022

Yes, thank you.

@prakashsurya prakashsurya merged commit ba081f1 into 6.0/stage Nov 30, 2022
@prakashsurya prakashsurya deleted the dlpx/pr/prakashsurya/907649c0-72da-4850-8b13-df116a57f63f branch November 30, 2022 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants