Skip to content

bugfix: add plan-time regex validation for telemetry link name and description#1593

Open
suedaozkaya wants to merge 1 commit into
stackitcloud:mainfrom
suedaozkaya:bugfix/STACKITTRO-1041-telemetry-link-validation
Open

bugfix: add plan-time regex validation for telemetry link name and description#1593
suedaozkaya wants to merge 1 commit into
stackitcloud:mainfrom
suedaozkaya:bugfix/STACKITTRO-1041-telemetry-link-validation

Conversation

@suedaozkaya

Copy link
Copy Markdown

Description

This PR adds plan-time regex validation to the telemetry link's name and description fields to catch invalid inputs locally and avoid raw 400 API errors.

relates to STACKITTRO-1041

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see examples/ directory)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Acceptance tests got implemented or updated (see e.g. here)
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

@suedaozkaya
suedaozkaya requested a review from a team as a code owner July 16, 2026 17:12
Validators: []validator.String{
stringvalidator.RegexMatches(
regexp.MustCompile(`^[a-zA-Z0-9][a-zA-Z0-9\-\ ]*$`),
"The description must start with an alphanumeric character and can only contain letters, numbers, spaces, and hyphens.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In the API docs this is mentioned differently (API docs)

description	
string <= 1024 characters

The description is a longer text chosen by the user to provide more context for the resource.

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