Uh oh!
There was an error while loading. Please reload this page.
feat: add --filter support to apiops publish - #236
Open
Chris Dayne (cdayne) wants to merge 1 commit into
Open
Conversation
- Implemented unit tests for extracting backend pool members and policy fragment dependencies transitively in extract-service. - Added tests to ensure API exclusions are respected during product publishing in product-publisher. - Enhanced publish-service tests to cover filtering resources, including transitive dependencies and dry-run scenarios. - Introduced tests for resource-publisher to skip entries based on exclusion filters for subscriptions and API tags. - Added tests for workspace-extractor to validate workspace exclusions and transitive extraction of policy fragments. - Created transitive-extractor service to handle extraction of transitive dependencies with proper logging and error handling.
Chris Dayne (cdayne)
commented
Aug 4, 2026
Author
@microsoft-github-policy-service agree |
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 freeto 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.
Summary
Adds
--filter <path>and--no-transitiveflags toapiops publish, using the same filter YAML file, matching rules, and transitive-dependency resolution thatapiops extract --filteralready provides. Also corrects three stale/incorrect passages indocs/guides/filtering-resources.md.Fixes#215
Fixes#228
What's included
--filter/--no-transitiveforapiops publish--filter ./filter.yaml, reusing the exact filter semantics from extract: case-insensitive names, wildcards,!-prefix exclusions, and nested API/workspace sub-filters.--no-transitivedisables this and publishes only exact filter matches.--filtercomposes with--commit-id(incremental publish) and--dry-run. In incremental mode, a filter-eligible resource that didn't itself change in the given commit is still (re)published when its parent resource does (e.g. a product's associations, policy, or an API's child resources/revisions).--delete-unmatchedis mutually exclusive with both--filterand--commit-id, with a clear error message.Workspace-scoped extraction
apiops extractnow resolves transitive dependencies (named values, backends including pool members, and policy fragments) for workspace-scoped APIs, matching the transitive resolution top-level (non-workspace) extraction already had.Docs
docs/guides/filtering-resources.md: corrected the resource-type count (16 → 17, after thepoliciesfield was added), replaced an incorrectapiSubFilterstop-level-key YAML example with the correct nested-object syntax (matchingdocs/commands/extract.md), and documented the!-prefix exclusion syntax that contradicted an earlier "no exclude syntax" claim.docs/commands/publish.mdandREADME.md: documented the new flags and their interaction with--delete-unmatched.docs/architecture.md: added thePublish Service → Filter + Transitive Resolveredge the new code introduces to the component diagram.Test plan
npm run lint— cleannpx tsc --noEmit— cleannpm test— 1153/1153 passing, including coverage for filter matching and transitive expansion in full/incremental/dry-run modes, incremental-mode republishing of unchanged children, the association/subscription existence check, and workspace-scoped transitive extraction