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

Handle invalid URIs in magic source links #3132

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

vinistock
Copy link
Member

@vinistock vinistock commented Feb 3, 2025

Motivation

Another error caught by telemetry. If the magic source link is written manually, the user may enter something that's not a valid URI and that crashes the document link request.

Implementation

Started handling the URI parsing errors so that we simply don't do anything if it's not a valid URI.

Automated Tests

Added a test that reproduces the behaviour.

@vinistock vinistock self-assigned this Feb 3, 2025
@vinistock vinistock added server This pull request should be included in the server gem's release notes bugfix This PR will fix an existing bug labels Feb 3, 2025 — with Graphite App
Copy link
Member Author


How to use the Graphite Merge Queue

Add the label graphite-merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@vinistock vinistock marked this pull request as ready for review February 3, 2025 14:48
@vinistock vinistock requested a review from a team as a code owner February 3, 2025 14:48
@vinistock vinistock force-pushed the 02-03-handle_invalid_uris_in_magic_source_links branch from 19cdf67 to 9c79796 Compare February 3, 2025 15:18
@vinistock vinistock added the graphite-merge Ship this PR using Graphite's merge queue label Feb 3, 2025
Copy link
Member Author

vinistock commented Feb 3, 2025

Merge activity

  • Feb 3, 10:18 AM EST: The merge label 'graphite-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Feb 3, 10:45 AM EST: A user added this pull request to the Graphite merge queue.
  • Feb 3, 11:12 AM EST: A user merged this pull request with the Graphite merge queue.

### Motivation

Another error caught by telemetry. If the magic source link is written manually, the user may enter something that's not a valid URI and that crashes the document link request.

### Implementation

Started handling the URI parsing errors so that we simply don't do anything if it's not a valid URI.

### Automated Tests

Added a test that reproduces the behaviour.
@graphite-app graphite-app bot force-pushed the 02-03-handle_invalid_uris_in_magic_source_links branch from 9c79796 to 1d0d3d4 Compare February 3, 2025 15:46
@graphite-app graphite-app bot merged commit 1d0d3d4 into main Feb 3, 2025
42 checks passed
@graphite-app graphite-app bot deleted the 02-03-handle_invalid_uris_in_magic_source_links branch February 3, 2025 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This PR will fix an existing bug graphite-merge Ship this PR using Graphite's merge queue server This pull request should be included in the server gem's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants