Skip to content

Conversation

@jstirnaman
Copy link
Contributor

@jstirnaman jstirnaman commented Jan 16, 2026

Improve Docker Compose services and initialization script for testing InfluxDB 3 Core and Enterprise endpoints.

All commands from SKILL.md work correctly!

  • ✅ Verified token format works with both Core and Enterprise
  • ✅ Docker secrets correctly mounted at /run/secrets/
  • ✅ Database operations work with tokens in both formats
  • ✅ Documentation examples tested and validated

Core Workflow Testing

  1. Initialize Core: ./test/scripts/init-influxdb3.sh core - Successfully started
  2. Check Core status: Required authentication (as expected with --admin-token-file)
  3. Get token: jq -r .token test/.influxdb3/core/.token - Returns token correctly
  4. Authenticated ping: Works with Authorization: Bearer header
  5. Create database: Successfully created test_db
  6. List databases: Shows _internal, test_core_db, and test_db

Enterprise Workflow Testing

  1. Initialize Enterprise: ./test/scripts/init-influxdb3.sh enterprise - Successfully started
  2. Get admin token: Token extracted from JSON file correctly
  3. Check Enterprise status: /ping returns version info with authentication
  4. Create worktree database: Created docs_v2_pr6750_db (worktree name converted correctly)
  5. List databases: Shows _internal, docs_v2_pr6750_db, and test_enterprise_db

compose.yaml changes:

  • Add influxdb3-core service with per-worktree data isolation
  • Add influxdb3-core-noauth service for endpoint testing without auth
  • Add influxdb3-enterprise service with trial license configuration
  • Fix env_file handling (use optional path, remove variable override)
  • Add detailed usage comments for each service

New files:

  • test/scripts/init-influxdb3.sh: Helper script to initialize services, create directories, and validate configuration

  • Enterprise configuration uses shared data at ~/influxdata-docs/.influxdb3/ to persist license and data across worktrees.

  • .claude/skills/influxdb3-test-setup/SKILL.md. It covers:

    1. Architecture overview - Shows the directory structure for shared vs per-worktree data
    2. Quick reference - Common commands table
    3. Setup workflows - Core only, Enterprise only, or both
    4. Worktree-specific databases - How to create isolated databases named after the worktree
    5. Test environment configuration - Setting up .env.test files for code block tests
    6. Troubleshooting - Common issues (license, auth, ports)
    7. Service comparison - Core vs Enterprise differences

    The skill references the init script but keeps database creation as a separate workflow step, allowing flexibility for different testing scenarios.

Improve Docker Compose services and initialization script for testing InfluxDB 3 Core and Enterprise endpoints.

compose.yaml changes:
- Add influxdb3-core service with per-worktree data isolation
- Add influxdb3-core-noauth service for endpoint testing without auth
- Add influxdb3-enterprise service with trial license configuration
- Fix env_file handling (use optional path, remove variable override)
- Add detailed usage comments for each service

New files:
- test/scripts/init-influxdb3.sh: Helper script to initialize services,
  create directories, and validate configuration

- Enterprise configuration uses shared data at ~/influxdata-docs/.influxdb3/
to persist license and data across worktrees.

- .claude/skills/influxdb3-test-setup/SKILL.md. It covers:

  1. Architecture overview - Shows the directory structure for shared vs per-worktree data
  2. Quick reference - Common commands table
  3. Setup workflows - Core only, Enterprise only, or both
  4. Worktree-specific databases - How to create isolated databases named after the worktree
  5. Test environment configuration - Setting up .env.test files for code block tests
  6. Troubleshooting - Common issues (license, auth, ports)
  7. Service comparison - Core vs Enterprise differences

  The skill references the init script but keeps database creation as a separate workflow step, allowing flexibility for different testing scenarios.
@jstirnaman jstirnaman requested a review from Copilot January 16, 2026 23:00
@jstirnaman
Copy link
Contributor Author

