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

Commit works smooth even if there are errors in issues.md #93

Closed
shreyabnsl09 opened this issue May 25, 2022 · 6 comments
Closed

Commit works smooth even if there are errors in issues.md #93

shreyabnsl09 opened this issue May 25, 2022 · 6 comments

Comments

@shreyabnsl09
Copy link

I'm trying to integrate LAMS with Looker using Gitlab. Created 'Gitlab-ci.yml' file and pipeline is running. Can see 'issues.md' file in pipeline job artifacts.
My concern is even if I have errors in my issues.md file, 'commit changes' from Looker works smooth. Shouldn't the commit fail since there are errors in issues.md file?

Objective : Developer shouldn't be able to commit their changes if there are errors in issues.md file. (Issues.md file is available in job artifacts)

@fabio-looker
Copy link
Collaborator

Hi @shreyabnsl09

It depends on which version of LAMS you are using, and how you have configured your CI process.

Note that between v1 and v2, the default output mode of LAMS changed, from the issues.md file to stdout/command-line output. However, the deployment example for Gitlab CI is still for v1, as I don't use Gitlab and depend on the community to help maintain that deployment example (see #91 )

Can you confirm what version of LAMS you are running and what your CI configuration looks like?

@shreyabnsl09
Copy link
Author

shreyabnsl09 commented May 26, 2022

@fabio-looker Thanks for your response.
I am using Version 1 of LAMS and this is my gitlab-ci.yml file. I am using docker image from docker hub.
gitlab-ci

@shreyabnsl09
Copy link
Author

@PieterjanCriel
Any suggestions on this?

@shreyabnsl09
Copy link
Author

@fabio-looker Any suggestions on this?
I tried with LAMS V2 as well. Still experiencing the same behavior.

@fabio-looker
Copy link
Collaborator

From the contributed example, it's not clear to me whether its intended effect is to prevent some action entirely, or to merely provide the findings in an artifacts for a reviewer's use. Other than that possibly incorrect observation, I really don't know how Gitlab CI expects things to be configured.

Also, if the linter is running in CI (which is a separate machine from the developer), that kind of implies the code has already been committed. You could prevent the code from being merged, but it's too late to prevent it from being committed. For that, you would probably need something like https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks , however that is for situations where developers are writing the LookML on their own computers and willing to setup a dev environment with Node.js and the linter

@fabio-looker
Copy link
Collaborator

Closing as duplicate of #91

@fabio-looker fabio-looker closed this as not planned Won't fix, can't repro, duplicate, stale Oct 17, 2022
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

No branches or pull requests

2 participants