-
Notifications
You must be signed in to change notification settings - Fork 34
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
Implement event trigger to remove jobs from vectorize.job upon table deletion #164
Conversation
@ChuckHend Can have a review on this PR? |
It seems test fails are not related of changes in this PR? Any changes needed or can be merged @ChuckHend ? |
@varshith257 yes these tests will fail for any branch that isnt part of the org (due to security policy on the repo). It is because there is an API key and it is in a github secret. We can ignore those tests. |
@ChuckHend Can it be merged? |
Sorry we haven't had a chance to do a thorough review yet. Can you add a test that asserts the records are indeed dropped? |
Sure! |
2fe17a9
to
a6b9886
Compare
@ChuckHend Added tests! Can you review this PR? |
@ChuckHend Can it be merged? Or any changes needed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some more specific comments in-line.
This needs to work when the job name is != to the table name, and also needs to consider the schema of the table.
@ChuckHend Done! |
@varshith257, the test that was added in this PR does not compile.
|
@ChuckHend Sorry! I have modified it locally and I didn't pushed here lol 🤦 |
@ChuckHend Can you approve workflows again? |
@ChuckHend Are any changes needed? Let me know, I am ready to incorporate them and get this PR merged soon :) |
extension/tests/integration_tests.rs
Outdated
let insert_job_query = format!( | ||
"INSERT INTO vectorize.job (name, index_dist_type, transformer, search_alg, params, last_completion) | ||
VALUES ('{job_name}', 'pgv_hsnw_cosine', 'sentence-transformers/all-MiniLM-L6-v2', 'search_algorithm', | ||
jsonb_build_object('table', '{test_table_name}', 'schema', 'public'), NOW());" | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a select vectorize.table(...)
instead, so that the test stays current with the APIs around that table.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@varshith257 - i think replace this direct insert with vectorize.table()
. It should help the test move along as it is currently failing because the search_alg column no longer exists (it was removed from the project).
The
I'm going to push a change to the CI workflow so that the failing ./core tests dont block the extension tests from running. |
@ChuckHend I am debugging if the trigger event is triggered or something is blocking in test for deletion |
@ChuckHend Done! It's just my initial wrong approach to accessing the table and schema. Now it's working fine. It's up for you review
|
@varshith257 your recent commit "fix tests" contains changes that are very similar to what I implemented in the recent commits in my PR #178 😂 . |
Hi @akhilender-bongirwar, I’d like to clarify that this implementation was developed independently to address the issue requirements. My earlier approach used joins with In scenarios like this, where we work with PostgreSQL’s built-in functions and constraints, it’s natural for solutions to align and appear similar. |
However, as we both understand, this process operates on a first-come, first-served basis, as @ChuckHend previously mentioned. Since my PR was completed first and is currently under review, you can refer to the comments under my PR for further context. |
FYI, that mean the PR first opened and if it goes inactive completely or closed then the second contributor gets a chance |
FYI, this PR was inactive for a month, and it's quite surprising that similar changes appeared just a day after I submitted mine. @varshith257, let’s be fair here. I trust @ChuckHend to make the final call, and I’m confident he recognizes the efforts put in and the order in which they were made. |
See for a review of @ChuckHend of my PR. And the PR is inactive because of my exams and I have clearly communicated to the reviewer in Slack. Just I am triggering you that inactivity of raising for next PR not the one which is open. I don't wanna argue anymore it's final decision of @ChuckHend and this PR is opened 2 months ago and have been active last 23 days ago |
There are two commits that look similar to me. @akhilender-bongirwar 5ba8c03 made on 09-Dec-2024 Both of these look like good solutions to me. Is there anything I am missing here, it seems like @akhilender-bongirwar has the solution first. |
Thank you for reviewing the commits, @ChuckHend. I appreciate the acknowledgment that my solution was implemented first. I believe both commits aim to address the issue effectively, but as per the first come, first serve guideline, I trust your judgment to finalize the PR based on the timeline and contributions. Happy to make any adjustments if needed! |
Closing as fixed by #178 |
/claim #148
Closes #148