Move dashboard service provider seeding to run-time from image-build time#9628
Merged
mitchellhenke merged 1 commit intomainfrom Nov 20, 2023
Merged
Conversation
…time changelog: Internal, Review Applications, Move dashboard service provider seeding to run-time from image-build time
zachmargolis
approved these changes
Nov 20, 2023
Comment on lines
+2
to
+10
| if ENV['KUBERNETES_REVIEW_APP'] == 'true' && ENV['DASHBOARD_URL'].present? | ||
| dashboard_url = ENV['DASHBOARD_URL'] | ||
|
|
||
| service_provider_seeder = ServiceProviderSeeder.new | ||
| service_provider_seeder.write_review_app_yaml(dashboard_url: dashboard_url) | ||
| service_provider_seeder.run | ||
| else | ||
| ServiceProviderSeeder.new.run | ||
| end |
Contributor
There was a problem hiding this comment.
maybe just for funsies what if we combined these with a .tap
Suggested change
| if ENV['KUBERNETES_REVIEW_APP'] == 'true' && ENV['DASHBOARD_URL'].present? | |
| dashboard_url = ENV['DASHBOARD_URL'] | |
| service_provider_seeder = ServiceProviderSeeder.new | |
| service_provider_seeder.write_review_app_yaml(dashboard_url: dashboard_url) | |
| service_provider_seeder.run | |
| else | |
| ServiceProviderSeeder.new.run | |
| end | |
| ServiceProviderSeeder.new.tap do |service_provider_seeder| | |
| if ENV['KUBERNETES_REVIEW_APP'] == 'true' && ENV['DASHBOARD_URL'].present? | |
| dashboard_url = ENV['DASHBOARD_URL'] | |
| service_provider_seeder.write_review_app_yaml(dashboard_url: dashboard_url) | |
| end | |
| end.run |
Contributor
Author
There was a problem hiding this comment.
I have a soft preference for the initial implementation, it feels slightly clearer to me.
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.
🛠 Summary of changes
Follow-up to #9563. We use the IDP review app image in other application pipelines (dashboard, PKI) and those must be able to provision a dashboard that works with their IDP. Building the
service_providers.ymlin the image means it will only work for that review app universe.This PR moves it to the runtime of the
db:seedtask so that a PR inidentity-dashboardcan provision an IDP and use the correct URL for the dashboard.