-
Notifications
You must be signed in to change notification settings - Fork 228
Description
Release version
APIOps Toolkit for Azure APIM v7.0.0-alpha.1.0.4
Describe the bug
Environment
- Publisher Version: 7.0.0 (v7.0.0-alpha.1.0.4)
- Configuration File:
configuration.prod.yaml - Artifacts Path:
apimartifacts/
Description
Publisher is failing with a validation error claiming that group resources have no predecessor registration, even though the group definition files exist in the artifacts directory.
Error Message
crit: publisher[0]
Publisher failed. Please check the logs for more details.
System.InvalidOperationException: Found at least one validation error:
Resource 'groups/667be4f26f873a4f65e19f71' has no predecessor registration.
Resource 'groups/insiders' has no predecessor registration.
at publisher.Relationships.Validate(IDictionary`2 predecessors, IDictionary`2 successors, CancellationToken cancellationToken) in /home/runner/work/apiops/apiops/src/publisher/Relationships.cs:line 93
Repository Structure
The groups do exist in the artifacts directory:
apimartifacts/
├── groups/
│ ├── 667be4f26f873a4f65e19f71/
│ │ └── groupInformation.json
│ ├── insiders/
│ │ └── groupInformation.json
│ └── (other groups...)
├── products/
│ ├── MY_PRODUCT_X/
│ │ └── groups/
│ │ └── 667be4f26f873a4f65e19f71/
│ │ └── productGroupInformation.json
│ ├── MY_PRODUCT_Y/
│ │ └── groups/
│ │ └── insiders/
│ │ └── productGroupInformation.json
│ └── (other products...)
Group Definitions
apimartifacts/groups/667be4f26f873a4f65e19f71/groupInformation.json:
{
"properties": {
"displayName": "...",
"description": "...",
"externalId": "aad://MY_TENANT_ID.onmicrosoft.com/groups/MY_GROUP_ID",
"type": "external"
}
}apimartifacts/groups/insiders/groupInformation.json:
{
"properties": {
"displayName": "...",
"description": "...",
"type": "custom"
}
}Product-Group Relationship Example
apimartifacts/products/MY_PRODUCT_X/groups/667be4f26f873a4f65e19f71/productGroupInformation.json:
{
"name": "6684e9a05ddd172010cc42da",
"properties": {
"groupId": "/groups/667be4f26f873a4f65e19f71"
}
}Configuration Files
configuration.extractor.yaml:
subscriptions: []configuration.prod.yaml:
- Contains API and backend configurations
- Does not contain any group-specific overrides
- Does not explicitly exclude groups
Additional Context
- The groups were previously extracted using the extractor tool
- Multiple products reference these groups
- This issue did not occur in V6 because
products/*/groupswere not extracted
Questions
- Is there a known issue with group dependency resolution in v7.0.0-alpha.1.0.4?
- Are there any special requirements for external groups (with
externalId) vs custom groups?
Expected behavior
Publisher should recognize the group definitions in apimartifacts/groups/ and successfully validate the dependencies between products and groups.
Actual behavior
Publisher fails validation claiming groups have no predecessor registration, despite:
- Group definition files existing in correct locations
- Product-group relationship files referencing these groups
- No explicit exclusion in configuration files
Reproduction Steps
- Set up artifacts directory with groups and product-group relationships as shown above
- Run publisher with commit ID:
CONFIGURATION_YAML_PATH=configuration.prod.yaml COMMIT_ID=<commit-sha> ./publisher
- Publisher fails with the "no predecessor registration" error