V7#844
Merged
Merged
Conversation
…ed value dependencies.
…Is vs workspace APIs.
…orkspace product groups
- Added unit tests for extractor and publisher - Version bumps - Fixed bug in workspace API revision
…rsions with release version Fixes #811)
- Relax parser validation - Remove silent failures
…n commit mode (#841) When running with COMMIT_ID set and FeatureManagement__Workspaces=true, the publisher would hang silently after 'Running publisher...' with no APIM calls and no error output. Root cause: processDelete cascaded to successors for every resource where isInFileSystem=false, not just resources actually being deleted. WorkspaceResource has no artifact file and is never part of the resource set, so it always entered processDelete. Its cascade logic then awaited the workspace child tasks (e.g. WorkspaceApiResource), which were themselves waiting for the workspace task via the predecessor relationship — a circular wait. Fix: add a guard at the top of processDelete that returns immediately when the resource is not in the resource set. The existing conditional around deleteResource is removed as it is now unreachable when false. Fixes #838 Co-authored-by: Michel Versluijs <michel.versluijs@ns.nl>
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.
Breaking changes
Extractor configuration section names now match the publisher's.
Before
After
See
configuration.extractor.yamlin the repo root for a correct sample.SOAP API specifications are no longer extracted. The WSDL exported by APIM cannot be reimported by APIM (#387).
Tag relationships are now stored under the tag instead of the linked API or product.
Before
After
Added
Workspace support
The extractor and publisher now support the following workspace-scoped resources: APIs, operations, policies, diagnostics, schemas, releases, backends, groups, loggers, named values, policy fragments, products, subscriptions, tags, and version sets. Note that creating workspaces through the tool is NOT supported. You can only manage pre-existing workspaces.
Nested configuration for child resources
We now support nested levels of configuration for the extractor and publisher. This allows the configuration of child resources (e.g. api operations, workspace api diagnostics, etc).
Sample extractor configuration
Only
operation1andoperation2will be extracted inapi1. All operations inapi2will be extracted.Sample publisher configuration
The display name of
diagnostic3inapi2inworkspace1will be overriden withmy display name.Empty configuration in extractor
Previously, if we wanted to skip extracting all resources of a type, we had to put a random placeholder value (e.g.
ignore). We now support the more intuitive[].Before
After
Better ID references across APIM instances
Many APIM resources reference others through IDs. For example, here is a diagnostic that references a logger through the
loggerIdproperty:{ "properties": { ... "loggerId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/azuremonitor" ... } }If we publish this diagnostic as-is to another APIM instance, the publisher will fail. The logger reference is specific to APIM instance
apimService1in resource grouprg1and subscription00000000-0000-0000-0000-000000000000. To work around this, we have to edit the JSON or override the publisher configuration to reference the new APIM instance.Going forward, the extractor will use relative references where possible. In the above scenario, it will write
loggerId: "/loggers/azuremonitor". This relative reference will work when publishing across instances.Dry-run mode for the publisher (#754)
The publisher can now run in dry-run mode. It logs what it would do without making changes to APIM. Dry-run is disabled by default, but you can control this by:
DRY_RUNconfiguration value totrue(orfalseto disable).--dry-runto the publisher executable (the bare flag enables dry run).--dry-run true|falseto the publisher executable explicitly.Pre-publish validation
Before making any changes to APIM, the publisher now validates the resource set to catch these problems earlier:
subscriptionAdepending ongroupBwhich depends onapiCwith depends onsubscriptionA). These are always flagged as errors and will throw an exception.STRICT_VALIDATIONconfiguration variable:STRICT_VALIDATION=true: the publisher throws an exception.Configuration logging at startup
The extractor and publisher now log configuration values. This should make it a lot easier to troubleshoot configuration issues. Sensitive values are redacted, with only the first 3 characters shown.
Extractor and publisher executable versions now match the GitHub release version automatically, so it's clear which build you're running (#811).
Fixed
serviceUrlvalues causing deployment failures (#760).