Skip to content

Rename randomTableSuffix to randomNameSuffix#15008

Merged
findepi merged 1 commit intomasterfrom
findepi/random-name-suffix
Nov 14, 2022
Merged

Rename randomTableSuffix to randomNameSuffix#15008
findepi merged 1 commit intomasterfrom
findepi/random-name-suffix

Conversation

@findepi
Copy link
Copy Markdown
Member

@findepi findepi commented Nov 14, 2022

randomTableSuffix() is currently used for names of many things other than tables -- views, schemas or S3 bucket names.

Let's give the method a better name.

(PR with secrets)

`randomTableSuffix()` is currently used for names of many things other
than tables -- views, schemas or S3 bucket names.

Let's give the method a better name.
@findepi findepi added the no-release-notes This pull request does not require release notes entry label Nov 14, 2022
@cla-bot cla-bot bot added the cla-signed label Nov 14, 2022
@findepi
Copy link
Copy Markdown
Member Author

findepi commented Nov 14, 2022

}

@Deprecated
public static String randomTableSuffix()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just to avoid misunderstandings, do we still keep this method only to avoid eventual compile issues with ongoing PRs which may still be dependent on randomTableSuffix() utility method?

@findepi findepi merged commit ed2f14c into master Nov 14, 2022
@findepi findepi deleted the findepi/random-name-suffix branch November 14, 2022 16:56
// The length of 5 was proven not to be long enough for tables names in tests.
private static final int RANDOM_SUFFIX_LENGTH = 10;

public static String randomNameSuffix()
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.

Why even call it "suffix" now that it's a generic function? -- that would be dependent on how it's used. E.g., if someone called it like: x + randomNameSuffix + "-foo" it would not be a suffix and the usage would look weird. A name like randomName might be more appropriate.

@github-actions github-actions bot added this to the 403 milestone Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed no-release-notes This pull request does not require release notes entry

Development

Successfully merging this pull request may close these issues.

6 participants