Fixes #980 - Fix empty items_to_include list causing full deployment#986
Open
Copilot wants to merge 4 commits into
Open
Fixes #980 - Fix empty items_to_include list causing full deployment#986Copilot wants to merge 4 commits into
Copilot wants to merge 4 commits into
Conversation
Agent-Logs-Url: https://github.com/microsoft/fabric-cicd/sessions/dd81c437-41a6-48ee-87c9-35cf31629590 Co-authored-by: shirasassoon <66449905+shirasassoon@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix deployment issue when passing empty list to items_to_include
Fixes #924 - Fix empty items_to_include list causing full deployment
May 13, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a behavioral bug in selective publishing/unpublishing where passing items_to_include=[] was treated the same as None, causing the library to deploy (or consider) all items instead of none. It aligns items_to_include handling with the established semantics: None = no filter, [] = include nothing.
Changes:
- Update
items_to_includechecks from truthiness to explicitis Nonechecks inpublish_all_items()andunpublish_all_orphan_items(). - Fix core publisher filtering so
items_to_include=[]returns an empty publish set (instead of all items). - Add a regression test ensuring
items_to_include=[]results in all repository items being markedskip_publish=True.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/fabric_cicd/publish.py |
Uses explicit is None checks so [] is treated as “include nothing” rather than “no filter”. |
src/fabric_cicd/_items/_base_publisher.py |
Fixes get_items_to_publish() to return an empty dict for items_to_include=[]. |
tests/test_publish.py |
Adds regression coverage for items_to_include=[] skipping all items. |
src/fabric_cicd/fabric_workspace.py |
Minor formatting change (single-line endpoint call). |
.changes/unreleased/fixed-20260513-105123.yaml |
Adds changelog fragment describing the fix. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Passing
items_to_include=[]topublish_all_itemsdeploys everything instead of nothing. Root cause: truthiness checks (if not items_to_include) treatNoneand[]identically, but they have different semantics—Nonemeans "no filter" while[]means "include nothing."Fixes:
publish.py: Three checks changed from truthiness (if items_to_include:,if not items_to_include) to explicitis Nonechecks_base_publisher.py:get_items_to_publish()now returns empty dict for[]instead of all itemstest_publish.py: Addedtest_empty_items_to_include_skips_all_itemsLinked Issue (REQUIRED)
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
releases.astral.sh/home/REDACTED/.local/bin/uv uv sync --dev(dns block)If you need me to access, download, or install something from one of these locations, you can either: