Skip to content

Conversation

@Laren-AWS
Copy link
Contributor

Tributaries must validate using strictly the root config + their own config. The current order is to:

  1. Load the root config.
  2. Load the tributary config + examples all at once.
  3. Merge the tributary onto the root config.
  4. Validate.

Because of this, the DocGen used for loading examples in step 2 did not have the services and SDKs merged and, when the examples are loaded, preliminary validation is performed (checking that the language in the example exists in the SDK list) and fails.

This PR updates the order for tributary validation to be:

  1. Load root config.
  2. Load and merge tributary config.
  3. Load and merge tributary examples.
  4. Validate.

In this way, at step 3 the DocGen has all of the merged config it needs and the examples pass the preliminary checks.

Testing

I refactored slightly to help write a unit test that can call validate to test the whole process instead of unit tests in isolation, and added a test to simulate validating a tributary with a custom SDK.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

…tary config, then load ane merge tributary examples.
@Laren-AWS Laren-AWS requested a review from cpyle0819 March 3, 2025 19:52
@Laren-AWS Laren-AWS self-assigned this Mar 3, 2025
@Laren-AWS Laren-AWS added the Bug An update to fix incorrect code or typos. label Mar 3, 2025
@Laren-AWS Laren-AWS merged commit ea74e66 into main Mar 3, 2025
2 of 3 checks passed
@Laren-AWS Laren-AWS deleted the bug/merge-config-then-examples branch March 3, 2025 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug An update to fix incorrect code or typos.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants