-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Update northstar screener runner to scope runs #21650
Update northstar screener runner to scope runs #21650
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit d5ccbc1:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 3c71bc76cfffde8800964edb980c02f8e410310f (build) |
📊 Bundle size reportUnchanged fixtures
|
scripts/screener/screener.runner.ts
Outdated
// https://github.com/microsoft/azure-pipelines-tasks/issues/9801 | ||
const commit = process.env.SYSTEM_PULLREQUEST_SOURCECOMMITID; | ||
|
||
await notifyIntegration({ commit, url: '', status: 'completed', project: screenerConfig.projectRepo }); |
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.
I don't how it's implemented, but can we use conclusion: skipped
? IMO it will be clearer what happened, for example:
https://docs.github.com/en/rest/reference/checks#create-a-check-run
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.
I agree with this but would bring this up later in a new PR as a new feature as what's implemented here is the current behavior. Also because the proxy doesn't just propagate the status value into the Github API (I don't think) and that would required changes on the proxy code first, but correct me if I'm wrong @ling1726.
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.
@layershifter it all depends on if our branch protection counts skipped
as a valid status to merge the PR :)
Can we screenshare to check ? because I don't have access to branch protection
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.
@ling1726 as I know Github does not allow to configure statuses for checks in repository settings.
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.
I tested this in PR #21652... it seems to pass the status check. I can add it, but again the only way we'll know is if it goes into master :D
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.
so the lesson:
cancelled
will not pass the checkskipped
will pass the check
scripts/gulp/tasks/screener.ts
Outdated
if (changedPackages.has('@fluentui/docs')) { | ||
handlePromiseExit(screenerRunner(screenerConfigPath)); | ||
} else { | ||
handlePromiseExit(cancelScreenerRun(screenerConfigPath)); | ||
} |
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.
Good addition 👍🏻
scripts/screener/screener.runner.ts
Outdated
// https://github.com/microsoft/azure-pipelines-tasks/issues/9801 | ||
const commit = process.env.SYSTEM_PULLREQUEST_SOURCECOMMITID; | ||
|
||
await notifyIntegration({ commit, url: '', status: 'completed', project: screenerConfig.projectRepo }); |
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.
I agree with this but would bring this up later in a new PR as a new feature as what's implemented here is the current behavior. Also because the proxy doesn't just propagate the status value into the Github API (I don't think) and that would required changes on the proxy code first, but correct me if I'm wrong @ling1726.
Perf Analysis (
|
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
Avatar | mount | 924 | 823 | 5000 | |
BaseButton | mount | 1025 | 1005 | 5000 | |
Breadcrumb | mount | 2860 | 2750 | 1000 | |
ButtonNext | mount | 509 | 493 | 5000 | |
Checkbox | mount | 1638 | 1778 | 5000 | |
CheckboxBase | mount | 1497 | 1435 | 5000 | |
ChoiceGroup | mount | 5195 | 5227 | 5000 | |
ComboBox | mount | 1091 | 1097 | 1000 | |
CommandBar | mount | 11275 | 11381 | 1000 | |
ContextualMenu | mount | 8891 | 9042 | 1000 | |
DefaultButton | mount | 1211 | 1238 | 5000 | |
DetailsRow | mount | 4217 | 3966 | 5000 | |
DetailsRowFast | mount | 3977 | 4193 | 5000 | |
DetailsRowNoStyles | mount | 3961 | 3793 | 5000 | |
Dialog | mount | 3163 | 3129 | 1000 | |
DocumentCardTitle | mount | 214 | 227 | 1000 | |
Dropdown | mount | 3561 | 3646 | 5000 | |
FluentProviderNext | mount | 2077 | 2098 | 5000 | |
FluentProviderWithTheme | mount | 178 | 165 | 10 | |
FluentProviderWithTheme | virtual-rerender | 129 | 138 | 10 | |
FluentProviderWithTheme | virtual-rerender-with-unmount | 219 | 200 | 10 | |
FocusTrapZone | mount | 1900 | 2014 | 5000 | |
FocusZone | mount | 2055 | 1941 | 5000 | |
IconButton | mount | 1773 | 1950 | 5000 | |
Label | mount | 407 | 427 | 5000 | |
Layer | mount | 3201 | 3083 | 5000 | |
Link | mount | 545 | 571 | 5000 | |
MakeStyles | mount | 1920 | 1968 | 50000 | |
MenuButton | mount | 1520 | 1790 | 5000 | |
MessageBar | mount | 2203 | 2251 | 5000 | |
Nav | mount | 3511 | 3780 | 1000 | |
OverflowSet | mount | 1288 | 1257 | 5000 | |
Panel | mount | 2590 | 2816 | 1000 | |
Persona | mount | 1015 | 988 | 1000 | |
Pivot | mount | 1693 | 1717 | 1000 | |
PrimaryButton | mount | 1389 | 1437 | 5000 | |
Rating | mount | 8532 | 8641 | 5000 | |
SearchBox | mount | 1595 | 1412 | 5000 | |
Shimmer | mount | 2944 | 2780 | 5000 | |
Slider | mount | 2070 | 2174 | 5000 | |
SpinButton | mount | 5675 | 5578 | 5000 | |
Spinner | mount | 466 | 457 | 5000 | |
SplitButton | mount | 3659 | 3394 | 5000 | |
Stack | mount | 563 | 553 | 5000 | |
StackWithIntrinsicChildren | mount | 2456 | 2490 | 5000 | |
StackWithTextChildren | mount | 5734 | 5535 | 5000 | |
SwatchColorPicker | mount | 12312 | 12350 | 5000 | |
TagPicker | mount | 2940 | 2865 | 5000 | |
TeachingBubble | mount | 14113 | 14253 | 5000 | |
Text | mount | 438 | 452 | 5000 | |
TextField | mount | 1598 | 1471 | 5000 | |
ThemeProvider | mount | 1384 | 1354 | 5000 | |
ThemeProvider | virtual-rerender | 647 | 642 | 5000 | |
ThemeProvider | virtual-rerender-with-unmount | 1980 | 2144 | 5000 | |
Toggle | mount | 1001 | 906 | 5000 | |
buttonNative | mount | 181 | 186 | 5000 |
Perf Analysis (@fluentui/react-northstar
)
@@ -88,3 +88,10 @@ export type ScreenerTestsConfig = { | |||
steps?: ScreenerStep[]; | |||
themes?: ScreenerThemeName[]; | |||
}; | |||
|
|||
export interface ScreenerProxyPayload { |
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.
q: can we (would it make sense to) export this from the proxy package we have ?
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.
our current screener proxy is just a node server app. It's possible to publish package for this from the ADO repo, but it would need to be setup to publish and then turn the screener-proxy repo into a monorepo.... I can create an issue for a follow up, but I would say not in the scope of current work.
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.
created #21655 to follow up and added it to the build board
* @param {string} since - Commit to compare against | ||
* @returns {Set<string>} - Set of packages that are changed | ||
*/ | ||
function getChangedPackages(since = 'origin/master') { |
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.
This already exists in workspace-tools
, so you should probably just import it from there instead of re-implementing.
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.
The workspace-tools
one is different, I'm using Lage here to get the changed packages and their dependents... maybe I should rename this ?
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.
I'll rename this to getAffectedPacakges
.then(() => { | ||
cb(); | ||
process.exit(0); | ||
}) |
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.
I don't think it's necessary to explicitly exit 0? If so, can you just do this?
.then(() => { | |
cb(); | |
process.exit(0); | |
}) | |
.then(cb) |
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.
I'm not entirely sure why this was done for gulp tbh.... it was the previous behaviour and I don't want to refactor this now
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.
Gulp doesn't handle exit codes properly as you can see here gulpjs/gulp#2081
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.
Ah I hadn't noticed that this was the old behavior. Thanks for the background.
Current Behavior
Every PR will trigger a screener run
New Behavior
Only PRs that result in a change in
@fluentui/docs
will trigger a screener run.Scoping is done with lage
Related Issue(s)
Fixes #