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

Avoid useless call to schema load api on repo import #4796

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

ogenstad
Copy link
Contributor

I noticed locally that I had a repo import fail because the schema load API timed out after two minutes, however I didn't have any schemas within my repo so the API should never have been called.

There's also a problem on the actual API in the sense that it can waste time and resources if a user calls it with an empty array. If this is done we can either report it as a user error alternatively we send back a SchemaUpdate indicating that the hash remained the same and that there were no updates. Thoughts around this?

Targeting stable so it's included in 1.0.1.

@github-actions github-actions bot added the group/backend Issue related to the backend (API Server, Git Agent) label Oct 31, 2024
Copy link

codspeed-hq bot commented Oct 31, 2024

CodSpeed Performance Report

Merging #4796 will improve performances by 31.91%

Comparing pog-avoid-schema-load-api (db6aba2) with stable (2e89e34)

Summary

⚡ 1 improvements
✅ 9 untouched benchmarks

Benchmarks breakdown

Benchmark stable pog-avoid-schema-load-api Change
test_schemabranch_duplicate 409.4 µs 310.3 µs +31.91%

@ogenstad ogenstad marked this pull request as ready for review October 31, 2024 07:38
@ogenstad ogenstad requested a review from a team October 31, 2024 07:38
Copy link
Collaborator

@dgarros dgarros left a comment

Choose a reason for hiding this comment

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

Should we also look into why the schema load API timeout in the first place or was it expected in your environment ?

@ogenstad
Copy link
Contributor Author

Should we also look into why the schema load API timeout in the first place or was it expected in your environment ?

Yes that would be good. Though I couldn't recreate that specific issue after trying again. I just saw that I had a timeout error in the task log that I didn't expect and tracked it down to this call. But will be on the lookout if I specifically see the actual timeout again.

@dgarros dgarros merged commit e365942 into stable Oct 31, 2024
28 checks passed
@dgarros dgarros deleted the pog-avoid-schema-load-api branch October 31, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group/backend Issue related to the backend (API Server, Git Agent)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants