Skip to content

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

@ghost ghost added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Mar 27, 2024
@ReubenBond ReubenBond requested a review from davidfowl March 27, 2024 18:49
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
@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

@github-actions
Copy link
Contributor

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

@github-actions
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 ?

@github-actions
Copy link
Contributor

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

@github-actions
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

@github-actions
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.

3 participants