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
pcd1193182 committed Sep 24, 2024
2 parents 0423dec + ff91f05 commit 01c4b5a
Show file tree
Hide file tree
Showing 619 changed files with 29,133 additions and 32,891 deletions.
26 changes: 20 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
<!--
Thank you for submitting a PR to cloud-init!
To ease the process of reviewing your PR, do make sure to complete the following checklist **before** submitting a pull request.
- [ ] I have signed the CLA: https://ubuntu.com/legal/contributors
- [ ] I have added my Github username to ``tools/.github-cla-signers``
- [ ] I have included a comprehensive commit message using the guide below
- [ ] I have added unit tests to cover the new behavior under ``tests/unittests/``
- Test files should map to source files i.e. a source file ``cloudinit/example.py`` should be tested by ``tests/unittests/test_example.py``
- Run unit tests with ``tox -e py3``
- [ ] I have kept the change small, avoiding unnecessary whitespace or non-functional changes.
- [ ] I have added a reference to issues that this PR relates to in the PR message (Refs GH-1234, Fixes GH-1234)
- [ ] I have updated the documentation with the changed behavior.
- If the change doesn't change the user interface and is trivial, this step may be skipped.
- Cloud-config documentation is generated from the jsonschema.
- Generate docs with ``tox -e docs``.
-->


## Proposed Commit Message
<!-- Include a proposed commit message because PRs are squash merged
by default.
Expand Down Expand Up @@ -34,12 +54,6 @@ 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
<!-- 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/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

Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/alpine-unittests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@

name: Alpine Unittests

on:
pull_request:
branches-ignore:
- 'ubuntu/**'
push:
branches:
- main

concurrency:
group: 'ci-${{ github.workflow }}-${{ github.ref }}'
cancel-in-progress: true

defaults:
run:
shell: sh -ex {0}

jobs:
build:
runs-on: ubuntu-latest
steps:

- name: "Checkout"
uses: actions/checkout@v4
with:
# Fetch all tags for tools/read-version
fetch-depth: 0

- name: Setup LXD
uses: canonical/setup-lxd@v0.1.1
with:
channel: latest/candidate

- name: Create alpine container
# the current shell doesn't have lxd as one of the groups
# so switch groups to run lxd commands
run: lxc launch images:alpine/edge alpine

- name: Check networking (for debugging)
run: |
lxc exec alpine -- ping -c 1 google.com || true
lxc exec alpine -- ping -c 1 dl-cdn.alpinelinux.org || true
lxc exec alpine -- nslookup www.google.com || true
lxc exec alpine -- ping -c 1 dl-cdn.alpinelinux.org || true
- name: Install dependencies
run: lxc exec alpine -- apk add py3-tox git tzdata

- name: Mount source into container directory
run: lxc config device add alpine gitdir disk source=$(pwd) path=/root/cloud-init-ro

- name: Create a r/w directory to run tests in
# without this, tox fails during package install
run: |
lxc exec alpine -- git config --global --add safe.directory /root/cloud-init-ro/.git
lxc exec alpine -- git clone cloud-init-ro cloud-init-rw
- name: Set a timezone
# test for regression of GH-5158
# https://github.com/canonical/cloud-init/issues/5158
run: lxc exec alpine -- ln -s /usr/share/zoneinfo/Europe/Brussels /etc/localtime

- name: Set up tox environment
# Setup the environment and then tell pytest to do essentially nothing
run: lxc exec alpine --cwd /root/cloud-init-rw -- tox -e py3 -- --cache-show=

- name: Stop network
# Take down network interfaces to ensure tests don't use network
run: lxc exec alpine -- ifdown -a

- name: Run unittests
run: lxc exec alpine --cwd /root/cloud-init-rw -- tox -e py3
14 changes: 2 additions & 12 deletions .github/workflows/check_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ jobs:
fail-fast: false
matrix:
env: [ruff, mypy, pylint, black, isort]
lint-with:
- {tip-versions: false, os: ubuntu-20.04}
- {tip-versions: true, os: ubuntu-latest}
name: Check ${{ matrix.lint-with.tip-versions && 'tip-' || '' }}${{ matrix.env }}
runs-on: ${{ matrix.lint-with.os }}
name: Check ${{ matrix.env }}
runs-on: ubuntu-20.04
steps:
- name: "Checkout #1"
uses: actions/checkout@v3.0.0
Expand All @@ -41,17 +38,10 @@ jobs:
run: python3 --version

