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

Conversation

@efritz
Copy link
Contributor

@efritz efritz commented Feb 16, 2023

Put error filters around inference errors.

Test plan

Tested locally, saw less blather.

@efritz efritz added team/graph Graph Team (previously Code Intel/Language Tools/Language Platform) team/language-platform auto-index-experience labels Feb 16, 2023
@efritz efritz self-assigned this Feb 16, 2023
@cla-bot cla-bot bot added the cla-signed label Feb 16, 2023
ErrorFilter: func(err error) observation.ErrorFilterBehaviour {
if errors.As(err, &inference.LimitError{}) {
return observation.EmitForDefault.Without(observation.EmitForMetrics)
return observation.EmitForNone
Copy link
Contributor

Choose a reason for hiding this comment

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

not even logs? 👀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Error log, nah, it's like a 400-level error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or am I misunderstanding this filter?

Copy link
Contributor

Choose a reason for hiding this comment

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

400-level?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

User issue (missing resource, bad auth) not server issue (500 level, actual error to report)

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it fine to have it silently not do anything in that case? whats the expected method for admins to see why nothing is happening for example (scoping out the thought process here)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We're also exposing it via the UI here: https://github.com/sourcegraph/sourcegraph/pull/47748.

@sourcegraph sourcegraph deleted a comment from github-actions bot Feb 17, 2023
@efritz efritz merged commit 6eb2e92 into main Feb 17, 2023
@efritz efritz deleted the ef/silence-limit-error branch February 17, 2023 18:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

auto-index-experience cla-signed team/graph Graph Team (previously Code Intel/Language Tools/Language Platform)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants