forked from backstage/backstage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'backstage:master' into jordans/addFilterNegation
- Loading branch information
Showing
13 changed files
with
153 additions
and
99 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@backstage/plugin-app-backend': patch | ||
--- | ||
|
||
Fixed unexpected behaviour where configuration supplied with `APP_CONFIG_*` environment variables where not filtered by the configuration schema. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@backstage/plugin-techdocs-node': patch | ||
--- | ||
|
||
Updated dependency `@smithy/node-http-handler` to `^3.0.0`. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@backstage/plugin-search': patch | ||
--- | ||
|
||
Updated the default SearchType.Accordion behavior to remain open after result type selection. This is a UX improvement to reduce the number of clicks needed when toggling result type filters. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@backstage/plugin-techdocs-module-addons-contrib': patch | ||
'@backstage/plugin-techdocs': patch | ||
--- | ||
|
||
Use more of the available space for the navigation sidebar. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -185,11 +185,11 @@ Scope: The Backstage Documentation | |
|
||
## Sponsors | ||
|
||
| Name | Organization | GitHub | Email | | ||
| ----------------- | ------------ | ------------------------------------------- | ------------------ | | ||
| Niklas Gustavsson | Spotify | [protocol7](https://github.com/protocol7) | [email protected] | | ||
| Dave Zolotusky | Spotify | [dzolotusky](https://github.com/dzolotusky) | [email protected] | | ||
| Helen Greul | Spotify | [helengreul](https://github.com/helengreul) | heleng@spotify.com | | ||
| Name | Organization | GitHub | Email | | ||
| ----------------- | ------------ | ------------------------------------------- | ----------------- | | ||
| Niklas Gustavsson | Spotify | [protocol7](https://github.com/protocol7) | [email protected] | | ||
| Dave Zolotusky | Spotify | [dzolotusky](https://github.com/dzolotusky) | [email protected] | | ||
| Pia Nilsson | Spotify | [pianilsson](https://github.com/pianilsson) | pia@spotify.com | | ||
|
||
## Organization Members | ||
|
||
|
@@ -224,9 +224,10 @@ Scope: The Backstage Documentation | |
|
||
## Emeritus End User Sponsors | ||
|
||
| Name | Organization | GitHub | Discord | | ||
| --------- | ------------ | ------------------------------------------- | -------------- | | ||
| Lee Mills | Spotify | [leemills83](https://github.com/leemills83) | `.binarypoint` | | ||
| Name | Organization | GitHub | Discord | | ||
| ----------- | ------------ | ------------------------------------------- | -------------- | | ||
| Lee Mills | Spotify | [leemills83](https://github.com/leemills83) | `.binarypoint` | | ||
| Helen Greul | Spotify | [helengreul](https://github.com/helengreul) | `helen_greul` | | ||
|
||
## Emeritus Project Area Maintainers | ||
|
||
|
99 changes: 99 additions & 0 deletions
99
plugins/app-backend/src/lib/config/readFrontendConfig.test.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
/* | ||
* Copyright 2024 The Backstage Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import { createMockDirectory } from '@backstage/backend-test-utils'; | ||
import { readFrontendConfig } from './readFrontendConfig'; | ||
import { ConfigReader } from '@backstage/config'; | ||
|
||
describe('readFrontendConfig', () => { | ||
const mockDir = createMockDirectory(); | ||
|
||
afterEach(() => { | ||
mockDir.clear(); | ||
}); | ||
|
||
it('should validate env config', async () => { | ||
mockDir.setContent({ | ||
'appDir/.config-schema.json': JSON.stringify({ | ||
schemas: [ | ||
{ | ||
value: { | ||
type: 'object', | ||
|
||
properties: { | ||
app: { | ||
type: 'object', | ||
properties: { | ||
secretOfLife: { | ||
type: 'string', | ||
visibility: 'secret', | ||
}, | ||
backendConfig: { | ||
type: 'string', | ||
visibility: 'backend', | ||
}, | ||
publicValue: { | ||
type: 'string', | ||
visibility: 'frontend', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
], | ||
backstageConfigSchemaVersion: 1, | ||
}), | ||
}); | ||
|
||
const config = new ConfigReader({ | ||
app: { | ||
secretOfLife: '42', | ||
backendConfig: 'backend', | ||
publicValue: 'public', | ||
}, | ||
}); | ||
|
||
const frontendConfig = await readFrontendConfig({ | ||
env: { | ||
APP_CONFIG_app_secretOfLife: 'ignored', | ||
APP_CONFIG_app_backendConfig: 'ignored', | ||
APP_CONFIG_app_publicValue: 'injected', | ||
}, | ||
appDistDir: `${mockDir.path}/appDir`, | ||
config, | ||
}); | ||
|
||
expect(frontendConfig).toEqual([ | ||
{ | ||
context: 'env', | ||
data: { | ||
app: { | ||
publicValue: 'injected', | ||
}, | ||
}, | ||
deprecatedKeys: [], | ||
filteredKeys: undefined, | ||
}, | ||
{ | ||
context: 'app', | ||
data: { app: { publicValue: 'public' } }, | ||
deprecatedKeys: [], | ||
filteredKeys: undefined, | ||
}, | ||
]); | ||
}); | ||
}); |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.