Focal drop condition environment from hotplug#5448
Conversation
aciba90
left a comment
There was a problem hiding this comment.
Thanks, @blackboxsw, for addressing this.
quilt push -a
git diff systemd/*hotplug*
quilt pop -a
The patch changes and the above commands look good, but CI and I are having troubles building the package:
$ build-package
Preparing worktree (detached HEAD fbdfb2e71)
HEAD is now at fbdfb2e71 fix(systemd): drop unsupported ConditionEnvironment from hotplug
Found UNRELEASED in debian/changelog. Do you really want to build-package ? (y/n) y
pkg_name=cloud-init pkg_ver=24.1.3-0ubuntu1~20.04.4 upstream_ver=24.1.3 suite=UNRELEASED
Check for an upstream cloud-init_24.1.3.orig.tar.gz on which to base this debdiff ? (y/n) n
========================================
./tools/make-tarball --output=../dl/cloud-init_24.1.3.orig.tar.gz
../dl/cloud-init_24.1.3.orig.tar.gz
========================================
Removing upstream's debian dir in favor of packaging.
building with: -d -S -nc
dpkg-buildpackage -d -us -uc -ui -S -nc
dpkg-buildpackage: info: source package cloud-init
dpkg-buildpackage: info: source version 24.1.3-0ubuntu1~20.04.4
dpkg-buildpackage: info: source distribution UNRELEASED
dpkg-buildpackage: info: source changed by Chad Smith <chad.smith@canonical.com>
dpkg-source --before-build .
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying retain-apt-partner-pocket.patch
dpkg-source: info: applying expire-on-hashed-users.patch
dpkg-source: info: applying retain-netplan-world-readable.patch
dpkg-source: info: applying netplan99-cannot-use-default.patch
dpkg-source: info: applying retain-old-groups.patch
dpkg-source: info: applying keep-dhclient-as-priority-client.patch
dpkg-source: info: applying revert-551f560d-cloud-config-after-snap-seeding.patch
dpkg-source: info: applying status-do-not-remove-duplicated-data.patch
dpkg-source: info: applying retain-apt-pre-deb822.patch
dpkg-source: info: applying status-retain-recoverable-error-exit-code.patch
dpkg-source: info: applying retain-ec2-default-net-update-events.patch
dpkg-source: info: applying cli-retain-file-argument-as-main-cmd-arg.patch
dpkg-source: info: applying drop-unsupported-systemd-condition-environment.patch
patching file systemd/cloud-config.service.tmpl
Hunk #1 FAILED at 6.
1 out of 1 hunk FAILED
patching file systemd/cloud-final.service.tmpl
patching file systemd/cloud-init-local.service.tmpl
patching file systemd/cloud-init.service.tmpl
patching file systemd/cloud-init.target
patching file systemd/cloud-init-hotplugd.service
patching file systemd/cloud-init-hotplugd.socket
dpkg-source: info: the patch has fuzz which is not allowed, or is malformed
dpkg-source: info: if patch 'drop-unsupported-systemd-condition-environment.patch' is correctly applied by quilt, use 'quilt refresh' to update it
dpkg-source: info: if the file is present in the unpacked source, make sure it is also present in the orig tarball
dpkg-source: info: restoring quilt backup files for drop-unsupported-systemd-condition-environment.patch
dpkg-source: error: LC_ALL=C patch -t -F 0 -N -p1 -u -V never -E -b -B .pc/drop-unsupported-systemd-condition-environment.patch/ --reject-file=- < wtd/debian/patches/drop-unsupported-systemd-condition-environment.patch subprocess returned exit status 1
dpkg-buildpackage: error: dpkg-source --before-build . subprocess returned exit status 2
debuild: fatal error at line 1184:
dpkg-buildpackage -d -us -uc -ui -S -nc failed
FAILED: debuild -d -S -nc
The same happens running sbuild -d focal or debuild -uc -us.
Not sure what happens. Do we need to refresh the patches, or is this something related to how we deal with the upstream tarball?
8906e17 is causing some test failures on older releases. Fix them
Commit 8470af0 changes the integration test keyserver PPA to ppa:curtin-dev/daily. Update the assertion key fingerprint.
Adapt util.should_log_deprecation to expect two params: - version: where the key/feature was deprecated - boundary_version: at which deprecation level logs occur
Per [1], org's correct type is string. Added as new type and deprecated integer. References: [1] https://github.com/candlepin/subscription-manager/blob/b6fad11e7783ae414fe88fdecee57d8db5c8e292/man/subscription-manager.8#L589 Fixes canonicalGH-5382 Co-authored-by: pneigel-ca <patrick.neigel@gmail.com>
…anonical#5475) The ubuntu_advantage key is deprecated in 24.1 in favor of ubuntu_pro. Any version less than 24.1 will have only an info level log resulting in no DEPRECATED keys from cloud-init status --format=yaml. Parse log level messages in /var/log/cloud-init.log instead.
- Update deprecation test to include focal. - Update test using `cloud-id` appropriately
Remove code for detecting a virtualenv. This has been broken since ~3.7.
Invalid type annotations confuse mypy. When it sees a type annotation that doesn't conflict with other annotations, it is trusted. This means that future attempts to conditionally check a variable's type will cause mypy to produce an unreachable code path warning.
Later use of the same variable name leads mypy to report unreachable code paths.
Mypy infers an unannotated variable's type from its initial value. When a variable's type may change (such as from None to non-None), the variable's type needs to be annotated, otherwise mypy may warn of unreachable code paths.
Enable mypy's "warn_unreachable" checks. Remove adjacent unused mocks. Note: mypy can incorrectly report typing errors as "unused code paths"
Python's provides type annotation features which allow validating types throughout the code base. Use, rather than ignore, these features. Note that since a dict's .get() may return None, using this method when the only possible return value is a literal will confuse mypy.
Enable positional arguments for various environments.
Add missing deps for tip-mypy.
The -tip envs were broken when a non-tip env existed. In these cases,
{[testenv:mypy]commands} resolved to the non-tip environment. Fix it.
Fix the current network v2 schema as well.
This doesn't add anything useful on its own, but it defines a custom type which can easily be overridden. See canonicalGH-5398 for more details.
This also satisfies mypy via type narrowing, which hasattr() does not accomplish.
jsonschema is still a soft dependency, so don't fail it not present.
Update test to reduce expected deprecation count when below deprecation boundary. changed_version messages are still logged.
Also use ca_certs instead of ca-certs deprecated key
Bump the version in cloudinit/version.py to 24.2 and update ChangeLog.
Systemd on focal does not support ConditionEnvironment in units which raises a warning in journalctl. Drop these unused conditions from cloud-init-hotplug.service and socket units. Fixes canonicalGH-5402
patches: debian/patches/deprecation-version-boundary.patch debian/patches/revert-551f560d-cloud-config-after-snap-seeding.patch
fbdfb2e to
13e5033
Compare
|
@aciba90 I should have probably performed a new_upstream_snapshot.py on this branch after adapting the quilt patch to ensure the ubuntu/focal branch remained buildable without requiring one to merge into upstream/main first (which would have resolved things for daily recipe builds but not the local branch as you saw). I have since refactored the original commit 7a2163c, sync'd any unreleased changes from ubuntu/focal-24.1.x:debian/changelog and performed Please feel free to test this package build fully: |
13e5033 to
ed04e0b
Compare
aciba90
left a comment
There was a problem hiding this comment.
LGTM, thanks!
- Version looks good after new upstream snapshot
- Patches apply cleanly
- sbuild
- quilt push -a && tox -e py3 && quitl pop -a
ed04e0b to
f8dccc3
Compare
tools/.github-cla-signerstests/unittests/cloudinit/example.pyshould be tested bytests/unittests/test_example.pytox -e py3tox -e docs.Proposed Commit Message
Additional Context
Test Steps
Merge type