Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(test): adds auth test key as auth is mandatory #187

Merged
merged 13 commits into from
May 9, 2024
Merged

Conversation

ChrisJBurns
Copy link
Contributor

Description of the change

Authentication has been enabled by default in newer versions of Backstage. This adds a dummy secret so tests can continue as normal.

Existing or Associated Issue(s)

Fixes #186

Authentication has been enabled by default in newer versions of
Backstage. This adds a dummy secret so tests can continue as normal

Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
@ChrisJBurns ChrisJBurns requested a review from a team as a code owner May 4, 2024 13:31
Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
@ChrisJBurns
Copy link
Contributor Author

ChrisJBurns commented May 4, 2024

@vinzscam @tumido @sabre1041

Hi all, it seems that CI tests are failing now due to auth being enabled by default in the newer versions of Backstage. I've added a test secret just so we populate that value (even though in production users would add it via a secret)so the tests can continue. There is a weird couple of test scenarios whereby the auth.keys are only needed for two of the CI test values files we're using - which we may have to look into. Either way, it seems to have got past the auth.key issue now and onto a techdocs issue. Not sure if any of you have seen this recently? When I install in a local kind cluster I also get the same error.

ForwardedError: Plugin 'app' startup failed; caused by Error: Invalid app bundle schema. If this error is unexpected you need to run `yarn build` in the app. If that doesn't help you should make sure your config schema is correct and rebuild the app bundle again. Caused by the following schema error, Error: Config validation failed, Config must have required property 'techdocs' { missingProperty=techdocs } at 

Welcome your thoughts! If I can get this PR merged relatively quickly, there are some updates I want to make to the Postgres sub chart versions and contributing docs whilst I have time over the bank holiday here in the UK!

@sabre1041
Copy link
Contributor

@ChrisJBurns I'll try to find time to test this out at some point this weekend

vinzscam added 2 commits May 6, 2024 23:24
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
@vinzscam
Copy link
Member

vinzscam commented May 6, 2024

@vinzscam @tumido @sabre1041

Hi all, it seems that CI tests are failing now due to auth being enabled by default in the newer versions of Backstage. I've added a test secret just so we populate that value (even though in production users would add it via a secret)so the tests can continue. There is a weird couple of test scenarios whereby the auth.keys are only needed for two of the CI test values files we're using - which we may have to look into. Either way, it seems to have got past the auth.key issue now and onto a techdocs issue. Not sure if any of you have seen this recently? When I install in a local kind cluster I also get the same error.

ForwardedError: Plugin 'app' startup failed; caused by Error: Invalid app bundle schema. If this error is unexpected you need to run `yarn build` in the app. If that doesn't help you should make sure your config schema is correct and rebuild the app bundle again. Caused by the following schema error, Error: Config validation failed, Config must have required property 'techdocs' { missingProperty=techdocs } at 

Welcome your thoughts! If I can get this PR merged relatively quickly, there are some updates I want to make to the Postgres sub chart versions and contributing docs whilst I have time over the bank holiday here in the UK!

@ChrisJBurns tests are good now! Added just a small suggestion

charts/backstage/Chart.yaml Outdated Show resolved Hide resolved
charts/backstage/README.md Outdated Show resolved Hide resolved
auth:
keys:
# Is just a random b64 string for test purposes
- secret: N4+P+zJrErWRUGm0ZbVVhX1ZC81aSP81
Copy link
Member

@vinzscam vinzscam May 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI this won't be required anymore from the next version of Backstage as plugins will auto-configure service-to-service auth.
Of course let's keep it for now to get things unblocked

@sabre1041
Copy link
Contributor

@vinzscam @tumido @sabre1041
Hi all, it seems that CI tests are failing now due to auth being enabled by default in the newer versions of Backstage. I've added a test secret just so we populate that value (even though in production users would add it via a secret)so the tests can continue. There is a weird couple of test scenarios whereby the auth.keys are only needed for two of the CI test values files we're using - which we may have to look into. Either way, it seems to have got past the auth.key issue now and onto a techdocs issue. Not sure if any of you have seen this recently? When I install in a local kind cluster I also get the same error.

ForwardedError: Plugin 'app' startup failed; caused by Error: Invalid app bundle schema. If this error is unexpected you need to run `yarn build` in the app. If that doesn't help you should make sure your config schema is correct and rebuild the app bundle again. Caused by the following schema error, Error: Config validation failed, Config must have required property 'techdocs' { missingProperty=techdocs } at 

Welcome your thoughts! If I can get this PR merged relatively quickly, there are some updates I want to make to the Postgres sub chart versions and contributing docs whilst I have time over the bank holiday here in the UK!

@ChrisJBurns tests are good now! Added just a small suggestion

As long as you define the techDocs section in your app-config.yaml file, you will not hit the parsing issue @ChrisJBurns ran into.

@vinzscam
Copy link
Member

vinzscam commented May 8, 2024

@vinzscam @tumido @sabre1041
Hi all, it seems that CI tests are failing now due to auth being enabled by default in the newer versions of Backstage. I've added a test secret just so we populate that value (even though in production users would add it via a secret)so the tests can continue. There is a weird couple of test scenarios whereby the auth.keys are only needed for two of the CI test values files we're using - which we may have to look into. Either way, it seems to have got past the auth.key issue now and onto a techdocs issue. Not sure if any of you have seen this recently? When I install in a local kind cluster I also get the same error.

ForwardedError: Plugin 'app' startup failed; caused by Error: Invalid app bundle schema. If this error is unexpected you need to run `yarn build` in the app. If that doesn't help you should make sure your config schema is correct and rebuild the app bundle again. Caused by the following schema error, Error: Config validation failed, Config must have required property 'techdocs' { missingProperty=techdocs } at 

Welcome your thoughts! If I can get this PR merged relatively quickly, there are some updates I want to make to the Postgres sub chart versions and contributing docs whilst I have time over the bank holiday here in the UK!

@ChrisJBurns tests are good now! Added just a small suggestion

As long as you define the techDocs section in your app-config.yaml file, you will not hit the parsing issue @ChrisJBurns ran into.

FYI the techdocs issue has been fixed, so from the next release the config won't be required either

Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
@vinzscam vinzscam merged commit 68d8aec into main May 9, 2024
2 of 3 checks passed
@vinzscam vinzscam deleted the fixes-test branch May 9, 2024 19:45
@ChrisJBurns
Copy link
Contributor Author

Cheers all! Apologies for late reply, have been away from keyboard!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mandatory Auth Key in Latest Version of Backstage
4 participants