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

Assertions configs as protos #1731

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

Ekrekr
Copy link
Contributor

@Ekrekr Ekrekr commented May 9, 2024

#1732 contains better default assertion schema handling, so should be merged beforehand

@Ekrekr
Copy link
Contributor Author

Ekrekr commented May 10, 2024

Have tidied up the diff with the previous PRs, much cleaner now!

Comment on lines +196 to +199
unverifiedConfig.dependencyTargets = unverifiedConfig.dependencies.map(
(dependency: string | object) =>
typeof dependency === "string" ? { name: dependency } : dependency
);
Copy link
Collaborator

Choose a reason for hiding this comment

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

use resolvableAsTarget

@@ -245,6 +188,42 @@ export class Assertion extends ActionBuilder<dataform.Assertion> {
VerifyProtoErrorBehaviour.SUGGEST_REPORTING_TO_DATAFORM_TEAM
);
}

private verifyConfig(unverifiedConfig: any): dataform.ActionConfig.AssertionConfig {
Copy link
Collaborator

Choose a reason for hiding this comment

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

IMO it'd be cleaner to continue having a real type.

interface LegacyAssertionConfig extends dataform.ActionConfig.AssertionConfig {
  dependencies: Resolvable[],
  ...
}

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.

None yet

2 participants