Page MenuHomeElementl

[dagster-graphql] Dagster GraphQL Python Client [2/4]

Authored by sidkmenon on Apr 14 2021, 6:18 AM.
Referenced Files
Unknown Object (File)
Fri, Jun 2, 7:28 AM
Unknown Object (File)
Tue, May 23, 1:03 AM
Unknown Object (File)
Wed, May 17, 10:15 AM
Unknown Object (File)
Tue, May 16, 3:28 PM
Unknown Object (File)
Tue, May 16, 12:05 AM
Unknown Object (File)
Sat, May 13, 11:25 PM
Unknown Object (File)
Fri, May 12, 12:17 AM
Unknown Object (File)
Wed, May 10, 1:26 PM



This diff creates the dagster-graphql-client CLI:

  1. Adds BK checks to ensure that current GraphQL queries by the client are included in a legacy query query_snapshot folder via dagster-graphql-client query check a. It also adds the dagster-graphql-client query snapshot command to add the GraphQL client's queries to the query_snapshot directory
  2. Tests to ensure that each query in the client_backcompat directory is still supported by the GraphQL server (so at a minimum, we can be intentional about breaking changes that arise)

Depends on D7409

Test Plan

bk script checks + new backcompat tests (this diff is mostly tests)

Diff Detail

R1 dagster
Lint Not Applicable
Tests Not Applicable

Event Timeline

sidkmenon held this revision as a draft.

Fixing build errors (typo in the pip install directives on helm)

sidkmenon retitled this revision from dagster-graphql] Dagster GraphQL Python Client [2/3] to [dagster-graphql] Dagster GraphQL Python Client [2/3].

This script looks better placed in python_modules/automation since it's generating some persisted artifacts (the query snapshots) - it should probably be invoked as dagster-graphql-client.

Might make sense to split the logic you have in check_python_client_queries_in_backcompat_directory. It's pretty hard to grok what's happening. There's two things you are doing:

  1. Checking if all queries are present
  2. Rehydrating the queries

1 and 2 should be separate methods (i.e. separate click commands), instead of gating by boolean. Just seems cleaner to separate these ideas.

Then, we can just invoke them separately. The bk check would do something like dagster-graphql-client query check and if that fails, then the user should dagster-graphql-client query snapshot to rehydrate the
client_backcompat/ queries

1 ↗(On Diff #35372)

unnecessary new line?

45 ↗(On Diff #35372)
This revision now requires changes to proceed.Apr 14 2021, 8:43 PM
sidkmenon marked an inline comment as done.

Responding to comments - refactoring cli to dagster-graphql-client cli

Adding checks for redundant dagster-graphql-client query snapshot calls and refactoring

Added regex check to remove redundant spacing from query strings as well

Adding dagster-graphql to tox.ini and in automation

Trying installation of dagster-graphql to fix build

Adding for the dagster-graphql-client CLI

sidkmenon retitled this revision from [dagster-graphql] Dagster GraphQL Python Client [2/3] to [dagster-graphql] Dagster GraphQL Python Client [2/4].Apr 19 2021, 5:18 PM
sidkmenon edited the summary of this revision. (Show Details)
rexledesma added inline comments.

nit: these can be separate lines

This revision is now accepted and ready to land.Apr 19 2021, 5:28 PM
sidkmenon marked an inline comment as done.

nit fixes