Commit Graph

3 Commits (42ae0fbf6b3db05ee07fed2dc701e0b1ca09336a)

Author SHA1 Message Date
Jason Stirnaman 42ae0fbf6b
dar issue 563 - Cloud 1 documentation, support, and migration (#6729)
* docs(v2): Specify versions for v2 Cloud and OSS

* docs(v2): Use specific version for OSS v2, add ToC

* docs(v1): Use specific versions and names. Replace Enterprise v1 with 3
Ent.

* docs(v1): More detailed description for OSS v1 release notes. Repetition
fixes.

* docs(v1): Update Download instructions. Add version specificity

* docs(v1): OSS v1 specificity, fix config commands, cleanup lists

* docs(cloud1): Shared note shortcode to guide Cloud 1 users to Enterprise
documentation, Cloud 1 support, and v3 migration

* Provide Cloud 1.x in version detector and product selector menu,
simplify InfluxDB 1.x section

- Simplify InfluxDB 1.x section on platform page to product links and
  migration guidance
- Remove detailed TICK stack and Enterprise feature descriptions
- Update all Cloud 1 links to point to /platform/#influxdb-cloud-1

- Keep Cloud 1 infrastructure intact:
  - products.yml configuration
  - Product selector entry (links to platform page section)
  - Version detector for *.influxcloud.net service URLs
  - Ask AI integration

Files changed:
- content/platform/_index.md (simplified, updated links)
- content/shared/identify-version.md (updated links)
- layouts/shortcodes/influxdb-cloud1-note.html (updated links)
- assets/js/utils/product-mappings.ts
- assets/js/influxdb-version-detector.ts

Closes /influxdata/dar/issues/563

* Delete content/influxcloud/v1/_index.md

* Update content/enterprise_influxdb/v1/_index.md

* Update content/influxdb/v1/introduction/install.md

* Fix PR Preview skipping when layout changes include wildcard URL patterns (#6725)

* Initial plan

* Fix: Strip wildcards from URL paths in PR Preview detection

- Update normalizeUrlPath() to remove asterisk wildcards
- Collapse multiple consecutive slashes after wildcard removal
- Add backtick as valid URL delimiter for code-wrapped URLs
- Add comprehensive test cases for wildcard handling
- Update backtick test to reflect safer truncation behavior

Fixes issue where PR descriptions with wildcard patterns like
`/influxdb3/enterprise/*` were not properly extracted, causing
PR Preview to skip even when URLs were provided.

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

* docs: Clarify backtick handling in URL validation

Add comment explaining that backticks act as delimiters in regex
extraction, preventing them from appearing in extracted paths even
though they're in the rejection pattern.

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

* docs: Improve comments explaining normalization and regex logic

- Clarify why wildcards are removed before slash collapsing
- Document the defense-in-depth backtick handling
- Add examples of the normalization process

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>

* Update content/platform/_index.md

Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>

* refactor: organize cloud1-note shortcode into influxdb directory (#6734)

Move the Cloud 1 note shortcode from influxdb-cloud1-note.html
to influxdb/cloud1-note.html to follow the existing organizational
pattern in layouts/shortcodes/influxdb/.

This change also applies the Cloud 1 content updates from PR #6729
using the new organized shortcode path: {{< influxdb/cloud1-note >}}

closes influxdata/docs-v2#6729

Co-authored-by: Claude <noreply@anthropic.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-01-15 14:55:06 -06:00
Jason Stirnaman e03e7874fc
refactor(ci): improve PR preview with products.yml and index page (#6656)
- Load product prefixes from data/products.yml (single source of truth)
- Build regex pattern dynamically from loaded namespaces
- Fix CSS copying: Hugo outputs fingerprinted CSS at root level
- Generate index.html with clickable links to preview pages
- Add test for influxdb3_explorer namespace

This keeps the URL parser in sync as new products are added and
provides a better preview experience with navigable links.
2025-12-19 12:12:20 -06:00
Jason Stirnaman e203482b62
feat(ci): add PR preview system for GitHub Pages (#6636)
* docs(ci): add PR preview system design

Document the design for GitHub Pages PR previews including:
- Selective deployment of changed pages only
- Reuse of existing content-utils.js change detection
- URL parsing from PR descriptions for layout/asset changes
- Automatic cleanup on PR close
- Storage budget management

* docs(ci): add PR preview implementation plan

Detailed task-by-task implementation plan including:
- 8 tasks with complete code and exact file paths
- Reuses existing content-utils.js for change detection
- Scripts for URL parsing, change detection, file staging
- Main workflow and cleanup workflow
- Setup documentation and testing steps

* feat(ci): add PR URL parser for preview page detection

* fix(ci): harden PR URL parser against malicious input

- Add path validation to reject path traversal attacks (..)
- Add validation to reject HTML/script injection attempts
- Add validation to reject URL-encoded characters
- Update regex to capture markdown link paths: [text](/path/)
- Add comprehensive test suite with 27 security and functionality tests

Security improvements:
- Reject paths containing '..' to prevent directory traversal
- Reject paths with suspicious characters: <, >, |, {, }, `, etc.
- Reject URL-encoded characters to prevent encoding attacks
- Validate all paths against known product prefixes

Functionality improvements:
- Support markdown link syntax: [text](/influxdb3/core/)
- Support reference-style markdown links
- Maintain existing support for production URLs, localhost URLs, and relative paths

* feat(ci): add change detection script for PR previews

* fix(ci): remove unused import from detect-preview-pages.js

* feat(ci): add preview file staging script for selective deployment

* fix(ci): add input validation to preview file staging script

- Add path traversal validation to urlToHtmlPath() to reject paths containing '..'
- Add array validation at start of preparePreviewFiles() with clear error message
- Fix copiedCount to only increment when safeCopy() actually succeeds
- Add return value to copyPage() to track success/failure

Addresses security vulnerabilities and improves accuracy of preview stats.

* feat(ci): add preview comment manager for sticky PR comments

* fix(ci): sanitize user input in preview comments to prevent XSS

* feat(ci): add PR preview workflow for GitHub Pages deployment

* fix(ci): correct environment variables and checkout in PR preview workflow

* feat(ci): add weekly stale preview cleanup workflow

* docs(ci): add PR preview setup guide

* Delete docs/plans/2025-12-16-pr-preview-design.md

* Delete docs/plans/2025-12-16-pr-preview-implementation.md

* fix(ci): add input validation for PR preview security

- Add single quote to rejected characters in URL path validation
  to prevent JavaScript injection in workflow string interpolation
- Add BASE_REF validation regex to prevent command injection,
  allowing slashes for feature branches (e.g., feature/new-auth)
- Add PR_NUM numeric validation in cleanup workflow
- Add tests for single quote handling and BASE_REF validation
2025-12-18 13:44:14 -06:00