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(rum-oversight): unknown filter should return empty set #667

Closed
wants to merge 1 commit into from

Conversation

kptdobe
Copy link
Contributor

@kptdobe kptdobe commented Oct 8, 2024

#663 "backport to oversight"

@kptdobe kptdobe requested a review from trieloff October 8, 2024 11:57
Copy link

aem-code-sync bot commented Oct 8, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

@trieloff
Copy link
Contributor

@karlpauls we should add this to distiller.

@trieloff
Copy link
Contributor

And then close it in favor of #669

@karlpauls karlpauls self-requested a review October 14, 2024 10:28
Copy link
Collaborator

@karlpauls karlpauls left a comment

Choose a reason for hiding this comment

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

This seems to fail the tests:

✖ DataChunk.filter(userAgent) negation (0.836417ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  
  0 !== 1
  
      at TestContext.<anonymous> ( ) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: 0,
    expected: 1,
    operator: 'strictEqual'
  }

Otherwise, it seems to apply cleanly to the distiller so if I can get the test to pass I'll follow the suggestion from @trieloff.

@karlpauls
Copy link
Collaborator

I think I see the issue, the test for the negation has a filter for the host facet that is not defined. I fixed it like this:

+++ b/tools/oversight/test/cruncher.test.js
@@ -776,6 +776,7 @@ describe('DataChunks', () => {
     d.load(chunks1);
 
     // define facet functions
+    d.addFacet('host', (bundle) => bundle.host);
     d.addFacet(
       // as a convention, we use ! to indicate negation. When used in URL parameters, this
       // looks like a nice filter:  ?userAgent!=desktop

in adobe/rum-distiller#9 - @kptdobe, does that make sense and if so, should I merge it in rum-distiller and close this issue in favor of #669 as suggested by @trieloff?

@kptdobe
Copy link
Contributor Author

kptdobe commented Oct 14, 2024

If we plan to use the distiller in oversight, yes, we can close this one.

@kptdobe kptdobe closed this Oct 14, 2024
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.

3 participants