You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our Configuration class currently contains many fields that are unused and/or undocumented. Review each field, decide whether it should be used, removed, or consolidated, and add missing doc strings.
I must have missed that one. The only use case I can think of is when you want to debug something locally against multiple inputs and don't want to bother with renaming files... which is valid
Activity
janbuchar commentedon Nov 8, 2024
Thanks for bringing this up! If you could write out the attributes in question here, we can discuss the appropriate steps together.
vdusek commentedon Nov 8, 2024
The fields that are used:
internal_timeoutverbose_log(but it just sets the DEBUG level, and we have another field exactly for that)default_dataset_iddefault_key_value_store_iddefault_request_queue_idpurge_on_startwrite_metadatapersist_storagememory_mbytesstorage_dirThe fields that are not used:
default_browser_pathdisable_browser_sandboxpersist_state_intervalsystem_info_intervalmax_used_cpu_ratioavailable_memory_ratiochrome_executable_pathheadlessxvfbThe
inputKeyfield from JS is missing completely.janbuchar commentedon Nov 11, 2024
In JS, this is used by
PlaywrightLauncherIn JS, this is used by
BrowserLauncherto add an argument to playwright/puppeteerIn JS, this is used by
BrowserLauncher, and set in https://github.com/apify/apify-actor-docker/blob/master/node-playwright/Dockerfile or by the actor developer in environment variablesThis may be set in https://github.com/apify/apify-actor-docker/blob/master/node-playwright/Dockerfile or by the actor developer in environment variables, but I don't think it actually has any effect 🤔 @vladfrangu do you know more?
These should probably be consumed by
LocalEventManager. Currently, the SDK passes that, which may not be optimal.These should probably be handled by
LocalEventManager,SystemInfoorSnapshotter.I must have missed that one. The only use case I can think of is when you want to debug something locally against multiple inputs and don't want to bother with renaming files... which is valid
vdusek commentedon Nov 11, 2024
Agreed, thanks @janbuchar for the investigation. We should also note, that
Configurationvalues should be overridable by component-specific values.E.g.
then
Trueis used for headless.Also, we should split this issue into many smaller ones.
docs: improve docs of the `Configuration` class (#671)
fix!: Refactor service usage to rely on `service_locator` (#691)
[-]Improve the Configuration class[/-][+]Fix the usage of Configuration class[/+]fix: Fix the usage of Configuration (#899)