Skip to content

Verify schema name length when creating or renaming in Postgres#13307

Merged
ebyhr merged 2 commits intomasterfrom
ebi/test-long-schema
Aug 5, 2022
Merged

Verify schema name length when creating or renaming in Postgres#13307
ebyhr merged 2 commits intomasterfrom
ebi/test-long-schema

Conversation

@ebyhr
Copy link
Copy Markdown
Member

@ebyhr ebyhr commented Jul 22, 2022

Description

Verify schema name length when creating or renaming in Postgres

Documentation

(x) No documentation is needed.

Release notes

(x) Release notes entries required with the following suggested text:

# PostgreSQL
* Prevent creating or renaming to a schema with a name longer than the max length.
  Previously, the name was truncated to the max length. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Jul 22, 2022
@ebyhr ebyhr force-pushed the ebi/test-long-schema branch 3 times, most recently from 35ba5e1 to b5718c1 Compare July 29, 2022 23:52
@ebyhr ebyhr requested review from findepi and hashhar August 3, 2022 02:58
@Override
public void testRenameSchemaToLongName()
{
// Override because the max length is different from CREATE TABLE case
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The comment feels stale. Or did you mean different from CREATE SCHEMA case?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, let me fix the comment.

@Override
protected void verifySchemaNameLengthFailurePermissible(Throwable e)
{
assertThat(e).hasMessageMatching("(?s)(.*Read timed out)|(.*\"`NAME`\" that has maximum length of 128.*)");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is Read timed out a flaky issue or related to larger schema names?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It relates to larger schema names. (Using long name increases the possibility of read timed out)

@ebyhr ebyhr force-pushed the ebi/test-long-schema branch from b5718c1 to 9f4a756 Compare August 3, 2022 08:23
@ebyhr ebyhr requested a review from hashhar August 4, 2022 02:33
@ebyhr ebyhr force-pushed the ebi/test-long-schema branch from 9f4a756 to ab640dc Compare August 4, 2022 09:55
@ebyhr
Copy link
Copy Markdown
Member Author

ebyhr commented Aug 4, 2022

Rebased on upstream and remove BaseHiveConnectorTest.testRenameSchemaToLongName to resolve logical conflicts.

@ebyhr ebyhr force-pushed the ebi/test-long-schema branch from ab640dc to 37df4e0 Compare August 4, 2022 11:37
@ebyhr ebyhr merged commit 2c04a07 into master Aug 5, 2022
@ebyhr ebyhr deleted the ebi/test-long-schema branch August 5, 2022 02:55
@ebyhr ebyhr mentioned this pull request Aug 5, 2022
@github-actions github-actions bot added this to the 393 milestone Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants