ciejer/tangata_local

Code Change History is empty

Closed this issue · 4 comments

b-per commented

When I select models (even ones that have been changed many times), there is no information under "Code Change History". There is no error showing up in the logs though.

Interesting. The git log functionality is parsing text output from a git_bin command - I'm using --pretty so should be cross-platform formatting, but clearly there's a difference.
Could you please provide a few (redacted if necessary) lines from the below command in your dbt folder:

git log --numstat --pretty=format:"\t\t\t%H\t%h\t%at\t%aN\t%s"

Example output on my windows box:

\t\t\t382aed1ae7ec9f38c83bc57f84f5b53bc0e9d9f4\t382aed1\t1624086742\tChris Jenkins\tBug fixes
4       1       tangata/tangata_api.py

\t\t\tb984dbab1704f6fb598e255e6b325720ab01fc09\tb984dba\t1623957228\tChris Jenkins\t0.1.10 changes
2       1       setup.py
0       1       tangata/static/css/main.0b94cd05.chunk.css.map
b-per commented

Your output looks pretty similar to mine:

\t\t\t17592cd081e418f0e7dca8e53befea3cdee29743\t17592cd\t1624259766\tBenoit xxx\tMerged PR 3219: Modifications for report A
\t\t\t99b68e6eb7f5e64ddf6d12f0b201950862f81b46\t99b68e6\t1624258513\tBenoit xxx\tNew models for report A
14      0       models/marts/model1.sql
25      0       models/marts/marts.yml
28      0       models/staging/xxx/yyy/model2.sql

\t\t\t077eb72170deeeebcc4787ed7b561e03a79fee60\t077eb72\t1624258081\tBenoit xxx\tFix logic in report C
22      4       models/marts/model3.sql

Found it, in tangata_catalog_compile.py.
220 thisFile = lineTabs[2].rstrip("\n").replace("/","\\")
This swaps out the unix format / for a windows-friendly escaped \ prior to matching with the catalog - I'll have a think on this, should be reasonably straightforward to solve.

Resolved by swapping all file paths to use forward slash - conveniently works in Powershell. Will be working in 0.1.13 when released.