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

[BUG]: Timeout getting multiple renamed repositories when running in NET Framework #2892

Open
1 task done
rathole opened this issue Mar 4, 2024 · 1 comment
Open
1 task done
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented

Comments

@rathole
Copy link

rathole commented Mar 4, 2024

What happened?

When the following code is built for and run with .NET Framework (target framework net472), the second call to GitHubClient.Repository.Get fails after 100 seconds with a TaskCanceledException:

using Octokit;

var gitHubClient = new GitHubClient(new ProductHeaderValue("TimeoutRepro"));

var renamedRepo1 = await gitHubClient.Repository.Get("moq", "moq");
var renamedRepo2 = await gitHubClient.Repository.Get("sandermvanvliet", "SerilogSinksInMemory");

Further observations:

  • When changing the order in which the repositories are queried, it is always the second one that fails.
  • The failure does not happen with repositories that have not been renamed.
  • The failure does not happen when targeting and running with NET 8.0

This seems to be the same issue as described in #1396 but now it only reproduces with .NET Framework.

Versions

Octokit.net 10.0.0

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@rathole rathole added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Mar 4, 2024
@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Mar 4, 2024
@annierm18
Copy link

annierm18 commented Apr 17, 2024

@kfcampbell I am seeing a similar issue but with:

Task<Issue> Get(string owner, string name, int number);

Repro Steps:
Note: This flow works as expected in core
Using .NetFramework v4.6.1; Octokit version 10.0.0, 11.0.0, or 11.0.1

  1. Have issue 1 in repo 1 with issue number 1 and transfer it to repo 2
  2. Have issue 2 in a repo (e.g. repo 3) with issue number 2 that shares the same GitHubClient (devRepoClientTest) as issue 1, and transfer issue 2 to another repo
  3. Then, in the program, run the following two lines of code

await devRepoClientTest.Issue.Get(org1, repo1, 1);
await devRepoClientTest.Issue.Get(org1, repo3, 2);

Expected Behavior: I would get the issue object for both calls, and the issue object would be for the new issues from the repos where they were transferred to.

Actual Behavior: I get the first issue object, but I get a "TaskCanceledException" error for the second call

Questions:
Are you able to reproduce this issue? If yes, should I create a separate bug for it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented
Projects
Status: 🔥 Backlog
Development

No branches or pull requests

3 participants