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

feat: mount the whole repo in the pgai-ext container and add ai.version() #514

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jgpruitt
Copy link
Collaborator

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.

@jgpruitt jgpruitt requested a review from MasterOdin February 26, 2025 00:30
@jgpruitt jgpruitt self-assigned this Feb 26, 2025
@jgpruitt jgpruitt requested a review from a team as a code owner February 26, 2025 00:30
@jgpruitt jgpruitt marked this pull request as draft February 26, 2025 00:39
@jgpruitt jgpruitt force-pushed the jgpruitt/git-hash branch 5 times, most recently from 4c4a2c9 to 0621125 Compare February 26, 2025 03:07
@jgpruitt jgpruitt force-pushed the jgpruitt/git-hash branch 3 times, most recently from 2e418f0 to a9451a9 Compare February 26, 2025 17:02
@jgpruitt jgpruitt marked this pull request as ready for review February 26, 2025 17:08
@jgpruitt jgpruitt requested a review from MasterOdin February 26, 2025 17:09
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

Successfully merging this pull request may close these issues.

2 participants