spectacles-ci / spectacles

A continuous integration tool for Looker and LookML.
https://spectacles.dev
MIT License
216 stars 34 forks source link

[Error] There is already a "field" named #712

Open aghazaly opened 1 year ago

aghazaly commented 1 year ago

There is an error complaining about duplicate field name between two views [Error] There is already a "field" named, even when Looker's LookML validation is not showing an error. Even after deleting the view which contains same names, the error still exists. Any idea what's causing this?

DylanBaker commented 1 year ago

Hey there @aghazaly. I haven't seen this one before.

Do you have the API Explorer installed on your Looker instance? The best first step would be to run LookML validation via the API to see if we are able to reproduce this directly on the Looker instance.

aghazaly commented 1 year ago

Hi @DylanBaker thanks for your reply.. I just tried the POST /projects/{project_id}/validate end point and I am getting (-1: Timeout) response

DylanBaker commented 1 year ago

Ah. I believe that's a timeout imposed in the API explorer. Would you mind running a short script that I send over to test it against the API without the API explorer?

aghazaly commented 1 year ago

Hi @DylanBaker sure thanks, can you please send over the script? and I will take a look

DylanBaker commented 1 year ago

@aghazaly here's a script for running it. If you have any issues, let me know! https://gist.github.com/DylanBaker/93293966d5ddcd209b4c219d667db3bb

aghazaly commented 1 year ago

Thanks @DylanBaker I am getting json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) error, any idea how to bypass that?

DylanBaker commented 1 year ago

I've just updated the script to use text instead of json(). Could you try that again? Thanks!

adityasingh02 commented 1 year ago

I have faced this issue as well and this is transient in nature. Dumping the changes into a new branch passes all the tests. One pattern I have seen is that it happens for dimensions of type "count" and complains that there is already a "field" when there is not on random views.

DylanBaker commented 1 year ago

We've had confirmation from Looker that this is a bug. They are working to fix it and we'll update here once it is resolved.

DylanBaker commented 1 year ago

The Looker issue ID for this is 288376313.

attrivivekFF commented 1 year ago

@DylanBaker Any update on this issue? It is impacting our velocity a lot. Only one commit passes out of a plenty.

DylanBaker commented 1 year ago

Hi @attrivivekFF. I've just followed up with Looker to get an ETA.

enrique-villarrealp commented 1 year ago

Also interested in getting an ETA regarding this issue. Tried to implement this and while initially it ran OK, I'm getting false positives in a measure that starts with count_ even if it's of type sum

DylanBaker commented 1 year ago

Partial answer from Looker: "This is only an issue with JDK 11 but not JDK 8, so if downgrading JDK is a possibility for you that may resolve the issue for now."

You should be able to get in touch with support and ask them to downgrade your version. It shouldn't result in any feature differences or performance issues, but support should hopefully be able to confirm that.

enrique-villarrealp commented 1 year ago

For those wondering - we have downgraded our JDK to v8 and it does seem to have fixed the issue! They confirmed that it indeed shouldn't have any impact on performance or features.

I will report here again should we find ourselves needing to revert back to 11 or disabling the validator!

attrivivekFF commented 1 year ago

Same here. Looker downgraded our jdk version to 8 as well. We are also not facing tbis error anymore. Will post here if start seeing this error again.