Skip to content

Fix treesitter in client docker

Hongtao Yang requested to merge fix-client-docker-treesitter into main

What does this merge request do and why?

This MR fixes 2 bugs:

  1. A minor typo in the how-to doc

  2. Treesitter .so files are invalid in the container. Right now if we run code-suggestions eval pipeline in the client container, we'll get an invalid ELF header error, which means treesitter are built for the wrong os/platform/architechture.

    The reason for this is that we run COPY promptlib promptlib after building treesitter. This means the newly built treesitter .so files get overwritten by the copy. As a result, the treesitter binaries would be of macos instead of linux.

    The fix is to add **/.treesitter_lib in dockerignore, so the copy layer won't overwrite anything. We do want to built treesitter before the copy for efficient docker layer caching.

    (It took me 5 hours to identify this bug 😫 )

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Merge request checklist

  • I've ran the affected pipeline(s) to validate that nothing is broken.
  • Tests added for new functionality. If not, please raise an issue to follow up.
  • Documentation added/updated, if needed.
Edited by Hongtao Yang

Merge request reports

Loading