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

fix: CloudDedicated database creation ignores the given name #98

Merged
merged 3 commits into from
Sep 2, 2024

Conversation

xorphitus
Copy link
Contributor

@xorphitus xorphitus commented Aug 22, 2024

Proposed Changes

Cloud Dedicated database creation ignores the database name given by an argument, but applies the database name within client configuration. This behavior differs from the API spec and user intuitions, so I'd say it's a bug.

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • Tests pass
  • Commit messages are conventional
  • Sign CLA (if not already signed)

Copy link

codecov bot commented Aug 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.21%. Comparing base (a93fdfd) to head (f72bdfd).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #98      +/-   ##
==========================================
- Coverage   85.01%   79.21%   -5.80%     
==========================================
  Files          14       14              
  Lines        1121     1121              
==========================================
- Hits          953      888      -65     
- Misses        139      203      +64     
- Partials       29       30       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xorphitus xorphitus marked this pull request as ready for review August 22, 2024 06:52
Copy link
Member

@bednar bednar left a comment

Choose a reason for hiding this comment

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

Thank you for your PR! 👍 Before we can proceed with accepting it, there are a few requirements that need to be met:

Comment on lines +96 to +101
if db.ClusterDatabaseName == "" {
if d.client.config.Database == "" {
return errors.New("database name must not be empty")
}
db.ClusterDatabaseName = d.client.config.Database
Copy link
Member

Choose a reason for hiding this comment

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

Describe this behaviour in function documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, but before doing it, I'm considering whether this fallback may be unexpected for users. Do you think this behavior should be left with documentation, or should we just drop it?

Copy link
Member

Choose a reason for hiding this comment

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

Keep this fallback and update documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed with eea7b21

Copy link
Member

@bednar bednar left a comment

Choose a reason for hiding this comment

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

Thanks again for your PR 👍

LGTM 🚀

@bednar bednar added this to the 0.10.0 milestone Sep 2, 2024
@bednar bednar merged commit 84efb2c into InfluxCommunity:main Sep 2, 2024
8 of 9 checks passed
@xorphitus xorphitus deleted the fix-db-creation branch September 3, 2024 01:04
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