Skip to content

Share only 51D_ and listed query parameters when no list is given - #218

Merged
jwrosewell merged 3 commits into
rcfrom
fix/usage-query-list-none
Nov 15, 2026
Merged

jwrosewell merged 3 commits into
rcfrom
fix/usage-query-list-none

Conversation

@jwrosewell

@jwrosewell jwrosewell commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

ShareUsage and ShareUsageEvidenceKeyFilter given query_whitelist=None with share_all_query_string_parameters off shared every query string and form parameter. None now holds no names, as an empty list does, so only parameters starting 51D_ and those on the list are shared unless every parameter is asked for.

What the specification says

usage-sharing-element.md lines 71 to 78 at rc dbaf099c:

Unless all Evidence is shared, it MUST also return false for any key where:

...

  • Prefix = query., the share all query string parameters option is off, and field does not start with 51D_ and is not in a user-configurable allow list of query string parameters that will be shared.

The options table gives the list's default as "All query string and HTTP form parameters starting with 51D_ are shared." (line 437), and sharing every parameter is the separate share all query string parameters option, on by default (lines 80 and 81 and line 438).

What changed

fc4ee2f4, then 8d80a161 from the review.

  • share_usage_evidencekeyfilter.py reads None as no names, and shares every parameter only when share_all_query_string_parameters is set. #50 made None share every parameter, following .NET's SetShareAllQueryStringParameters, but here share_all_query_string_parameters already does that.
  • The docstrings of ShareUsageEvidenceKeyFilter and ShareUsage say None holds no names.

Tests

58f798f9 changes the two tests that held the old behaviour.

  • test_no_parameter_list_shares_only_51d_parameters in test_share_usage_evidencekeyfilter.py, which was test_no_parameter_list_shares_every_parameter, checks that None and an empty list both share query.51d_campaign but not query.campaign, and that both share query.campaign when share_all_query_string_parameters is set.
  • test_empty_query_whitelist in test_usage.py sends through a real receiver with None and with an empty list, and checks that the campaign parameter is not sent.

How it was verified

  • Red, run 43763779011 on 11dc7997, being the tests 58f798f on rc e99765e plus a throwaway workflow. Both changed tests failed on Ubuntu and Windows, the filter's with True is not false for query.campaign and the element's with 'campaign value' unexpectedly found in what was sent, and the package's suite gave 2 failed, 119 passed.
  • Green, run 43763790726 on 9d0ae83e, being the earlier head fc4ee2f plus the same workflow. Both tests passed on Ubuntu and Windows, and the suite gave 121 passed.
  • Guard asked for in review, run 43769324775 on 83a912d1, being fc4ee2f with the earlier line that left session-id and sequence out of the list given to the filters when query_whitelist is None, plus a throwaway workflow. test_empty_query_whitelist, which then also checked the session id, passed on Ubuntu and Windows, because get_data_from_evidence reads query.session-id and query.sequence from all the evidence found, before any filter, and the tracker's filter leaves them out by name. So that change did nothing, and 8d80a161 puts the line back as it is on rc and drops the session id check.
  • Full build, run 43770832095 on tmp/pr-matrix-218b, the head 8d80a16 merged with rc f583e6b, green in all ten Build and Test jobs, with 11 of 11 Setting 'PullRequestSha' lines on 8d80a16 and Configure printing "Left out 5 macOS entries". macOS was left out of this draft's full build under the 9 November decision. The rc head is built with macOS before it merges into main. The head merges cleanly with rc 27967e7.
  • Earlier full build, run 43763940632 on tmp/pr-matrix-218, the earlier head fc4ee2f merged with rc e99765e, green in all ten Build and Test jobs.

What it releases

A change to fiftyone_pipeline_engines_fiftyone. A caller passing query_whitelist=None to share every parameter, or a configuration file giving the list as null, now shares only 51D_ parameters and needs share_all_query_string_parameters=True to share every one. The default settings are unchanged, being share_all_query_string_parameters=True with query_whitelist=[].

What remains

Nothing for this change.

With share_all_query_string_parameters off, usage sharing must not share a
query string or form parameter that neither starts 51D_ nor is on the list
to share. A list given as None currently shares every parameter. These
tests expect None to hold no names, as an empty list does, and expect the
session id still to reach the usage data.
usage-sharing-element.md lines 65 to 72 say that, unless all evidence is
shared, a query string or form parameter is not shared when it neither
starts 51D_ nor is on the list to share. share_all_query_string_parameters
is the setting that shares every parameter. A list given as None shared
every parameter as well, so None now holds no names, as an empty list
does. The session id and sequence are kept for the usage data whatever the
list holds.
The usage data reads the session id and sequence from the evidence before
any filter, and the tracker's filter leaves them out by name, so whether
the list given to the filters names them changes nothing. A guard run with
the earlier line put back passed the session id check. The line is as it
was on rc, and the test no longer checks the session id.
@jwrosewell
jwrosewell marked this pull request as ready for review November 15, 2026 23:31
@jwrosewell
jwrosewell merged commit f65c4c9 into rc Nov 15, 2026
3 checks passed
@jwrosewell
jwrosewell deleted the fix/usage-query-list-none branch November 15, 2026 23:31
jwrosewell added a commit that referenced this pull request Nov 16, 2026
rc names each Pipeline's own flow elements in its records, and from #218
shares only 51D_ and listed query parameters when sharing every query
parameter is off and no list is given. Both are kept. The Package
elements this branch adds are written from the flow elements of the
Pipeline a record came from, beside rc's FlowElement elements.
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.

1 participant