locations.[].rules.allow in app-config.yaml should works when location includes '*'
See original GitHub issueExpected Behavior
in my `app-config.yaml’
catalog:
rules:
- allow: [Component, API, Template, Location]
locations:
- type: url
target: https://github.com/kykim138/backstage-catalogs/blob/master/domains/*
rules:
- allow: [Domain]
and in https://github.com/kykim138/backstage-catalogs/blob/master/domains/
, there are 3 yaml files includes 3 domain entities.
For example, here is https://github.com/kykim138/backstage-catalogs/blob/master/domains/domain-a.yaml
apiVersion: backstage.io/v1alpha1
kind: Domain
metadata:
name: domain-a
description: Everything related to Domain-A.
spec:
lifecycle: develop
owner: kykim138
I expect that backstage backend will add 3 domains.
Current Behavior
backstage backend occurs following WARNING, and reject to add 3 domain entities.
2021-05-03T04:20:19.358Z catalog warn Failed item in location url:https://github.com/kykim138/backstage-catalogs/blob/master/domains/domain-a.yaml, NotAllowedError: Entity of kind Domain is not allowed from location url:https://github.com/kykim138/backstage-catalogs/blob/master/domains/domain-a.yaml
at LocationReaders.read (/Users/kykim138/workspace/backstage/node_modules/@backstage/plugin-catalog-backend/dist/index.cjs.js:1037:22)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async HigherOrderOperations.refreshSingleLocation (/Users/kykim138/workspace/backstage/node_modules/@backstage/plugin-catalog-backend/dist/index.cjs.js:939:26)
at async HigherOrderOperations.refreshAllLocations (/Users/kykim138/workspace/backstage/node_modules/@backstage/plugin-catalog-backend/dist/index.cjs.js:927:9)
at async startRefresh (/Users/kykim138/workspace/backstage/node_modules/@backstage/plugin-catalog-backend/dist/index.cjs.js:868:9) type=plugin component=catalog-all-locations-refresh
Possible Solution
Steps to Reproduce
Context
I think allow rules should works when location includes *
path, because actually location includes *
is working.
When I add ‘Domain’ in catalog.rules.allow, 3 domain entities is added successfully.
in my `app-config.yaml'
```yaml
catalog:
rules:
- allow: [Component, API, Template, Location, Domain]
locations:
- type: url
target: https://github.com/kykim138/backstage-catalogs/blob/master/domains/*
Your Environment
- NodeJS Version (v12): v14.16.1
- Operating System and Version (e.g. Ubuntu 14.04): Mac OS X 10.15.7
- Browser Information: Google Chrome 89.0.4389.90
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Step 3: Creating configuration profiles and feature flags
You can store freeform configurations in the following formats and locations. YAML, JSON, or text documents in the AWS AppConfig hosted configuration store....
Read more >backstage/app-config.yaml at master - GitHub
Used for enabling authentication, secret is shared by all backend plugins ... workingDirectory: /tmp # Use this to configure a working directory for...
Read more >21. Externalized Configuration - Spring
Spring Boot likes you to externalize your configuration so you can work with the same application code in different environments. You can use...
Read more >What Is Amazon AppConfig? - 亚马逊云科技
Amazon AppConfig reduces application downtime by enabling you to create rules to validate your configuration. Configurations that aren't valid can't be ...
Read more >App.Config: Basics and Best Practices - SubMain Blog
The app.config file is an XML file whose goal it is to contain any ... Working with the Settings system will also alter...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Kind of related: #5482
I started looking at whether this could be fixed with globbing, but that’s probably not what we want. Instead, the new rewrite of the ingestion system that’s in the works should probably hold on to the rules and pass them through the chain downward. This would be a bit too involved for outside contribution - I’ll raise it with the team.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.