Skip to content

Conversation

@jhlodin
Copy link
Contributor

@jhlodin jhlodin commented Oct 30, 2025

https://cockroachlabs.atlassian.net/browse/DOC-13043
https://cockroachlabs.atlassian.net/browse/DOC-13042

  • Add information about patch upgrade deferral to Cloud Console docs
  • Add the maintenance window management workflow to the CCAPI doc
  • Add the patch deferral workflow to the CCAPI doc

@netlify
Copy link

netlify bot commented Oct 30, 2025

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit d9d54ef
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-api-docs/deploys/69039d5d9b2e0400088c20dc

@netlify
Copy link

netlify bot commented Oct 30, 2025

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit d9d54ef
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-interactivetutorials-docs/deploys/69039d5df829d600077a251d

@github-actions
Copy link

curl --request PUT \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/version-deferral \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--json '{"deferral_policy":"{deferral_policy}"}'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nicholas-tao The example in the generated API docs includes deferred_until in the PUT request, which seems like an error: https://www.cockroachlabs.com/docs/api/cloud/v1#put-/api/v1/clusters/-cluster_id-/version-deferral

Choose a reason for hiding this comment

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

yeah that doesn't seem right. can you please check with @VishalJaishankar to update the API docs?

{{site.data.alerts.end}}
- `{deferral_policy} is the length of the deferral window, set to `"DEFERRAL_30_DAYS"`, `"DEFERRAL_60_DAYS"`, or `"DEFERRAL_90_DAYS"`. Set to `"FIXED_DEFERRAL"` to defer upgrades by 60 days, or `"NOT_DEFERRED"` to remove the deferral policy and apply automatic patch upgrades immediately.

To view the existing patch deferral policy and current patch upgrade deferrals, send a `GET` request to the `/api/v1/clusters/{cluster_id}/version-deferral` endpoint.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

What's the expected behavior when there are multiple patch upgrades deferred at once? e.g. x.10 releases and gets deferred for 90 days, then x.11 is released 25 days into the deferral window. Would a GET request to this endpoint return multiple deferred_until values? Or multiple objects?

Choose a reason for hiding this comment

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

I read through the API code and believe it should only return one value based on the next immediate patch after the cluster's current version.

In your example where x.10 releases and is deferred for 90 days, then x.11 releases 25 days later:

  • While cluster is on x.9: deferred_until = x.10 release date + 90 days
  • After cluster upgrades to x.10: deferred_until = x.11 release date + 90 days

@VishalJaishankar is this correct?

@netlify
Copy link

netlify bot commented Oct 30, 2025

Netlify Preview

Name Link
🔨 Latest commit e3238e5
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-docs/deploys/69039b960d04c50008330d0f
😎 Deploy Preview https://deploy-preview-20871--cockroachdb-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Oct 30, 2025

Netlify Preview

Name Link
🔨 Latest commit d9d54ef
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-docs/deploys/69039d5dfe3f5b00086308fe
😎 Deploy Preview https://deploy-preview-20871--cockroachdb-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

@nicholas-tao nicholas-tao left a comment

Choose a reason for hiding this comment

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

Left a couple comments and tagged @VishalJaishankar in some questions about the API behavior 😄

curl --request PUT \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/version-deferral \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--json '{"deferral_policy":"{deferral_policy}"}'

Choose a reason for hiding this comment

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

yeah that doesn't seem right. can you please check with @VishalJaishankar to update the API docs?

{{site.data.alerts.callout_info}}
The cluster ID used in the Cloud API is different from the routing ID used when [connecting to clusters]({% link cockroachcloud/connect-to-your-cluster.md %}).
{{site.data.alerts.end}}
- `{deferral_policy} is the length of the deferral window, set to `"DEFERRAL_30_DAYS"`, `"DEFERRAL_60_DAYS"`, or `"DEFERRAL_90_DAYS"`. Set to `"FIXED_DEFERRAL"` to defer upgrades by 60 days, or `"NOT_DEFERRED"` to remove the deferral policy and apply automatic patch upgrades immediately.

Choose a reason for hiding this comment

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

@VishalJaishankar are we planning to deprecate FIXED_DEFERRAL in favor of DEFERRAL_60_DAYS?

I know we kept it for backward compatibility reasons but if it's going to be deprecated, we should remove it from this line

{{site.data.alerts.end}}
- `{deferral_policy} is the length of the deferral window, set to `"DEFERRAL_30_DAYS"`, `"DEFERRAL_60_DAYS"`, or `"DEFERRAL_90_DAYS"`. Set to `"FIXED_DEFERRAL"` to defer upgrades by 60 days, or `"NOT_DEFERRED"` to remove the deferral policy and apply automatic patch upgrades immediately.

To view the existing patch deferral policy and current patch upgrade deferrals, send a `GET` request to the `/api/v1/clusters/{cluster_id}/version-deferral` endpoint.

Choose a reason for hiding this comment

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

I read through the API code and believe it should only return one value based on the next immediate patch after the cluster's current version.

In your example where x.10 releases and is deferred for 90 days, then x.11 releases 25 days later:

  • While cluster is on x.9: deferred_until = x.10 release date + 90 days
  • After cluster upgrades to x.10: deferred_until = x.11 release date + 90 days

@VishalJaishankar is this correct?

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