-
Notifications
You must be signed in to change notification settings - Fork 1k
Update d/rules and d/p/retain-setuptools.patch to leverage DEB_VERSION settings #6733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: ubuntu/jammy
Are you sure you want to change the base?
Conversation
-made sure test case classes don't inherit from TestCase -used pytest fixtures instead of unittest setUp method -converted all self.assert to plain assert. Related canonicalGH-6427
disable-sshd-keygen-if-cloud-init-active.conf seems to have been added twice.
Fix it.
Also replace '/usr/lib/systemd/system' by the macro %{_unitdir} to make the
spec file more portable across distros.
Signed-off-by: Ani Sinha <anisinha@redhat.com>
This is true since FreeBSD 14.0-RELEASE https://www.freebsd.org/releases/14.0R/relnotes/ https://cgit.freebsd.org/src/commit/?id=bbb2d2ce4220
Add test_ds_identify functionality to provide environment variables to tests using PATH_DI_ENV.
) When ephemeral networking is brought up in Azure, the selected interface (`iface`) is `None` under certain conditions. This change introduces a helper function `find_primary_nic()` which uses `net.find_candidate_nics()` to determine and select the system's primary network interface if one is not explicitly set. Additional improvements: - Log the MAC address and driver of the selected NIC for easier debugging. - Ensure the DHCP retry loop updates `iface` to the current primary NIC before retrying to obtain a lease. Fixes canonical#6558
The "has_gnu_date" function checks "date --help" output, but some versions of "date" don't include a "--help" flag.
`time.strftime()` has platform-specific behavior when dealing with a `gmtime()` struct.
It was removed in canonical#6356, but is still needed in some tests that interact with `/tmp`.
Many socket attributes are OS-specific, so ensure we have attributes that work for the tests that need them. Also, mock socket calls where needed.
'echo -n' isn't universal
Note that this test wasn't always Linux-specific, but when the pid stuff moved under Distro, the test was changed to test the base class (i.e., Linux) functionality only.
Implementation differences cause different results.
In DataSourceCloudStack.py, get_newest_lease() is currently being passed a Distro object, causing a Python type error. This PR changes the Distro object to the interface string to fix this error.
Add VM ID to the KVP (Key-Value Pair) event key format to improve telemetry tracking and debugging capabilities for Azure/Hyper-V deployments.
The EC2 datasource checks all NICs one by one to see which can reach the metadata server. This can lead to slow boot if the primary NIC is not checked first. We use the fact that typically the primary NIC on an EC2 instance will be the lowest numbered Elastic interface (either ENA or EFA) and order these first. Only then checking other network devices that may be present. Fixes canonicalGH-6618 Signed-off-by: Zachary Raines <zachary.raines@canonical.com>
cloud-init project now requires full SHA commits instead of tags for all workflows to utilize a more secure policy for CI runners. Any Github actions lacking full SHA pins in workflows/actions will error due to repo prevention policy. Additionally update SHA pins to latest known workflow releases.
…cal#6707) Fixes DNS queries for IP addresses that cause 2+ minute boot delays with systemd 259+. Moves IP detection earlier in is_resolvable() and removes legacy DNS-dependent metadata URL. Fixes canonicalGH-6641
Various pages in the table of contents documented things that are not useful without some other context. Remove these from the table of contents and link to them from pages that have that context. Introduce new "advanced" pages under the reference and explanation categories to link to pages which are not suitable for the average user. Other pages contained implementation details. Remove the implementation details or move the page to be under the new "advanced" pages. Introduce a new "project status" page to gather project-related info. Delete content and pages containing duplicate information. Don't make security policy recommendations to users. Remove page documenting the performance analysis subcommand, since there are more accurate ways of analyzing performance. File deletions -------------- about-cloud-config.rst performance_analysis.rst File renames ------------ faq.rst -> from reference to explanation user_files.rst -> from reference to explanation module_run_frequency -> from how-to to reference test_unreleased_packages -> from howto to reference foramt.rst -> format/index.rst (and sub-pages)
858ac97 to
a9b4ffd
Compare
blackboxsw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to avoid introducing extra package dependencies in debian/control for jammy or noble on python3-setuptools-scm. Instead we can "set" the right python package version (and egg info) by providing a PACKAGED_VERSION environment variable which is sourced by setup_tools.get_version
|
|
||
| # This one is currently used only by the CloudSigma and SmartOS datasources. | ||
| --- /dev/null | ||
| +++ b/tools/read-version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop tools/read-version because we have simplified setup_utils.py to only look at os.environ("PACKAGED_VERSION") which is now provided by our debian/rules file
| + cmd = [sys.executable, "tools/read-version"] | ||
| + ver = subprocess.check_output(cmd) # B603 | ||
| + version = ver.decode("utf-8").strip() | ||
| + ver = os.environ.get("PACKAGED_VERSION", "MISSING_ENVVAR_PACKAGE_VERSION") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid shelling out to a script we no longer need. This get_version is called by setup.py during clean, build and install stages and we don't want to have to override the value returned when those stages don't yet have a modified cloudinit/version.py file.
This version retuerned is validated by setuptools and gets a warning in jammy when it doesn't adhere to PEP440. In noble, it's a hard error for the same non-PEP440 compliance.
049e5b3 to
8a66d27
Compare
| + # that should give us a valid version. | ||
| + return version.replace("-", "+", 1) | ||
| + # which is invalid under PEP 440. Redact it to only major.minor.patch | ||
| + return version.strip("_").split("-")[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is only used by setuptools during python3 setup clean, build, install etc. And generates a PEP440 warning in jammy and error in noble if we don't present simple MAJOR.MINOR.PATCH version strings. This version is exposed in the egg-info included in packaging which historically adheres to the format cloud_init-25.2.egg-info. We don't expose the downstream ubuntu version suffixes.
|
This branch has conflicts that need to be resolved. |
8a66d27 to
58a85de
Compare
debian/changelog
Outdated
| * d/rules: update replace DOWNSTREAM_VERSION string to DEB_VERSION value and | ||
| export PACKAGED_VERSION environment variable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is a bit confusing and probably adds more detail than necessary. Can we rewrite it in a way that explains what / why we made the change rather than what the change is?
58a85de to
4a06f9f
Compare
4a06f9f to
9cc84c6
Compare
Resolve PEP440 version warnings about@MISSING_MESON_BUILD_ARTIFACT@ python3 setup.py clean, build or install stages by providing debian/rules $(DEB_VERSION) to the patched setup_utils.py. This allows us to avoid either python3-setuptools-scm dependencies or complex
override_dh_auto_(clean|build|install)stages to attempt to create meson_versions.py.This branch represents 4 actions:
export PACKAGED_VERSION=$(DEB_VERSION)os.environ("PACKAGED_VERSION")Proposed Commit Message
See individual commits
Additional Context
Test Steps
One can test the build environment behavior with the following:
Merge type