Skip to content

Allow passing a config override file through the configuration endpoint.#1452

Merged
Mathos1432 merged 11 commits intomainfrom
user/matrembl/configv2
May 12, 2023
Merged

Allow passing a config override file through the configuration endpoint.#1452
Mathos1432 merged 11 commits intomainfrom
user/matrembl/configv2

Conversation

@Mathos1432
Copy link
Contributor

@Mathos1432 Mathos1432 commented Apr 25, 2023

Why make this change?

We want to be able to provide the configuration file and a set of overrides when configuring the engine at runtime. This will allow us to override any existing or new setting without requiring an other update to the configuration endpoint.

closes #1484

What is this change?

  • This adds a second configuration endpoint at /configuration/v2. This endpoint expects a "Configuration Overrides" which matches the schema of the configuration file.
  • Update tests to validate both the old and the v2 endpoint.

How was this tested?

  • Integration Tests
  • Unit Tests

Remaining work

  • Once SWA integration is updated to use the new configuration endpoint, the old one will be removed.

@Mathos1432 Mathos1432 force-pushed the user/matrembl/configv2 branch 2 times, most recently from c6c26ce to 68b6925 Compare April 27, 2023 01:34
@Mathos1432 Mathos1432 force-pushed the user/matrembl/configv2 branch from 68b6925 to 2bb4c0f Compare May 9, 2023 13:44
@Mathos1432 Mathos1432 force-pushed the user/matrembl/configv2 branch from 2bb4c0f to 2cf5181 Compare May 9, 2023 19:32
@Mathos1432 Mathos1432 added hosting config changes related to config swa-integration changes related to swa integration labels May 11, 2023
@Mathos1432 Mathos1432 self-assigned this May 11, 2023
@Mathos1432 Mathos1432 marked this pull request as ready for review May 11, 2023 14:45
@Mathos1432 Mathos1432 changed the title [Draft] Allow passing a config override file throug the configuration endpoint. Allow passing a config override file through the configuration endpoint. May 11, 2023
Copy link
Collaborator

@Aniruddh25 Aniruddh25 left a comment

Choose a reason for hiding this comment

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

Thank you getting this change in so quickly after the config-merge feature was added! LGTM, left a few questions.

Copy link
Member

@mbhaskar mbhaskar left a comment

Choose a reason for hiding this comment

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

Minor suggestion but LGTM.

@Mathos1432 Mathos1432 enabled auto-merge (squash) May 12, 2023 19:42
@Mathos1432 Mathos1432 merged commit 24fc8f7 into main May 12, 2023
@Mathos1432 Mathos1432 deleted the user/matrembl/configv2 branch May 12, 2023 19:59
}
}

private static string GenerateMockJwtToken()
Copy link
Collaborator

Choose a reason for hiding this comment

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

JwtTokenAuthenticationUnitTests.cs has a similar CreateJwt() function. Could you reuse that here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config changes related to config hosting swa-integration changes related to swa integration

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Hosted scenario should provide the ability to merge 2 config files

3 participants