-
Notifications
You must be signed in to change notification settings - Fork 12
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
Website breakage triage tools upgraded for efficient mitigation #1787
Conversation
func url(for configuration: Configuration) -> URL { | ||
// URLs for privacyConfiguration and trackerDataSet shall match the ones in update_embedded.sh. | ||
// Danger checks that the URLs match on every PR. If the code changes, the regex that Danger uses may need an update. | ||
switch configuration { | ||
case .bloomFilterBinary: return URL(string: "https://staticcdn.duckduckgo.com/https/https-mobile-v2-bloom.bin")! | ||
case .bloomFilterSpec: return URL(string: "https://staticcdn.duckduckgo.com/https/https-mobile-v2-bloom-spec.json")! | ||
case .bloomFilterExcludedDomains: return URL(string: "https://staticcdn.duckduckgo.com/https/https-mobile-v2-false-positives.json")! | ||
case .privacyConfiguration: return URL(string: "https://staticcdn.duckduckgo.com/trackerblocking/config/v3/macos-config.json")! | ||
case .privacyConfiguration: return customPrivacyConfigurationUrl ?? URL(string: "https://staticcdn.duckduckgo.com/trackerblocking/config/v3/macos-config.json")! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Tom, Im not really fond of complicating that default AppConfigurationURLProvider, I think it should remain unchanged to our default values. Could you please take a look at how I tackled it in https://github.com/duckduckgo/iOS/compare/jacek/custom-config-url?expand=1 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jaceklyp, in your PR, I see business logic in the View Controller. Also, the approach can lead to inconsistencies across the codebase in case CustomConfigurationURLProvider
is initialized outside of the View Controller. If you think the storing logic should be outside of the AppConfigurationURLProvider
, we can create a dedicated class for storing/providing of the custom URL and compose it with AppConfigurationURLProvider.swift
.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, works as expected 👍
Please see some minor comments inline
@jaceklyp, I am going to move on with this so features can be used to mitigate breakage. We can consult the architecture when you are back. Thanks for chiming in :) |
Task/Issue URL: https://app.asana.com/0/1199230911884351/1205611221645312/f
Tech Design URL: -
CC:
Description:
Enhancement of Debug menu to help with efficient website breakage mitigation. The menu now enables internal users to change remote configuration URL and remove injected scripts from the current tab.
Steps to test this PR:
Test removal of user scripts
Test custom configuration URL
Internal references:
Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation