Skip to content

Populate new unit test properties and add flag to include unit tests in compiled graph#2063

Open
fernst wants to merge 15 commits intomainfrom
test-proto-changes
Open

Populate new unit test properties and add flag to include unit tests in compiled graph#2063
fernst wants to merge 15 commits intomainfrom
test-proto-changes

Conversation

@fernst
Copy link
Copy Markdown
Collaborator

@fernst fernst commented Jan 9, 2026

Populated new properties in unit test proto during compilation.

Also added a new workflow config setting to include unit tests in compiled DAG.

@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
Comment thread core/actions/test.ts Outdated
Copy link
Copy Markdown
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

Comment thread core/actions/test.ts Outdated
Comment thread core/actions/test_test.ts
Comment thread core/actions/test.ts Outdated
);
}

private overrideTargetWithNewName(target: dataform.ITarget, testName: string): dataform.Target {
Copy link
Copy Markdown
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
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Moved.

Comment thread 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
Copy Markdown
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
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Removed

Comment thread core/actions/index.ts
| Notebook
| DataPreparation;
| DataPreparation
| Test;
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've added a new configuration property to only add the unit tests to the compiled DAG when this setting is set. This ensures backwards compatibility and ensures the graph remains consistent for users who want to keep this behavior.

Copy link
Copy Markdown
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

@fernst fernst force-pushed the test-proto-changes branch from ce2591f to c3fb0a8 Compare April 22, 2026 19:07
… the compiled DAG as dependencies to the action being tested
@fernst fernst requested review from ikholopov-omni and kolina April 23, 2026 15:53
@fernst fernst changed the title Added new properties to Test proto Populate new unit test properties and add flag to include unit tests in compiled graph Apr 24, 2026
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