-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
core(fr): add settings to context #12574
Conversation
I haven't been in any of these conversations, but at least on first read it does seem maybe too far for the sake of conceptual purity ("all artifacts come from gatherers"), but then having to special case its initialization in Is it worth re-thinking how we use the settings artifact? I think the original reason for making it an artifact was for clarity in audits. It helps clear up which settings an audit is talking about since gathering and auditing can use different settings (we never got around to allowing much difference, but we still could), and we may just not have had Since during gathering theres only one set of |
The more I look at this, the more I am inclined to agree. We are going to need to handle settings differently in any situation. Creating a pseudo-gatherer to house settings just so it can be used as a dependency is overly convoluted. Other base artifacts do make sense as normal gatherers, but I also don't like the idea of adding a |
I'm also completely fine with The important thing with settings, as @brendankenny already noted, is that the dependency on the auditing side is reflected, as the settings at gather mode time vs. audit time will in fact make a difference in some contexts. |
@@ -63,8 +63,8 @@ describe('Fraggle Rock Config', () => { | |||
}); | |||
|
|||
it('should throw on invalid artifact definitions', () => { | |||
const configJson = {artifacts: [{id: 'FullPageScreenshot', gatherer: 'full-page-screenshot'}]}; | |||
expect(() => initializeConfig(configJson, {gatherMode})).toThrow(/FullPageScreenshot gatherer/); | |||
const configJson = {artifacts: [{id: 'ScriptElements', gatherer: 'script-elements'}]}; |
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.
We are running out of candidates for this hehe
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.
yeah we are 😎
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, thanks @adamraine !
@@ -63,8 +63,8 @@ describe('Fraggle Rock Config', () => { | |||
}); | |||
|
|||
it('should throw on invalid artifact definitions', () => { | |||
const configJson = {artifacts: [{id: 'FullPageScreenshot', gatherer: 'full-page-screenshot'}]}; | |||
expect(() => initializeConfig(configJson, {gatherMode})).toThrow(/FullPageScreenshot gatherer/); | |||
const configJson = {artifacts: [{id: 'ScriptElements', gatherer: 'script-elements'}]}; |
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.
yeah we are 😎
Opening as a draft because I'm not sold on the way I made settings into a dependency.
Some other options I considered:
settings
directly toFRTransitionalContext
settings
manually incollectArtifactDependencies
I converted
FullPageScreenshot
as an example of how this would be used.