Skip to content

Fix renameTable to return 204 instead of 200#4383

Merged
flyrain merged 1 commit intoapache:mainfrom
viditochani:fix-rename-status-code
May 8, 2026
Merged

Fix renameTable to return 204 instead of 200#4383
flyrain merged 1 commit intoapache:mainfrom
viditochani:fix-rename-status-code

Conversation

@viditochani
Copy link
Copy Markdown
Contributor

@viditochani viditochani commented May 7, 2026

renameTable returns HTTP 200 with body text "NO_CONTENT" instead of HTTP 204 as per the IRC spec.

Testing

Manually verified by sending a rename table request to a local Polaris instance.

Checklist

  • 🛡️ Don't disclose security issues! (contact security@apache.org)
  • 🔗 Clearly explained why the changes are needed, or linked related issues
  • 🧪 Added/updated tests with good coverage, or manually tested (and explained how)
  • 💡 Added comments for complex logic
  • 🧾 Updated CHANGELOG.md (if needed)
  • 📚 Updated documentation in site/content/in-dev/unreleased (if needed)

@adnanhemani
Copy link
Copy Markdown
Contributor

adnanhemani commented May 7, 2026

While I think this change is correct (and is correcting an error), I believe all API changes need a VOTE thread? @dimas-b thoughts?

@nandorKollar
Copy link
Copy Markdown
Contributor

While I think this change is correct (and is correcting an error), I believe all API changes need a VOTE thread? @dimas-b thoughts?

Isn't this also a possibly breaking change? Although the current implementation clearly doesn't conform with IRC spec, we change here the actual response status here.

Copy link
Copy Markdown
Contributor

@flyrain flyrain left a comment

Choose a reason for hiding this comment

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

I think the fix is correct. Please consider asserting the status in AbstractIcebergCatalogTest or an *IT.java so this doesn't silently regress.

Optional: one-line CHANGELOG entry under Fixed since this is an externally observable HTTP status change.

@dimas-b
Copy link
Copy Markdown
Contributor

dimas-b commented May 7, 2026

Technically this is a breaking change at the API level, IMHO.

However, given that Polaris implements the spec incorrectly in this case and the Iceberg spec change that altered this response code predates Polaris, I think that the fix is good.

Thanks for noticing it, @viditochani !

We should definitely discuss it on dev for more awareness in the community.

I do not think we need a formal VOTE on this. A DISCUSS thread should be sufficient.

@dimas-b
Copy link
Copy Markdown
Contributor

dimas-b commented May 7, 2026

dev discussion: https://lists.apache.org/thread/oxf6cvb99v76rjn8zq77fsytggrpbxn3

@viditochani : Could you add a note about this to CHANGELOG.md? I believe the Fixes section would be appropriate as we're aligning with the spec.

@viditochani viditochani force-pushed the fix-rename-status-code branch from a036548 to 96b27b6 Compare May 7, 2026 20:53
@viditochani
Copy link
Copy Markdown
Contributor Author

@flyrain @dimas-b Added a CHANGELOG entry and an integration test to prevent regression. @dimas-b thanks for starting the dev thread.

@viditochani viditochani force-pushed the fix-rename-status-code branch from 96b27b6 to 1842953 Compare May 7, 2026 21:02
The rename table endpoint returns 200 with a text body instead of
the 204 (No Content) status as per the IRC spec.
@viditochani viditochani force-pushed the fix-rename-status-code branch from 1842953 to f30440e Compare May 7, 2026 21:23
@flyrain
Copy link
Copy Markdown
Contributor

flyrain commented May 7, 2026

Looks like the Zizmor security audit is failing with three warnings about action hash pins missing/mismatched version comments at commit 68bde559dea0. I'd suggest to rebase against the latest main branch.

@dimas-b
Copy link
Copy Markdown
Contributor

dimas-b commented May 7, 2026

@flyrain : cf. #4387

flyrain added a commit to flyrain/pr-intelligence that referenced this pull request May 8, 2026
The skill's worked example showed both the create-pending-review call
and a follow-up `gh api .../events -f event=COMMENT` submit call. The
model followed the example end-to-end and submitted reviews directly,
bypassing human review (e.g. apache/polaris#4383 review 4245835033 was
posted as COMMENTED instead of pending).

Drop the submit step from the example, remove the parenthetical that
listed submit-immediately events as a menu option, and explicitly
forbid calling `/events` or passing an `event` field. Pending with no
`event` is now stated as the only acceptable end state.
@flyrain flyrain closed this May 8, 2026
@flyrain flyrain reopened this May 8, 2026
@github-project-automation github-project-automation Bot moved this from PRs In Progress to Done in Basic Kanban Board May 8, 2026
@github-project-automation github-project-automation Bot moved this from Done to PRs In Progress in Basic Kanban Board May 8, 2026
@flyrain
Copy link
Copy Markdown
Contributor

flyrain commented May 8, 2026

Retriggered the CIs.

Copy link
Copy Markdown
Contributor

@flyrain flyrain left a comment

Choose a reason for hiding this comment

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

+1 Thanks @viditochani for the fix!

@github-project-automation github-project-automation Bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board May 8, 2026
@flyrain flyrain merged commit 8fc4150 into apache:main May 8, 2026
44 of 45 checks passed
@github-project-automation github-project-automation Bot moved this from Ready to merge to Done in Basic Kanban Board May 8, 2026
@flyrain
Copy link
Copy Markdown
Contributor

flyrain commented May 8, 2026

Thanks @viditochani for the fix! Thanks everyone for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants