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

fix: backward compatibility broken for Dataform v2.x #86

Merged
merged 9 commits into from
Jan 13, 2025

Conversation

ashish10alex
Copy link
Owner

@ashish10alex ashish10alex commented Jan 7, 2025

This PR

  • Fixes the broken backward compatibility of the extension when working with Dataform projects using version 2.x . Dataform CLI v2.x adds a json block showing some kind of logging which no longer exists in v3. This PR first tries to parse the JSON block as is, if that gives an error we read the JSON block assuming it has multiple blocks and pick the first block as the block which has Datfaorm metadata. See screenshots below to see the additional json block at index [0].
  • Improve error messages when user tries to use v2.x cli with a v3.x project

CleanShot 2025-01-12 at 11 45 38@2x

CleanShot 2025-01-12 at 11 44 12@2x

Tests

  • Extension works as expected for both v2.x v3.x projects. - compiles, shows compilation errors and dry run errors as before

NOTE
The tests for v2.x were largely done for v2.9 but the extra JSON block did seem to be there for one other v2.x version as well.

@ashish10alex ashish10alex marked this pull request as draft January 9, 2025 14:51
@ashish10alex ashish10alex marked this pull request as ready for review January 12, 2025 11:51
@ashish10alex ashish10alex merged commit 7f921fc into main Jan 13, 2025
@ashish10alex ashish10alex deleted the backward_comp branch January 13, 2025 18:27
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.

1 participant