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: fixing attribute's subpath starting with colon #2486

Merged
merged 2 commits into from
Oct 24, 2023

Conversation

palbizu
Copy link
Contributor

@palbizu palbizu commented Oct 24, 2023

Description

Fixing Attribute's subpath when they start with colon

Example: Request Headers.:example

Testing

Locally tested

Checklist:

  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

Documentation

Make sure that you have documented corresponding changes in this repository or hypertrace docs repo if required.

@palbizu palbizu requested a review from a team as a code owner October 24, 2023 19:23
@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Merging #2486 (4ccfaab) into main (3170394) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2486   +/-   ##
=======================================
  Coverage   83.06%   83.06%           
=======================================
  Files         925      925           
  Lines       20610    20610           
  Branches     3254     3254           
=======================================
  Hits        17119    17119           
  Misses       3372     3372           
  Partials      119      119           
Files Coverage Δ
...nents/src/filtering/filter/parser/parsed-filter.ts 89.18% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions

This comment has been minimized.

@@ -77,7 +77,7 @@ export const tryParseStringForAttribute = (
}
const potentialSubpath = stringAfterAttributeName.slice(MAP_LHS_DELIMITER.length);
// Subpaths support alphanumeric, -, - and . characters
const firstNonSubpathCharacterIndex = potentialSubpath.search(/[^\w\-\.]/);
const firstNonSubpathCharacterIndex = potentialSubpath.search(/[^\w\-\.\:]/);
Copy link
Contributor

Choose a reason for hiding this comment

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

please update comment (also it says - twice - guessing one should be _ as that is also valid, but it's missing from regex)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@github-actions

This comment has been minimized.

@palbizu palbizu merged commit 92ce31a into main Oct 24, 2023
@palbizu palbizu deleted the FixingAttributeSubpathStartingWithColon branch October 24, 2023 19:58
@github-actions
Copy link

Unit Test Results

       4 files  ±0     316 suites  ±0   45m 55s ⏱️ - 1m 11s
1 131 tests ±0  1 131 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
1 141 runs  ±0  1 141 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 92ce31a. ± Comparison against base commit 3170394.

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