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

CBG-4390: provide cluster UUID at top level endpoint #7345

Merged
merged 10 commits into from
Feb 6, 2025
Merged

CBG-4390: provide cluster UUID at top level endpoint #7345

merged 10 commits into from
Feb 6, 2025

Conversation

gregns1
Copy link
Contributor

@gregns1 gregns1 commented Jan 31, 2025

CBG-4390

  • Add cluster uuid to runtime server config response
  • If there are db's defined we can just grab off a db context, else we need to request it from couchbase server.
Screenshot 2025-02-06 at 12 14 39

Pre-review checklist

  • Removed debug logging (fmt.Print, log.Print, ...)
  • Logging sensitive data? Make sure it's tagged (e.g. base.UD(docID), base.MD(dbName))
  • Updated relevant information in the API specifications (such as endpoint descriptions, schemas, ...) in docs/api

Integration Tests

rest/admin_api.go Outdated Show resolved Hide resolved
base/bootstrap.go Outdated Show resolved Hide resolved
rest/config_test.go Outdated Show resolved Hide resolved
@gregns1 gregns1 assigned torcolvin and unassigned gregns1 Feb 3, 2025
rest/admin_api.go Outdated Show resolved Hide resolved
base/gocb_utils.go Outdated Show resolved Hide resolved
@torcolvin torcolvin assigned gregns1 and unassigned torcolvin Feb 4, 2025
@gregns1 gregns1 assigned torcolvin and unassigned gregns1 Feb 4, 2025
@gregns1 gregns1 assigned gregns1 and unassigned torcolvin Feb 5, 2025
@gregns1 gregns1 assigned torcolvin and unassigned gregns1 Feb 6, 2025
Copy link
Member

@bbrks bbrks left a comment

Choose a reason for hiding this comment

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

Just a comment about how we populate the API response for extensibility - otherwise looks good

@@ -352,9 +352,14 @@ func (h *handler) handleGetDbConfig() error {

type RunTimeServerConfigResponse struct {
*StartupConfig
RuntimeClusterUUID
Copy link
Member

Choose a reason for hiding this comment

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

I'd like to put this in a nested "runtime" struct in the response if possible - somewhere we can add more runtime-only info in future without interfering or being lost inside the actual StartupConfig properties.

I'm thinking of things like post-bootstrap server addresses (since we can bootstrap from a single node and get many servers back), server node latency information, and even non-server runtime info (uptime, command line flags, host timezone, etc.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good shout, updated screenshot in description to reflect the change.

@bbrks bbrks assigned gregns1 and unassigned torcolvin Feb 6, 2025
@bbrks bbrks merged commit 916ada2 into main Feb 6, 2025
38 checks passed
@bbrks bbrks deleted the CBG-4390 branch February 6, 2025 12:54
gregns1 added a commit that referenced this pull request Feb 6, 2025
* CBG-4390: provide cluster UUID at top level endpoint

* update to fix for non persistent config

* fix for rosmar

* remove pre paramatised test

* nit

* move mgtrequest into common function

* updates

* remove unused code

* fix failing test

* update to create separate struct of info for runtime only info
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.

3 participants