Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

embeddings: fix default size limit#58262

Merged
stefanhengl merged 2 commits into
mainfrom
sh/fix-embeddings-max-file-size-bytes
Nov 14, 2023
Merged

embeddings: fix default size limit#58262
stefanhengl merged 2 commits into
mainfrom
sh/fix-embeddings-max-file-size-bytes

Conversation

@stefanhengl

@stefanhengl stefanhengl commented Nov 10, 2023

Copy link
Copy Markdown
Member

This fixes a bug where the default size limit for files was set to 0 if FileFilters were defined.

Until this fix is released, a workaround is to always define MaxFileSizeBytes if FileFilters are defined.

Test plan:

  • new unit test

@cla-bot cla-bot Bot added the cla-signed label Nov 10, 2023
@stefanhengl stefanhengl requested a review from a team November 10, 2023 15:38
@stefanhengl stefanhengl marked this pull request as ready for review November 10, 2023 15:38

@jtibshirani jtibshirani left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Could you explain what the outcome of the bug would look like (in case others run into this problem and want to know if it fixes their symptoms?)

@keegancsmith keegancsmith left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changelog entry and backport?

@stefanhengl

Copy link
Copy Markdown
Member Author

Could you explain what the outcome of the bug would look like (in case others run into this problem and want to know if it fixes their symptoms?

If users define file filters without defining MaxFileSizeBytes, all files are skipped during an embedding job. The job will be marked as completed, but no files will have been embedded.

This fixes a bug where the default size limit for files was set to 0 if
`FileFilters`  were defined.

Until this fix is released, a workaround is to always define
`MaxFileSizeBytes` if `FileFitlers` are defined.

Test plan:
- new unit test
@stefanhengl stefanhengl force-pushed the sh/fix-embeddings-max-file-size-bytes branch from 858bba7 to ab804b9 Compare November 14, 2023 08:42
@stefanhengl stefanhengl merged commit 44b7c75 into main Nov 14, 2023
@stefanhengl stefanhengl deleted the sh/fix-embeddings-max-file-size-bytes branch November 14, 2023 09:58
@stefanhengl stefanhengl added backport 5.2 backport/bugfix Standard patches to fix bugs labels Nov 14, 2023
sourcegraph-release-bot pushed a commit that referenced this pull request Nov 14, 2023
This fixes a bug where the default size limit for files was set to 0 if
`FileFilters`  were defined. This had the consequence that all files
were skipped if file filters were defined but `MaxFileSizeBytes` was
not explicitly set to a value >0.

Until this fix is released, a workaround is to always define
`MaxFileSizeBytes` if `FileFitlers` are defined.

Test plan:
- new unit test

(cherry picked from commit 44b7c75)
Comment thread CHANGELOG.md
- Fixed a bug where typing in the GraphQL editor in the Site Admin API console could cause the cursor to jump to the start of the editor. [#57862](https://github.com/sourcegraph/sourcegraph/pull/57862)
- The blame column no longer ignores whitespace-only changes by default. [#58134](https://github.com/sourcegraph/sourcegraph/pull/58134)
- Long lines now wrap correctly in the diff view. [#58138](https://github.com/sourcegraph/sourcegraph/pull/58138)
- Defining file filters for embeddings jobs no longer causes all files to be skipped if `MaxFileSizeBytes` isn't defined. [#58262](https://github.com/sourcegraph/sourcegraph/pull/58262)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

given you are backporting needs to be moved to 5.2.x unreleased sections?

@stefanhengl stefanhengl Nov 14, 2023

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure how to handle this TBH. I thought it was preferable to have a clean merge and not assume the backport here. Probably overthinking it. I will take care that eventually things will make sense.

stefanhengl referenced this pull request Nov 15, 2023
This moves the changelog entry from 5.3 to 5.2.x because in the meantime
https://github.com/sourcegraph/sourcegraph/pull/58262 has been
backported.
@stefanhengl stefanhengl mentioned this pull request Nov 15, 2023
stefanhengl referenced this pull request Nov 15, 2023
This moves the changelog entry from 5.3 to 5.2.x because in the meantime
https://github.com/sourcegraph/sourcegraph/pull/58262 has been
backported.
vovakulikov pushed a commit that referenced this pull request Dec 12, 2023
This fixes a bug where the default size limit for files was set to 0 if
`FileFilters`  were defined. This had the consequence that all files
were skipped if file filters were defined but `MaxFileSizeBytes` was
not explicitly set to a value >0.

Until this fix is released, a workaround is to always define
`MaxFileSizeBytes` if `FileFitlers` are defined.

Test plan:
- new unit test
vovakulikov referenced this pull request Dec 12, 2023
This moves the changelog entry from 5.3 to 5.2.x because in the meantime
https://github.com/sourcegraph/sourcegraph/pull/58262 has been
backported.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants