Skip to content

Conversation

@jstirnaman
Copy link
Contributor

@jstirnaman jstirnaman commented Dec 19, 2025

Summary

  • Fix {{< latest-patch cli=true >}} shortcode to correctly output CLI version in /influxdb3/cloud-serverless/ pages
  • Add Cypress tests for CLI version output across v2, Cloud, and Cloud Serverless
  • Restore shortcode in Cloud Serverless pages (reverts 5f792bd)

Root Cause

The shortcode only checked for "cloud" version when deciding to use the influxdb CLI version. Cloud Serverless pages have $product="influxdb3" which doesn't exist in products.yml, causing $latestVersion to be empty.

Fix

Calculate $influxdbLatest directly from products.influxdb.latest within the CLI block, ensuring cloud products always use the correct lookup key (v2) for the influx CLI version.

Test plan

  • Cypress test passes for InfluxDB v2 CLI page
  • Cypress test passes for InfluxDB Cloud CLI page
  • Cypress test passes for InfluxDB Cloud Serverless CLI page

Closes #6646

Add cloud-serverless to the condition that handles cloud products,
and use influxdb.latest directly for CLI version lookups.

Root cause: The shortcode only checked for "cloud" version when
deciding to use the influxdb CLI version. Cloud Serverless pages
have $product="influxdb3" which doesn't exist in products.yml,
causing $latestVersion to be empty.

Fix: Calculate $influxdbLatest directly from products.influxdb.latest
within the CLI block, ensuring cloud products always use the correct
lookup key (v2) for the influx CLI version.

Includes Cypress test covering v2, Cloud, and Cloud Serverless.

Closes #6646
@jstirnaman jstirnaman requested a review from sanderson December 19, 2025 17:06
@github-actions
Copy link
Contributor

github-actions bot commented Dec 19, 2025

PR Preview Action v1.4.8
🚀 Deployed preview to https://influxdata.github.io/docs-v2/pr-preview/pr-6655/
on branch gh-pages at 2025-12-19 18:14 UTC

@github-actions
Copy link
Contributor

github-actions bot commented Dec 19, 2025

PR Preview

Status Details
Preview View preview
Pages 4 page(s) deployed
Build time 79s
Last updated 2025-12-19 18:14:55 UTC
Pages included in this preview
  • /influxdb3/cloud-serverless/sign-up/
  • /influxdb/cloud/reference/cli/influx/
  • /influxdb/v2/reference/cli/influx/
  • /influxdb3/cloud-serverless/reference/cli/influx/

Preview auto-deploys on push. Will be cleaned up when PR closes.

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.

Hard-coded influxdb v2 CLI version, fix shortcode

3 participants