@copilot Update .github/instructions or skills for Copilot to reference and use the new .claude/skills/influxdb3-test-setup skill.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves Docker Compose services for testing InfluxDB 3 Core and Enterprise by adding proper data isolation, authentication handling, and initialization tooling. It introduces per-worktree Core instances and shared Enterprise instances with automatic token generation.

Changes:

  • Adds initialization script for automated service setup with token generation
  • Refactors Docker Compose services to use file-based token authentication instead of secrets
  • Adds comprehensive documentation for test setup workflows and troubleshooting

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

File Description
test/scripts/init-influxdb3.sh New initialization script for automating service setup, directory creation, and token generation
compose.yaml Updates service configurations for influxdb3-core and influxdb3-enterprise with new authentication model, adds influxdb3-core-noauth service
.claude/skills/influxdb3-test-setup/SKILL.md New comprehensive documentation covering architecture, workflows, and troubleshooting
Comments suppressed due to low confidence (2)

compose.yaml:1

  • The setup instructions mention creating an admin token JSON file but don't specify the required format or content. Users won't know what to put in this file. Consider adding a comment with the expected format or referencing where to find it.
# This is a Docker Compose file for the InfluxData documentation site.

test/scripts/init-influxdb3.sh:1

  • The comment references creating an admin-token.json file in setup step 2, but line 109 states 'Admin token is auto-generated on first run.' This is contradictory. Either the file must be pre-created or it's auto-generated - clarify which is correct.
#!/bin/bash

Copy link
Contributor

Copilot AI commented Jan 16, 2026

@jstirnaman I've opened a new pull request, #6751, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits January 16, 2026 20:31
…tions (#6751)

* Initial plan

* docs(copilot): Add influxdb3-test-setup skill documentation to instructions

- Add InfluxDB 3 Test Setup subsection under Testing section with quick reference commands
- Add Skills section under Specialized Instructions with all available skills
- Document influxdb3-test-setup skill alongside existing skills (cypress-e2e-testing, docs-cli-workflow, hugo-template-dev)
- Include links to skill files and brief descriptions for discoverability

Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>
@jstirnaman jstirnaman requested a review from a team as a code owner January 20, 2026 18:26
@jstirnaman jstirnaman requested review from sanderson and removed request for a team January 20, 2026 18:26
- Store Core and Enterprise tokens as JSON files with metadata
- Update SKILL.md instructions for jq-based token extraction
- Use Docker secrets for secure token mounting in compose.yaml
- Update init-influxdb3.sh to generate JSON token files
- Refactor compose.yaml to mount token files as secrets, not binds
- Standardize API examples and environment setup for new token format
…/CD (#6756)

- Add 'description' field to offline admin token schema alongside 'expiry_millis'
- Add new section for Docker Compose with preconfigured admin tokens
- Document Docker secrets for secure token management
- Add CI/CD setup instructions using environment variables
- Standardize on INFLUXDB3_AUTH_TOKEN environment variable

Both 'description' and 'expiry_millis' are optional fields supported
by the InfluxDB 3 server when reading preconfigured token files.
@jstirnaman jstirnaman requested a review from a team as a code owner January 20, 2026 22:49
@github-actions
Copy link
Contributor

PR Preview Action v1.4.8
🚀 Deployed preview to https://influxdata.github.io/docs-v2/pr-preview/pr-6750/
on branch gh-pages at 2026-01-20 22:51 UTC

@github-actions
Copy link
Contributor

PR Preview

Status Details
Preview View preview
Pages 4 page(s) deployed
Build time 65s
Last updated 2026-01-20 22:52:05 UTC
Pages included in this preview
  • /influxdb3/enterprise/admin/tokens/admin/preconfigured/
  • /influxdb3/core/admin/tokens/admin/preconfigured/
  • /influxdb3/enterprise/get-started/setup/
  • /influxdb3/core/get-started/setup/

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

@jstirnaman jstirnaman removed the request for review from a team January 20, 2026 23:17
@jstirnaman jstirnaman merged commit a32b566 into master Jan 20, 2026
1 check passed
@jstirnaman jstirnaman deleted the improve-test-setup branch January 20, 2026 23:17
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