spectacles icon indicating copy to clipboard operation
spectacles copied to clipboard

Spectacles not picking up latest commits to branch

Open ronduursma opened this issue 2 years ago • 7 comments

After I make commits to my branch and (re)run spectacles, it doesn't seem to see my changes. Strange because this used to work before and I'm not sure what changed.

$ spectacles sql --config-file looker_dev_config.yaml --project erx-corereports --fail-fast --explores star-schema/purchase_order_item_data --port 9199 --do-not-track --branch 14638

I ran it with -v, and attached the log file. Any help appreciated. 14638.log

ronduursma avatar Jun 27 '23 13:06 ronduursma

Is there any chance you've recently changed from testing commit to testing branch?

When testing commit, it will always find the right place, but when testing branch you sometimes need to do a pull from your version control system to get the branch updates. This is done with the --remote-reset flag. Docs are here.

Could you please try that and let me know if that solves your issue? Thanks!

DylanBaker avatar Jun 27 '23 13:06 DylanBaker

My apologies. When I pasted the command line, I inadvertently left off the --remote-reset part. We always use it.

ronduursma avatar Jun 27 '23 14:06 ronduursma

Hmm. The logs all look like what I'd expect. Would you mind telling me about the changes that you made and what you would expect to be different from the output?

DylanBaker avatar Jun 27 '23 15:06 DylanBaker

Basically like this.

dimension: testfield { ... sql: ${TABLE}.badfield ;; }

I'll get a SQL error that badfield doesn't exist. I'll change badfield to goodfield, commit, run spectacles again with --remote-reset, but I'm still getting the error about badfield. There are no other occurrences of that. The only time this error went away was over the weekend when Looker was restarted, but since then, my commits aren't picked up by spectacles.

ronduursma avatar Jun 27 '23 15:06 ronduursma

@ronduursma Thanks for the context. Would you be able to try running this with the commit hash instead of the branch? I'm curious to see if that results in similarly incorrect behaviour, as it's unfortunately not at all clear to me what could be hpapening to cause this.

DylanBaker avatar Jun 28 '23 10:06 DylanBaker

@DylanBaker I tried that, using --commit-ref, and it now does the right thing. Retested with the branch just to be sure and that's still doing the wrong thing. So I can make some progress now, but that's strange.

ronduursma avatar Jun 28 '23 15:06 ronduursma

I'm seeing similar behavior with our branches

jschintz-windriver avatar Aug 08 '23 20:08 jschintz-windriver