-
Notifications
You must be signed in to change notification settings - Fork 165
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
feat(backend): add service factories by default #1881
feat(backend): add service factories by default #1881
Conversation
The image is available at: |
The image is available at: |
The image is available at: |
/test e2e-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we do something more general than that, for all the default services added in the createdBackend()
method ?
With environment variables like:
ENABLE_OVERRIDING_SERVICE_ (serviceFactoryName being the service factory name mentioned in the list of default services: https://github.com/backstage/backstage/blob/master/packages/backend-defaults/src/CreateBackend.ts#L37)
I can look at doing that, certainly. I didn't see the same customization options offered for some of the other services when I was looking through them in preparation for this, so I opted to keep the scope for this much more narrow. But I'll take another look. Thanks! |
I like the last commit: 4a76ffa Would it be possible to add a unit test that would simply extract the upstream source file based on the |
The image is available at: |
Cool!
yeah good call, lemme look into that. |
The image is available at: |
The image is available at: |
The image is available at: |
The image is available at: |
45a8a71
to
db4d694
Compare
The image is available at: |
21b17fa
to
29f4885
Compare
The image is available at: |
29f4885
to
56589ae
Compare
The image is available at: |
@subhashkhileri something seems amiss with the test env, I wonder if the persistent store with the dynamic plugins isn't cleaned up between the non-rbac and rbac tests. Looking at the failed tests, I see the rbac showcase instance loaded the segment plugin:
But I can see it's disabled here. Is there a chance maybe the PV holding the dynamic-plugins-root is getting reused or could this be a symptom of trying to run tests concurrently? |
efe2f17
to
c59af97
Compare
The image is available at: |
/test e2e-tests |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: davidfestal The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This change explicitely adds the default service factories to the backend statically to prevent dynamic plugins from being able to override them by default. It's possible to override each statically added service factory via an environment variable derived from the service factory ID. So for example to add a "core.rootHttpService" service factory configuration from a dynamic plugin, set ENABLE_CORE_ROOTHTTPSERVICE_OVERRIDE to "true". This change also adds a logger to the backend main. Finally, a unit test has been added that checks the installed backend-defaults value for the defaultServiceFactories list against what this change adds to catch future regressions. Signed-off-by: Stan Lewis <[email protected]>
c59af97
to
2013b7b
Compare
New changes are detected. LGTM label has been removed. |
|
The image is available at: |
362da9d
into
redhat-developer:main
This change explicitely adds the default service factories to the backend statically to prevent dynamic plugins from being able to override them by default. It's possible to override each statically added service factory via an environment variable derived from the service factory ID. So for example to add a "core.rootHttpService" service factory configuration from a dynamic plugin, set ENABLE_CORE_ROOTHTTPSERVICE_OVERRIDE to "true". This change also adds a logger to the backend main. Finally, a unit test has been added that checks the installed backend-defaults value for the defaultServiceFactories list against what this change adds to catch future regressions. Signed-off-by: Stan Lewis <[email protected]>
Description
This change explicitely adds the default service factories to the backend statically to prevent dynamic plugins from being able to override them by default. It's possible to override each statically added service factory via an environment variable derived from the service factory ID. So for example to add a "core.rootHttpService" service factory configuration from a dynamic plugin, set ENABLE_CORE_ROOTHTTPROUTER_OVERRIDE to "true". This change also adds a logger to the backend main. Finally, a unit test has been added that checks the installed backend-defaults value for the defaultServiceFactories list against what this change adds to catch future regressions.
Which issue(s) does this PR fix
PR acceptance criteria
Please make sure that the following steps are complete:
How to test changes / Special notes to the reviewer
It's enough to just check that this doesn't break anything, however an example exists here that has a plugin that can be used to try this out.