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

[CT-1539] [Feature] Ignore manifest.json files for git grep #6294

Closed
3 tasks done
dbeatty10 opened this issue Nov 19, 2022 · 2 comments · Fixed by #6462
Closed
3 tasks done

[CT-1539] [Feature] Ignore manifest.json files for git grep #6294

dbeatty10 opened this issue Nov 19, 2022 · 2 comments · Fixed by #6462
Assignees
Labels
tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality

Comments

@dbeatty10
Copy link
Contributor

dbeatty10 commented Nov 19, 2022

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature

Problem

There are multiple lengthly JSON files that make it harder to scroll through git grep ... results.

Here is an example file that gums up the results when doing a search like this:

git grep "unrendered_config" tests

Although this JSON file is all text, it's all on a single line which makes it behave more like a binary file for text comparison tools.

Solution

  1. Create a .gitattributes file in the root directory
  2. Add a line like the following (tweak as needed/desired -- e.g., replace binary with -diff or -text -diff)
    tests/functional/artifacts/data/state/*/manifest.json binary
    
  3. Add this line to capture another file that commonly causes overwhelm:
    core/dbt/include/index.html binary
    

Then a command like the following will have more consumable results:

$ git grep "unrendered_config" tests

Binary file tests/functional/artifacts/data/state/v4/manifest.json matches
Binary file tests/functional/artifacts/data/state/v5/manifest.json matches
Binary file tests/functional/artifacts/data/state/v6/manifest.json matches
Binary file tests/functional/artifacts/data/state/v7/manifest.json matches
tests/functional/artifacts/expected_manifest.py:                "unrendered_config": unrendered_model_config,
...

Describe alternatives you've considered

No response

Who will this benefit?

No response

Are you interested in contributing this feature?

No response

Anything else?

No response

@dbeatty10 dbeatty10 added enhancement New feature or request triage labels Nov 19, 2022
@dbeatty10 dbeatty10 self-assigned this Nov 19, 2022
@github-actions github-actions bot changed the title [Feature] Ignore manifest.json files for git grep [CT-1539] [Feature] Ignore manifest.json files for git grep Nov 19, 2022
@dbeatty10 dbeatty10 removed the triage label Nov 19, 2022
@gshank
Copy link
Contributor

gshank commented Nov 19, 2022

Can we also skip the core/dbt/include/index.html file?

@dbeatty10
Copy link
Contributor Author

Can we also skip the core/dbt/include/index.html file?

Yeah! Good call @gshank -- added that file name to the description above

@jtcohen6 jtcohen6 added tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality and removed enhancement New feature or request labels Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants