Fix table creation logging to reflect existing tables correctly#9696
Merged
ReubenBond merged 1 commit intodotnet:mainfrom Sep 30, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the logging logic in the Azure table initialization to correctly determine whether a table was created or already existed. The previous implementation incorrectly checked if the response was null, but the CreateIfNotExistsAsync method always returns a TableItem on success regardless of whether the table was created or already existed.
Key Changes
- Replace null check with HTTP status code check (409 indicates table already exists)
- Update logging message to accurately reflect table creation vs. attachment
The `CreateIfNotExistsAsync` method's response will have a 409-statuscode if the table already exists and will always return the `TableItem` if the call is successful.
e8ee2b5 to
e0f191c
Compare
Contributor
Author
|
I think they failing tests have nothing to do with this change. |
ReubenBond
approved these changes
Sep 30, 2025
Member
|
Those test failures are odd, though... I haven't seen them before. I agree they look unrelated. |
ledjon-behluli
pushed a commit
to ledjon-behluli/orleans
that referenced
this pull request
Oct 26, 2025
…et#9696) The `CreateIfNotExistsAsync` method's response will have a 409-statuscode if the table already exists and will always return the `TableItem` if the call is successful.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
CreateIfNotExistsAsyncmethod's response will have a 409-statuscode if the table already exists and will always return theTableItemif the call is successful.Microsoft Reviewers: Open in CodeFlow