Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
b0950fd5
Unverified
Commit
b0950fd5
authored
Aug 26, 2021
by
Casey Hillers
Committed by
GitHub
Aug 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Use bucket to check staging test instead of builder name (#88908)" (#88969)
This reverts commit
d36f246d
.
parent
74ac7c47
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
9 deletions
+6
-9
upload_results.dart
dev/devicelab/lib/command/upload_results.dart
+0
-3
cocoon.dart
dev/devicelab/lib/framework/cocoon.dart
+4
-4
cocoon_test.dart
dev/devicelab/test/cocoon_test.dart
+2
-2
No files found.
dev/devicelab/lib/command/upload_results.dart
View file @
b0950fd5
...
...
@@ -23,7 +23,6 @@ class UploadResultsCommand extends Command<void> {
argParser
.
addOption
(
'luci-builder'
,
help:
'[Flutter infrastructure] Name of the LUCI builder being run on.'
);
argParser
.
addOption
(
'test-status'
,
help:
'Test status: Succeeded|Failed'
);
argParser
.
addOption
(
'commit-time'
,
help:
'Commit time in UNIX timestamp'
);
argParser
.
addOption
(
'builder-bucket'
,
help:
'[Flutter infrastructure] Luci builder bucket the test is running in.'
);
}
@override
...
...
@@ -41,7 +40,6 @@ class UploadResultsCommand extends Command<void> {
final
String
?
builderName
=
argResults
![
'luci-builder'
]
as
String
?;
final
String
?
testStatus
=
argResults
![
'test-status'
]
as
String
?;
final
String
?
commitTime
=
argResults
![
'commit-time'
]
as
String
?;
final
String
?
builderBucket
=
argResults
![
'builder-bucket'
]
as
String
?;
// Upload metrics to skia perf from test runner when `resultsPath` is specified.
if
(
resultsPath
!=
null
)
{
...
...
@@ -56,7 +54,6 @@ class UploadResultsCommand extends Command<void> {
gitBranch:
gitBranch
,
builderName:
builderName
,
testStatus:
testStatus
,
builderBucket:
builderBucket
,
);
}
}
dev/devicelab/lib/framework/cocoon.dart
View file @
b0950fd5
...
...
@@ -90,7 +90,6 @@ class Cocoon {
String
?
gitBranch
,
String
?
builderName
,
String
?
testStatus
,
String
?
builderBucket
,
})
async
{
Map
<
String
,
dynamic
>
resultsJson
=
<
String
,
dynamic
>{};
if
(
resultsPath
!=
null
)
{
...
...
@@ -103,7 +102,7 @@ class Cocoon {
resultsJson
[
'NewStatus'
]
=
testStatus
;
}
resultsJson
[
'TestFlaky'
]
=
isTestFlaky
??
false
;
if
(
_shouldUpdateCocoon
(
resultsJson
,
builderBucket:
builderBucket
))
{
if
(
_shouldUpdateCocoon
(
resultsJson
))
{
await
retry
(
()
async
=>
_sendUpdateTaskRequest
(
resultsJson
).
timeout
(
Duration
(
seconds:
requestTimeoutLimit
)),
retryIf:
(
Exception
e
)
=>
e
is
SocketException
||
e
is
TimeoutException
||
e
is
ClientException
,
...
...
@@ -113,9 +112,10 @@ class Cocoon {
}
/// Only post-submit tests on `master` are allowed to update in cocoon.
bool
_shouldUpdateCocoon
(
Map
<
String
,
dynamic
>
resultJson
,
{
String
?
builderBucket
=
'prod'
}
)
{
bool
_shouldUpdateCocoon
(
Map
<
String
,
dynamic
>
resultJson
)
{
const
List
<
String
>
supportedBranches
=
<
String
>[
'master'
];
return
supportedBranches
.
contains
(
resultJson
[
'CommitBranch'
])
&&
builderBucket
!=
'staging'
;
return
supportedBranches
.
contains
(
resultJson
[
'CommitBranch'
])
&&
!
resultJson
[
'BuilderName'
].
toString
().
toLowerCase
().
contains
(
'staging'
);
}
/// Write the given parameters into an update task request and store the JSON in [resultsPath].
...
...
dev/devicelab/test/cocoon_test.dart
View file @
b0950fd5
...
...
@@ -353,14 +353,14 @@ void main() {
const
String
updateTaskJson
=
'{'
'"CommitBranch":"master",'
'"CommitSha":"
$commitSha
",'
'"BuilderName":"
builderAbc
",'
'"BuilderName":"
Linux_staging_test
",'
'"NewStatus":"Succeeded",'
'"ResultData":{"i":0.0,"j":0.0,"not_a_metric":"something"},'
'"BenchmarkScoreKeys":["i","j"]}'
;
fs
.
file
(
resultsPath
).
writeAsStringSync
(
updateTaskJson
);
// This will fail if it decided to upload results
await
cocoon
.
sendTaskStatus
(
resultsPath:
resultsPath
,
builderBucket:
'staging'
);
await
cocoon
.
sendTaskStatus
(
resultsPath:
resultsPath
);
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment