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

LookML Validation facing Unexpected Read error #725

Open
enrique-villarrealp opened this issue Jul 27, 2023 · 9 comments
Open

LookML Validation facing Unexpected Read error #725

enrique-villarrealp opened this issue Jul 27, 2023 · 9 comments

Comments

@enrique-villarrealp
Copy link

image

We've started facing this weird issue, somewhat inconsistently. Some PRs are triggering it, some PRs aren't. Has anyone faced this before?

One PR seemed to fix this by adding an unrelated LAMS exception, though I'm not sure why this would happen.

@enrique-villarrealp enrique-villarrealp changed the title LookML Validation facing Unexpected REad LookML Validation facing Unexpected Read error Jul 27, 2023
@enrique-villarrealp
Copy link
Author

enrique-villarrealp commented Jul 27, 2023

Forcing the CI jobs to run in debug mode doesn't point to any issue, but does make the CI successful...

Edit: lucky runs I guess, this is not a consistent solution. Back to square one

@enrique-villarrealp
Copy link
Author

Could this be because of the concurrency problem? Having multiple PRs trigger the check at once

@DylanBaker
Copy link
Collaborator

@enrique-villarrealp, would you mind sharing the full logs from a run when running in verbose -v mode please?

This isn't behaviour we have seen before. It could theoretically be due to concurrency. It's possible that Looker doesn't like the same user running two LookML validations simultaneous (or that the changing of the branch mid-validation is causing the issue). As we talk about in our docs, we can't really support multiple simultaneous runs with the same user's credentials because of how Looker handles it.

@LProcopi15
Copy link

LProcopi15 commented Aug 23, 2023

@DylanBaker we're running into the same issue. Similar to @enrique-villarrealp this issue is only happening intermittently. To recreate, I opened a new branch and edited some LookML. No one else on the team has run the CI job since yesterday and no one else on the team is working off of this branch, so there should not be an issue with concurrency.

Error Details

On the first CI run the job on my new branch, the CI failed. I ran in verbose mode and here are the logs:

image
image
image

I then re-triggered a run of the job in Github and it ran without error.

Some Additional Context

Here's the contexts of our Github action yml
name: Spectacles CI Run

on:
  pull_request:
    paths:
      - 'looker/**.lkml'
  workflow_dispatch:

concurrency:
  group: spectacles-validate
  cancel-in-progress: true

jobs:
  spectacles-validate:
    runs-on: ubuntu-latest
    defaults:
      run:
        shell: bash
        working-directory: dbt

    env:
      HEAD_REF: ${{ github.head_ref }}
      LOOKER_BASE_URL: ${{ secrets.LOOKER_BASE_URL }}
      LOOKER_CLIENT_ID: ${{ secrets.LOOKER_CLIENT_ID }}
      LOOKER_CLIENT_SECRET: ${{ secrets.LOOKER_CLIENT_SECRET }}

    steps:
      - uses: actions/checkout@v3

      - uses: actions/setup-python@v4
        with:
          python-version: 3.9

      - name: Install dependencies
        run: pip install spectacles pydantic==1.10.9

      - name: Validate LookML Syntax
        run: bash ../etc/ci.run-spectacles-lookml.sh
Here's the contexts of ci.run-spectacles-lookml.sh referenced in the action yml
    spectacles lookml \
        --base-url ${LOOKER_BASE_URL} \
        --client-id ${LOOKER_CLIENT_ID} \
        --client-secret ${LOOKER_CLIENT_SECRET} \
        --project replicated \
        --branch ${HEAD_REF} \
        -v

Any thoughts on what might be causing this?

@enrique-villarrealp
Copy link
Author

Ah, dang. I missed this. Recently it's been working better for us, but should we see that again, I will share the logs.

@LProcopi15
Copy link

@enrique-villarrealp did you make any changes to help resolve this?

@enrique-villarrealp
Copy link
Author

enrique-villarrealp commented Aug 29, 2023

@enrique-villarrealp did you make any changes to help resolve this?

Not really, sadly :/ We mostly advise the user to re-run the job like you did, and eventually it works.

@LProcopi15
Copy link

Closing the loop on this in event anyone else is having the issue! We pinned pydantic==1.10.9 in early July when the release of pydantic 2.0.0 was causing compatibility issues with Spectacles. The Specatacles team resolved this by pinning "pydantic<2.0.0" on July 3rd (#724), but we never went back and removed our pinned version.

I removed it and now everything is running smoothly 🎉

@LProcopi15
Copy link

Just kiddinggg :/ still getting the error sometimes. Will continue to look into this this week...

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

3 participants