Skip to content

fix: avoid pulling containers when it is not enabled #17855

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

Merged
merged 2 commits into from
May 15, 2025

Conversation

BrunoQuaresma
Copy link
Collaborator

We've been continuously pulling the containers endpoint even when the agent does not support containers. To optimize the requests, we can check if it is throwing an error and stop if it is a 403 status code.

@BrunoQuaresma BrunoQuaresma self-assigned this May 15, 2025
Comment on lines +166 to +169
return isAxiosError(error) && error.response?.status === 403
? false
: 10_000;
},
Copy link
Member

@johnstcn johnstcn May 15, 2025

Choose a reason for hiding this comment

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

So a non-200 and non-403 response will continue to poll forever?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It will only stop, return false, on 403. Should we cover any other use-case?

Copy link
Member

Choose a reason for hiding this comment

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

This is probably fine for now

@BrunoQuaresma BrunoQuaresma merged commit ee2aeb4 into main May 15, 2025
34 checks passed
@BrunoQuaresma BrunoQuaresma deleted the bq/fix-pulling-errors branch May 15, 2025 14:13
@github-actions github-actions bot locked and limited conversation to collaborators May 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants