Closed Bug 1804219 Opened 2 months ago Closed 2 months ago

Clarify where to add preferences between RecommendedPreferences (remote), prefs.rs (geckodriver) and geckoinstance.py (Marionette client)

Categories

(Remote Protocol :: Agent, task, P1)

task
Points:
1

Tracking

(firefox109 fixed)

RESOLVED FIXED
109 Branch
Tracking Status
firefox109 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

Details

(Whiteboard: [webdriver:m5])

Attachments

(1 file)

See https://phabricator.services.mozilla.com/D163891#inline-903429

I think the current comments around preference updates are lacking or misleading:

  • geckoinstance.py: no mention of the existence of the other files
  • prefs.rs: only mentions marionette.js (which is now RecommendedPreferences.sys.mjs I assume)
  • RecommendedPreferences.sys.mjs: the most complete comment, but it suggests to either a preference "here" or both in prefs.rs + geckoinstance.py iff this preference needs to be set before restart

But since not all consumers use RemoteAgent's RecommendedPreferences (geckoinstance.py forces remote.prefs.recommended to false which disables RecommendedPreferences) we should call out explicitly in those comments that some preferences have to be duplicated in geckoinstance.py. Right now it seems the decision to add a pref in geckoinstance.py is only based on the fact that the preference can be applied live or not.

Maybe a decision chart should be like:

  • should the preference be set before starting the Browser?
    • yes: set it in prefs.rs
    • no: set it in RecommendedPreferences.sys.mjs (maybe mention that we can have protocol specific preferences as well there)
  • additionally, if the preference is relevant outside of CI/Automation scenarios (give examples of Marionette python client usage to help the reader understand the context here) also add it in geckoinstance.py

Also, we should have this comment in a single spot and link to it from all 3 files, so that the information doesn't get out of sync.

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/793f3c14d7df
[remote] Clarify where to add remote preferences r=webdriver-reviewers,whimboo,Sasha
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
Points: --- → 1
Priority: -- → P1
Whiteboard: [webdriver:m5]
You need to log in before you can comment on or make changes to this bug.