- name: Test
if: ${{ !matrix.lint-with.tip-versions }}
env:
# matrix env: not to be confused w/environment variables or testenv
TOXENV: ${{ matrix.env }}
run: tox
- name: Test (tip versions)
if: matrix.lint-with.tip-versions
continue-on-error: true
env:
TOXENV: tip-${{ matrix.env }}
run: tox
schema-format:
strategy:
fail-fast: false
Expand Down
18 changes: 6 additions & 12 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
name: linkcheck in CI

name: scheduled-linkcheck
on:
push:
branches:
- main
pull_request: {}
workflow_dispatch:
inputs:
failOnError:
description: 'Fail job on link check error'
required: false
default: 'false'
schedule:
- cron: '3 14 * * *'
concurrency:
group: 'ci-${{ github.workflow }}-${{ github.ref }}'
cancel-in-progress: true

jobs:
linkcheck:
Expand Down
49 changes: 38 additions & 11 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
name: scheduled
name: scheduled-daily
on:
schedule:
- cron: '3 14 * * *'
concurrency:
group: 'ci-${{ github.workflow }}-${{ github.ref }}'
cancel-in-progress: true
cancel-in-progress: false

jobs:
unittests:
strategy:
matrix:
toxenv: [ hypothesis-slow ]
name: unittest / ${{ matrix.toxenv }}
hypothesis:
name: unittest / hypothesis-slow
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
# Fetch all tags for tools/read-version
fetch-depth: 0
- name: Install dependencies
env:
DEBIAN_FRONTEND: noninteractive
Expand All @@ -29,4 +23,37 @@ jobs:
env:
PYTEST_ADDOPTS: -v
HYPOTHESIS_PROFILE: ci
run: tox -e ${{ matrix.toxenv }}
run: tox -e hypothesis-slow
devel_tests:
name: unittest / 3.13-dev
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Python 3.13-dev
uses: actions/setup-python@v4
with:
python-version: 3.13-dev
check-latest: true
- name: Install tox
run: pip install tox
- name: Run unittest
run: tox -e py3
format_tip:
strategy:
fail-fast: false
matrix:
env: [tip-ruff, tip-mypy, tip-pylint, tip-black, tip-isort]
name: format-tip
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get -qy update
sudo apt-get -qy install tox
- name: Run Linters tip
env:
TOXENV: ${{ matrix.env }}
run: tox
5 changes: 0 additions & 5 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ jobs:
continue-on-error: false
check-latest: false
experimental: false
- python-version: "3.13-dev"
toxenv: py3
check-latest: true
experimental: true
continue-on-error: true
name: unittest / ${{ matrix.toxenv }} / python ${{matrix.python-version}}
runs-on: ubuntu-20.04
continue-on-error: ${{ matrix.experimental }}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ cloud-init_*.buildinfo
cloud-init_*.changes
cloud-init_*.deb
cloud-init_*.dsc
cloud-init_*.orig.tar.gz
cloud-init_*.tar.gz
cloud-init_*.tar.xz
cloud-init_*.upload

Expand Down
9 changes: 2 additions & 7 deletions .pc/applied-patches
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@ netplan99-cannot-use-default.patch
retain-old-groups.patch
keep-dhclient-as-priority-client.patch
revert-551f560d-cloud-config-after-snap-seeding.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
retain-ec2-default-net-update-events.patch
cpick-a6f7577d-bug-package_update-avoid-snap-refresh-in-images-without
cli-retain-file-argument-as-main-cmd-arg.patch
cpick-51c6569f-fix-snapd-ubuntu-do-not-snap-refresh-when-snap-absent
cpick-417ee551-fix-ec2-Ensure-metadata-exists-before-configuring-PBR
cpick-d6776632-fix-Check-renderer-for-netplan-specific-code-5321
cpick-74dc7cce-test-Fix-failing-test_ec2.py-test-5324
cpick-d771d1f4-fix-ec2-Correctly-identify-netplan-renderer-5361
drop-unsupported-systemd-condition-environment.patch
deprecation-version-boundary.patch
Loading

0 comments on commit 01c4b5a

Please sign in to comment.