Skip to content

Conversation

@fernst
Copy link
Collaborator

@fernst fernst commented Jan 9, 2026

Added new properties to Test proto, including target/canonical target and dependency targets.

Updated compilation logic to add tests as dependencies to the action being tested.

@fernst fernst requested a review from a team as a code owner January 9, 2026 02:27
@fernst fernst requested review from Tuseeq1 and removed request for a team January 9, 2026 02:27
@fernst fernst force-pushed the test-proto-changes branch 2 times, most recently from 512080f to 6f6b3ee Compare January 9, 2026 02:57
@fernst fernst requested a review from kolina January 9, 2026 02:58
this.testTarget = dataform.Target.create(dataset.getTarget());

// Set the test query with the fully qualified table references.
if (dataset instanceof Table) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

These if/else branches are equivalent

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

True. I've consolidated this code.

Copy link
Contributor

@kolina kolina left a comment

Choose a reason for hiding this comment

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

Can you please against the latest main? So integration tests will run with non-expired credentials

@fernst fernst force-pushed the test-proto-changes branch from 0dc9788 to b03d245 Compare January 12, 2026 20:25
);
}

private overrideTargetWithNewName(target: dataform.ITarget, testName: string): dataform.Target {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: Can be a local function, as it doesn't depend on this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved.

core/session.ts Outdated
const fullyQualifiedDependencies: { [name: string]: dataform.ITarget } = {};
if (action instanceof dataform.Declaration || !action.dependencyTargets) {
// Declarations cannot have dependencies.
// Declarations cannot have dependencies.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: dangling whitespace?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed

| Notebook
| DataPreparation;
| DataPreparation
| Test;
Copy link
Collaborator

Choose a reason for hiding this comment

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

The addition of tests to the list of targets in the compiled graph and a dependency, changes in session.test backing structure is technically a breaking change.

At the very least we should bump a minor version, once we merger theses changes.

Copy link
Collaborator Author

@fernst fernst Jan 13, 2026

Choose a reason for hiding this comment

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

I've since removed the dependency changes (meaning tests are in the DAG, but not connected to any other action).

Should we still do the minor version bump? Or can we keep it under patch versions until we add the new tests into the middle of the DAG?

Copy link
Collaborator

Choose a reason for hiding this comment

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

At the moment there are still breaking changes in Dataform Core API, specifically in Session object. Bottom line is these changes shouldn't be released under a patch, which means that we should either:

  1. Exercise control and block all @dataform/core releases until all breaking changes are submitted from the feature branch
  2. Prepare all breaking changes in a separate branch and them merge them in a single commit with a minor version bump.

At the moment we don't have any automation to enforce (1) repo-wide. I think executing (2) is easier.

Copy link
Contributor

Choose a reason for hiding this comment

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

Current changes LGTM from my side, will wait for resolution in this thread to approve the PR

Copy link
Contributor

@kolina kolina left a comment

Choose a reason for hiding this comment

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

Waiting on resolution of how to update Dataform core version with these changes

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.

3 participants