Skip to content

ci: add weekly lxd tests#857

Open
lengau wants to merge 14 commits intomainfrom
work/tests-weekly-matrix
Open

ci: add weekly lxd tests#857
lengau wants to merge 14 commits intomainfrom
work/tests-weekly-matrix

Conversation

@lengau
Copy link
Collaborator

@lengau lengau commented Dec 5, 2025

  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • Have you successfully run make lint && make test?

This has us running our LXD instance tests on a matrix of Ubuntu/lxd/Python versions each week.

Example run: https://github.com/canonical/craft-providers/actions/runs/19977333039

This should catch errors such as #856 earlier.

@lengau lengau force-pushed the work/tests-weekly-matrix branch 2 times, most recently from e1c099a to 2be55da Compare December 5, 2025 19:50
@lengau lengau marked this pull request as ready for review December 5, 2025 20:12
@lengau lengau requested a review from cmatsuoka as a code owner December 5, 2025 20:12
@lengau lengau requested a review from Copilot December 5, 2025 20:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new weekly CI workflow job to test LXD functionality across multiple Ubuntu versions, LXD channels, and Python versions. The job runs tests specifically marked with 'lxd_instance' to validate LXD provider compatibility across different environment combinations.

  • Adds a new lxd job to the weekly tests workflow
  • Tests multiple Ubuntu versions (22.04, 24.04) and architectures (x86_64, ARM)
  • Validates compatibility with various LXD channels (4.0, 5.0, 5.21, and latest)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bepri
Copy link
Member

bepri commented Dec 9, 2025

All of the current failures in the weekly spreads (that I found) seem to be this:

 tests/integration/lxd/test_lxc.py:179: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <craft_providers.lxd.lxc.LXC object at 0x7fe912fa4730>

    def image_copy(
        self,
        *,
        image: str,
        image_remote: str,
        alias: str | None = None,
        project: str = "default",
        remote: str = "local",
    ) -> None:
        """Copy image.
    
        :param instance_name: Optional instance name.
        :param alias: New alias to add to image.
        :param image: Image to copy.
        :param project: Name of LXD project.
        :param remote: Name of LXD remote.
    
        :raises LXDError: on unexpected error.
        """
        command = ["image", "copy", f"{image_remote}:{image}", f"{remote}:"]
    
        if alias is not None:
            command.append(f"--alias={alias}")
    
        try:
            self._run_lxc(command, capture_output=True, project=project)
        except subprocess.CalledProcessError as error:
>           raise LXDError(
                brief=f"Failed to copy image {image!r}.",
                details=errors.details_from_called_process_error(error),
            ) from error
E           craft_providers.lxd.errors.LXDError: Failed to copy image '22.04'.
E           * Command that failed: 'lxc --project craft-providers-test-session image copy ubuntu:22.04 local: --alias=test-2204'

Is this a network error bubbling up strangely, or are we actually referencing a nonexistent image here?

@lengau
Copy link
Collaborator Author

lengau commented Dec 9, 2025

@bepri it's a network issue. It succeeded in some environments but not others.

@lengau lengau requested a review from a team as a code owner December 9, 2025 19:01
Signed-off-by: Alex Lowe <alex.lowe@canonical.com>
Signed-off-by: Alex Lowe <alex.lowe@canonical.com>
Signed-off-by: Alex Lowe <alex.lowe@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants