feat: mount the whole repo in the pgai-ext container and add ai.version() #514
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We want to add a way to get the git commit hash of the extension's build from a SQL function. To do this, the
.git
directory must be inside the dev container. With this PR, we now mount the whole repo into the extension dev container. This lets us access git information during the build process.Additionally, this allows us to access the
examples
directory from the dev container, which is helpful in testing the examples (especially the text-to-sql one).I moved the
.venv
python virtual environment to/py/.venv
inside the dev container. This is NOT mounted to the host. Thus, the.venv
inside the container and the.venv
on the host cannot possibly clash.