Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Client metrics name validation (#4339) #4342

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

gastonfournier
Copy link
Contributor

  1. Add a test for the failing use case (we can see it here):
FAIL src/lib/services/client-metrics/metrics-service-v2.test.ts
  ● process metrics properly even when some names are not url friendly

    ValidationError: "name" must be URL friendly
  1. Fix and handle this gracefully
  2. Added a new toggle to silently ignore bad names: filterInvalidClientMetrics

Fixes: #4193

1. Add a test for the failing use case (we can see it
[here](https://github.com/Unleash/unleash/actions/runs/5656229196/job/15322845002?pr=4339#step:5:783)):
```
FAIL src/lib/services/client-metrics/metrics-service-v2.test.ts
  ● process metrics properly even when some names are not url friendly

    ValidationError: "name" must be URL friendly
```
2. Fix and handle this gracefully
3. Added a new toggle to silently ignore bad names: filterInvalidClientMetrics

Fixes: #4193
@sonatype-lift
Copy link

sonatype-lift bot commented Jul 25, 2023

Sonatype Lift is retiring

Sonatype Lift will be retiring on Sep 12, 2023, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console.
We are extremely grateful and thank you for your support over the years.

📖 Read about the impacts and timeline

@vercel
Copy link

vercel bot commented Jul 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Jul 25, 2023 1:10pm
unleash-monorepo-frontend ⬜️ Ignored (Inspect) Jul 25, 2023 1:10pm

Copy link
Contributor

@andreas-unleash andreas-unleash left a comment

Choose a reason for hiding this comment

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

LG

@gastonfournier gastonfournier enabled auto-merge (squash) July 25, 2023 13:19
@gastonfournier gastonfournier merged commit 9398bd9 into main Jul 25, 2023
12 checks passed
@gastonfournier gastonfournier deleted the backport-metrics-fix branch July 25, 2023 13:33
gastonfournier added a commit that referenced this pull request Jul 25, 2023
1. Add a test for the failing use case (we can see it
[here](https://github.com/Unleash/unleash/actions/runs/5656229196/job/15322845002?pr=4339#step:5:783)):
```
FAIL src/lib/services/client-metrics/metrics-service-v2.test.ts
  ● process metrics properly even when some names are not url friendly

    ValidationError: "name" must be URL friendly
```
2. Fix and handle this gracefully
3. Added a new toggle to silently ignore bad names:
filterInvalidClientMetrics

Fixes: #4193
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants