Skip to content

Fix table creation logging to reflect existing tables correctly#9696

Merged
ReubenBond merged 1 commit intodotnet:mainfrom
egil:fix/correct-indicate-if-table-were-created
Sep 30, 2025
Merged

Fix table creation logging to reflect existing tables correctly#9696
ReubenBond merged 1 commit intodotnet:mainfrom
egil:fix/correct-indicate-if-table-were-created

Conversation

@egil
Copy link
Contributor

@egil egil commented Sep 30, 2025

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.

Microsoft Reviewers: Open in CodeFlow

Copilot AI review requested due to automatic review settings September 30, 2025 15:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.
@egil egil force-pushed the fix/correct-indicate-if-table-were-created branch from e8ee2b5 to e0f191c Compare September 30, 2025 15:47
Copy link

@shacal shacal left a comment

Choose a reason for hiding this comment

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

Can confirm behaviour.

@egil
Copy link
Contributor Author

egil commented Sep 30, 2025

I think they failing tests have nothing to do with this change.

@ReubenBond
Copy link
Member

Those test failures are odd, though... I haven't seen them before. I agree they look unrelated.

@ReubenBond ReubenBond merged commit 7a05d48 into dotnet:main Sep 30, 2025
27 of 29 checks passed
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.
@github-actions github-actions bot locked and limited conversation to collaborators Oct 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments