feat: breaking changes detection against the backend server (HEXA-1238)#260
Conversation
| last_checked = get_last_checked() | ||
| current_time = time.time() | ||
| if not last_checked or (current_time - last_checked) >= _COOLDOWN_PERIOD: | ||
| detect_graphql_breaking_changes(token) | ||
| update_last_checked() |
There was a problem hiding this comment.
Not totally convinced myself on the caching on the disk. WDYT ?
There was a problem hiding this comment.
Mmm me neither. I'd prefer to store this in the config of the user (where we store the workspaces and the token)
There was a problem hiding this comment.
Ok I agree, will do the change
| last_checked = get_last_checked() | ||
| current_time = time.time() | ||
| if not last_checked or (current_time - last_checked) >= _COOLDOWN_PERIOD: | ||
| detect_graphql_breaking_changes(token) | ||
| update_last_checked() |
There was a problem hiding this comment.
Mmm me neither. I'd prefer to store this in the config of the user (where we store the workspaces and the token)
| click.echo(click.style(f"- {change.description}", fg="yellow")) | ||
| click.echo(click.style("This could lead to unexpected results.", fg="red")) | ||
| click.echo( | ||
| click.style( |
There was a problem hiding this comment.
Could you give an example of command to update the openhexa.sdk package to the user as well please ?
There was a problem hiding this comment.
Good idea, thanks
…dk-version-compatibility-check-system-breaking-changes-detection
|
To test it I for example removed query param search from pipeline query in sdk, reinstalled sdk in venv, and then tried to push the pipeline to my OH instance locally , expected behavior is for the push to fail with the waring message as in example? |
|
We have had many issue caused by discrepancies between the SDK and the backend. This PR is about introducing a comparison between the backend GraphQL Schema and the one used by the SDK. A warning is shown when breaking changes are detected.
Changes
find_breaking_changesfromgraphql-coreto find breaking changes between a local version of the schema and the one used by the backend.Screenshots / screencast