Skip to content
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

Restructure filtering and add new filters (v2) #748

Merged
merged 4 commits into from
Jul 10, 2023

Conversation

monstermunchkin
Copy link
Member

This is essentially the same as PR #744 but fixes LXC target filtering.

monstermunchkin and others added 4 commits July 10, 2023 08:06
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
This changes the way filters are applied. Prior to this change, filters
were applied in various places. With this change, all filters are
applied at start by modifying the loaded definition.

Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
@stgraber
Copy link
Member

@monstermunchkin can you describe what was the problem with the previous attempt?

@monstermunchkin
Copy link
Member Author

When calling distrobuilder pack-lxc, the image targets are set to ImageTargetAll | ImageTargetContainer.

When LXC target filtering was added, all targets in our yaml files were ignored because no type filter was set (ImageTargetUndefined). It would've worked if we had added type: [container].

However, for these targets it doesn't make sense explicitly setting the type filter. Instead, the targets will now also be included if no type filter is set. We therefore don't need to change our image files.

I hope that explains the issue.

@stgraber stgraber merged commit f2271a7 into lxc:master Jul 10, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants