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] reduce spurious diffs to snowflake_view statement #171

Merged
merged 7 commits into from
Apr 27, 2020

Conversation

ryanking
Copy link
Contributor

@ryanking ryanking commented Apr 24, 2020

Make an effort to normalize queries that create views.

Snowflake does not preserve formatting when round-tripping these
queries, so to compare changes we need to do some normalization. See the
comment in the code for limitations.

Test Plan

  • acceptance tests

References

Go modules have gotten good enough that vendoring does not seem worth
the cost any more.

This removes the vendor directory and adds a step to our build to detect
some problems with go.{mod,sum} being out of date.
Make an effort to normalize queries that create views.

Snowflake does not preserve formatting when round-tripping these
queries, so to compare changes we need to do some normalization. See the
comment in the code for limitations.
@ryanking ryanking marked this pull request as ready for review April 27, 2020 16:32
@ryanking ryanking requested a review from a team as a code owner April 27, 2020 16:32
@ryanking ryanking assigned jgadling and edulop91 and unassigned jgadling Apr 27, 2020
@codecov-io
Copy link

codecov-io commented Apr 27, 2020

Codecov Report

Merging #171 into master will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #171      +/-   ##
==========================================
- Coverage   67.87%   67.86%   -0.02%     
==========================================
  Files          46       46              
  Lines        3088     3087       -1     
==========================================
- Hits         2096     2095       -1     
  Misses        717      717              
  Partials      275      275              
Impacted Files Coverage Δ
pkg/resources/view.go 50.73% <100.00%> (-0.36%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update edef0a0...bb0647a. Read the comment docs.

pkg/testhelpers/fixtures.go Outdated Show resolved Hide resolved
pkg/resources/view.go Outdated Show resolved Hide resolved
@edulop91 edulop91 assigned ryanking and unassigned ryanking Apr 27, 2020
Co-Authored-By: Eduardo Lopez <elopez@chanzuckerberg.com>
@edulop91 edulop91 assigned ryanking and unassigned edulop91 Apr 27, 2020
@ryanking ryanking assigned edulop91 and unassigned ryanking Apr 27, 2020
Copy link

@edulop91 edulop91 left a comment

Choose a reason for hiding this comment

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

this is great, thank you

@edulop91 edulop91 assigned ryanking and unassigned edulop91 Apr 27, 2020
@czimergebot czimergebot merged commit 77669b0 into master Apr 27, 2020
@ryanking ryanking deleted the ryanking/cleanup-query-diffs branch October 9, 2020 17:38
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.

None yet

6 participants