Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/upstreams/develop' into merge
Browse files Browse the repository at this point in the history
  • Loading branch information
jwk404 committed Mar 7, 2024
2 parents 5e72921 + ad10748 commit 41b9123
Show file tree
Hide file tree
Showing 482 changed files with 15,416 additions and 5,354 deletions.
33 changes: 24 additions & 9 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
## Proposed Commit Message
<!-- Include a proposed commit message because all PRs are squash merged -->
<!-- Include a proposed commit message because PRs are squash merged
by default.
See https://www.conventionalcommits.org/en/v1.0.0/#specification
for our commit message convention.
If the change is related to a particular cloud or particular distro,
please include the "optional scope" in the summary line. E.g.,
feat(ec2): Add support for foo to the baz
Types used by this project:
feat, fix, docs, ci, test, refactor, chore
-->
```
summary: no more than 70 characters
<type>(optional scope): <summary> # no more than 72 characters
A description of what the change being made is and why it is being
made, if the summary line is insufficient. The blank line above is
required. This should be wrapped at 72 characters, but otherwise has
no particular length requirements.
made if the summary line is insufficient. This should be wrapped at
72 characters.
If you need to write multiple paragraphs, feel free.
Expand All @@ -24,9 +34,14 @@ this is a bug fix) this change on a live deployed system,
including any necessary configuration files, user-data,
setup, and teardown. Scripts used may be attached directly to this PR. -->

## Checklist:
## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [ ] My code follows the process laid out in [the documentation](https://cloudinit.readthedocs.io/en/latest/development/contributing.html)
- [ ] I have updated or added any unit tests accordingly
- [ ] I have updated or added any documentation accordingly
- [ ] My code follows the process laid out in [the documentation](https://cloudinit.readthedocs.io/en/latest/development/index.html)
- [ ] I have updated or added any [unit tests](https://cloudinit.readthedocs.io/en/latest/development/testing.html) accordingly
- [ ] I have updated or added any [documentation](https://cloudinit.readthedocs.io/en/latest/development/contribute_docs.html) accordingly

## Merge type

- [x] Squash merge using "Proposed Commit Message"
- [ ] Rebase and merge unique commits. Requires commit messages per-commit each referencing the pull request number (#<PR_NUM>)
19 changes: 19 additions & 0 deletions .github/workflows/check_format.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Lint Tests
on:
pull_request:
push:
branches:
- main

concurrency:
group: 'ci-${{ github.workflow }}-${{ github.ref }}'
Expand Down Expand Up @@ -94,6 +97,22 @@ jobs:
run: |
tox
shell-lint:
name: Shell Lint
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3.0.0

- name: Install ShellCheck
run: |
sudo apt-get update
sudo apt install shellcheck
- name: Run ShellCheck
run: |
shellcheck ./tools/ds-identify
check-cla-signers:
runs-on: ubuntu-22.04
steps:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
pull_request:
branches-ignore:
- 'ubuntu/**'
push:
branches:
- main

concurrency:
group: 'ci-${{ github.workflow }}-${{ github.ref }}'
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: linkcheck in CI

on:
push:
branches:
- main
pull_request: {}
workflow_dispatch:
inputs:
failOnError:
description: 'Fail job on link check error'
required: false
default: 'false'

jobs:
linkcheck:
runs-on: ubuntu-22.04
continue-on-error: ${{ !(github.event_name == 'workflow_dispatch' && github.event.inputs.failOnError == 'true') }}

steps:
- name: Checkout Repository
uses: actions/checkout@v3.0.0

- name: "Install Python 3.10"
uses: actions/setup-python@v4
with:
python-version: '3.10.8'

- name: Install tox
run: pip install tox

- name: Run Sphinx linkcheck
run: tox -e linkcheck | tee output.txt

- name: Check for broken links below threshold
run: |
broken_count=$(grep -c "broken" output.txt)
if [[ $broken_count -ge 5 ]]; then
echo "Too many broken links detected: $broken_count"
exit 1
else
echo "Number of broken links is below threshold: $broken_count"
fi
8 changes: 4 additions & 4 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Unit Tests
on:
pull_request:
push:
branches:
- main
concurrency:
group: 'ci-${{ github.workflow }}-${{ github.ref }}'
cancel-in-progress: true
Expand All @@ -11,13 +14,10 @@ jobs:
unittests:
strategy:
matrix:
python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10", "3.11" ]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
toxenv: [ py3 ]
experimental: [false]
include:
- python-version: "3.12-dev"
toxenv: py3
experimental: true
- python-version: "3.6"
toxenv: lowest-supported
experimental: false
Expand Down
3 changes: 3 additions & 0 deletions .pc/applied-patches
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ retain-netplan-world-readable.patch
netplan99-cannot-use-default.patch
retain-old-groups.patch
do-not-block-user-login.patch
status-do-not-remove-duplicated-data.patch
retain-apt-pre-deb822.patch
status-retain-recoverable-error-exit-code.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ After=network-online.target cloud-config.target
After=snapd.seeded.service
Before=systemd-user-sessions.service
Wants=network-online.target cloud-config.target
{% if variant == "rhel" %}
ConditionPathExists=!/etc/cloud/cloud-init.disabled
ConditionKernelCommandLine=!cloud-init=disabled
{% endif %}
ConditionEnvironment=!KERNEL_CMDLINE=cloud-init=disabled

[Service]
Type=oneshot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ Conflicts=shutdown.target
Before=shutdown.target
Conflicts=shutdown.target
{% endif %}
{% if variant == "rhel" %}
ConditionPathExists=!/etc/cloud/cloud-init.disabled
ConditionKernelCommandLine=!cloud-init=disabled
{% endif %}
ConditionEnvironment=!KERNEL_CMDLINE=cloud-init=disabled

[Service]
Type=oneshot
Expand Down
7 changes: 7 additions & 0 deletions .pc/expire-on-hashed-users.patch/cloudinit/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@
(This flag can be removed when Jammy is no longer supported.)
"""

APT_DEB822_SOURCE_LIST_FILE = True
"""
On Debian and Ubuntu systems, cc_apt_configure will write a deb822 compatible
/etc/apt/sources.list.d/(debian|ubuntu).sources file. When set False, continue
to write /etc/apt/sources.list directly.
"""


def get_features() -> Dict[str, bool]:
"""Return a dict of applicable features/overrides and their values."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
import copy
import io
import ipaddress
import logging
import os
import textwrap
from typing import Optional, cast

from cloudinit import features
from cloudinit import log as logging
from cloudinit import safeyaml, subp, util
from cloudinit import features, safeyaml, subp, util
from cloudinit.net import (
IPV6_DYNAMIC_TYPES,
SYS_CLASS_NET,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1349,6 +1349,3 @@ def test_mariner_network_config_v1_with_duplicates(self):
def get_mode(path, target=None):
# Mask upper st_mode bits like S_IFREG bit preserve sticky and isuid/osgid
return os.stat(subp.target_path(target, path)).st_mode & 0o777


# vi: ts=4 expandtab
Loading

0 comments on commit 41b9123

Please sign in to comment.