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

Retry on YamlException when loading Kubernetes client configuration #3229

Merged
merged 2 commits into from
Mar 27, 2024

Conversation

ReubenBond
Copy link
Member

@ReubenBond ReubenBond commented Mar 27, 2024

I encountered this while running an integration test:
image

My assumption is that this is caused by a race between writing and ready the Kubernetes client configuration file. By handling the resulting YamlException, we allow the process to be retried.

Microsoft Reviewers: Open in CodeFlow

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Mar 27, 2024
Copy link
Member

@davidfowl davidfowl left a comment

Choose a reason for hiding this comment

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

Add a comment

@ReubenBond
Copy link
Member Author

Done:

// Handle exceptions caused by races between writing and reading the configuration file.
// If the file is loaded while it is still being written, this can result in a YamlException being thrown.
ShouldHandle = new PredicateBuilder().Handle<KubeConfigException>().Handle<YamlException>(),

@ReubenBond ReubenBond enabled auto-merge (squash) March 27, 2024 18:59
@ReubenBond ReubenBond merged commit 167fb8d into main Mar 27, 2024
8 checks passed
@ReubenBond ReubenBond deleted the rebond/fix-k8s-yamlexception-race branch March 27, 2024 19:41
@ReubenBond
Copy link
Member Author

/backport to release/8.0-preview.5

Copy link
Contributor

Started backporting to release/8.0-preview.5: https://github.com/dotnet/aspire/actions/runs/8458282329

Copy link
Contributor

@ReubenBond an error occurred while backporting to release/8.0-preview.5, please check the run log for details!

Error: @ReubenBond is not a repo collaborator, backporting is not allowed. If you're a collaborator please make sure your dotnet team membership visibility is set to Public on https://github.com/orgs/dotnet/people?query=ReubenBond

@ReubenBond
Copy link
Member Author

/backport to release/8.0-preview.5

@davidfowl
Copy link
Member

@joperezr why does the bot not like @ReubenBond ?

Copy link
Contributor

Started backporting to release/8.0-preview.5: https://github.com/dotnet/aspire/actions/runs/8458309383

Copy link
Contributor

@ReubenBond an error occurred while backporting to release/8.0-preview.5, please check the run log for details!

Error: The specified backport target branch release/8.0-preview.5 wasn't found in the repo.

@davidfowl
Copy link
Member

/backport to release/8.0-preview5

Copy link
Contributor

Started backporting to release/8.0-preview5: https://github.com/dotnet/aspire/actions/runs/8458401139

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants