Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(oss): enable bucket access for ram role #194

Merged
merged 2 commits into from
Dec 24, 2024
Merged

feat(oss): enable bucket access for ram role #194

merged 2 commits into from
Dec 24, 2024

Conversation

ayushi0014
Copy link

No description provided.

}

return subParts[1], nil
return "", fmt.Errorf("invalid account type")
Copy link
Member

@rahmatrhd rahmatrhd Dec 24, 2024

Choose a reason for hiding this comment

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

Suggested change
return "", fmt.Errorf("invalid account type")
return "", fmt.Errorf("invalid account type: %q", accountType)

mainAccountID := accountIDParts[3]
roleNameParts := strings.Split(accountIDParts[4], "/")
if len(roleNameParts) < 2 {
return "", fmt.Errorf("invalid accountID format")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return "", fmt.Errorf("invalid accountID format")
return "", fmt.Errorf("invalid accountID format: %q", accountID)

return "", fmt.Errorf("invalid accountID format")
accountIDParts := strings.Split(accountID, ":")
if len(accountIDParts) < 5 {
return "", fmt.Errorf("invalid accountID format")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return "", fmt.Errorf("invalid accountID format")
return "", fmt.Errorf("invalid accountID format: %q", accountID)


subParts := strings.Split(accountIDParts[1], ":")
if len(subParts) < 2 {
return "", fmt.Errorf("invalid accountID format")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return "", fmt.Errorf("invalid accountID format")
return "", fmt.Errorf("invalid accountID format: %q", accountID)

if accountType == AccountTypeRAMUser {
accountIDParts := strings.Split(accountID, "$")
if len(accountIDParts) < 2 {
return "", fmt.Errorf("invalid accountID format")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return "", fmt.Errorf("invalid accountID format")
return "", fmt.Errorf("invalid accountID format: %q", accountID)

@rahmatrhd rahmatrhd merged commit a044d98 into main Dec 24, 2024
6 checks passed
@rahmatrhd rahmatrhd deleted the oss-ram-role branch December 24, 2024 10:09
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.

2 participants