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

fix: Avoid adding embedding jobs without metadata id #9881

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

Dschoordsch
Copy link
Contributor

Description

When no new metadata was inserted, the resulting empty array would be fully outer joined with the models, resulting in [undefined, 'ember_1'] pairs.

Testing scenarios

  • start the server and see no jobs with embed:start and embeddingsMetadataId === null is added to the EmbeddingsJobQueue table

Final checklist

  • I checked the code review guidelines
  • I have added Metrics Representative as reviewer(s) if my PR invovles metrics/data/analytics related changes
  • I have performed a self-review of my code, the same way I'd do it for any other team member
  • I have tested all cases I listed in the testing scenarios and I haven't found any issues or regressions
  • Whenever I took a non-obvious choice I added a comment explaining why I did it this way
  • I added the label Skip Maintainer Review Indicating the PR only requires reviewer review and can be merged right after it's approved if the PR introduces only minor changes, does not contain any architectural changes or does not introduce any new patterns and I think one review is sufficient'
  • PR title is human readable and could be used in changelog

When no new metadata was inserted, the resulting empty array would be
fully outer joined with the models, resulting in [undefined, 'ember_1']
pairs.
@mattkrick
Copy link
Member

nice find! what's the culprit on why the metadata is undefined? did it previously get inserted & hit the onConflict clause?

@Dschoordsch
Copy link
Contributor Author

It happens when nothing is inserted. The full outer join of [] and ['ember1'] is null, "ember1".

@Dschoordsch Dschoordsch merged commit 4e2fec1 into master Jul 1, 2024
6 checks passed
@Dschoordsch Dschoordsch deleted the fix/avoidEmbeddingJobsWithoutId branch July 1, 2024 06:57
@github-actions github-actions bot mentioned this pull request Jul 2, 2024
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants