-
Notifications
You must be signed in to change notification settings - Fork 101
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
User/ujsrivastava/block unblock device test spec #672
base: main
Are you sure you want to change the base?
Conversation
… methods in DeviceAgentManagementService to handle blocking and unblocking a device and releasing any frozen blocked devices
…ame test task. Added block device by specific device Identifier
…eIdentifier is a group. Also changed the name of output variable unblockDeviceSecretKey to UnblockDeviceSecretKey
@microsoft-github-policy-service agree company="Microsoft"
@microsoft-github-policy-service agree company="Microsoft" |
center/src/main/java/com/microsoft/hydralab/center/service/TestTaskService.java
Show resolved
Hide resolved
@@ -957,23 +978,34 @@ private JSONObject runTestTaskByGroup(TestTaskSpec testTaskSpec) { | |||
} | |||
|
|||
private JSONObject runTestTaskByDevice(TestTaskSpec testTaskSpec) { | |||
if (testTaskSpec.unblockDevice) { |
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.
If the user wants to block the device and then run 3 tasks, an error will occur. Secret detection and unlocking the device should be separated.
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.
Added a check if (device.isTesting() || (!isRunOnBlockedDevice(testTaskSpec) && isDeviceBlocked(testTaskSpec.deviceIdentifier)))
, which checks if a task wants to run a test on a blocked device then it should be able to run the test on that blocked device if the secret key matches using the method isRunOnBlockedDevice(TestTaskSpec testTaskSpec)
.
Later on we add a check if the task wants to unblock the device. If so it unblocks the device as well. Thus now even if the user wants to run multiple tests on a particular device without unblocking it, the user can do the same. Request to review the logic.
Please unsubscribe me from your mailing list
…On Mon, Feb 24, 2025 at 1:59 AM Le Zhou ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In
center/src/main/java/com/microsoft/hydralab/center/service/TestTaskService.java
<#672 (comment)>:
> relatedIdentifiers.addAll(deviceAgentManagementService.queryDeviceByGroup(deviceIdentifier));
} else {
+ if (deviceAgentManagementService.isDeviceBlocked(deviceIdentifier)) {
+ logger.warn("Device " + deviceIdentifier + " is blocked currently.");
+ return false;
+ }
Here would always return false if pass the blocked device serial, you may
need to add another condition here. Such as check blockDevice
image.png (view on web)
<https://github.com/user-attachments/assets/57ec5840-f708-429c-a891-073684d1f491>
------------------------------
In
center/src/main/java/com/microsoft/hydralab/center/service/DeviceAgentManagementService.java
<#672 (comment)>:
> @@ -957,23 +978,34 @@ private JSONObject runTestTaskByGroup(TestTaskSpec testTaskSpec) {
}
private JSONObject runTestTaskByDevice(TestTaskSpec testTaskSpec) {
+ if (testTaskSpec.unblockDevice) {
If the user wants to block the device and then run 3 tasks, an error
will occur. Secret detection and unlocking the device should be separated.
—
Reply to this email directly, view it on GitHub
<#672 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADU3GOU7A7DZ5ZOPM47MRZD2RLGPHAVCNFSM6AAAAABXNXDAPCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMMZWGE4TMOJTGI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
same here - please unsubscribe me from your mailing list.
…On Mon, Feb 24, 2025 at 5:07 PM Srikar ***@***.***> wrote:
Please unsubscribe me from your mailing list <br> <br> On Mon, Feb 24,
2025 at 1:59 AM Le Zhou ***@***.***> wrote: <br> <br> > ***@***.****
commented on this pull request. <br> > ------------------------------
<br> > <br> > In <br> >
center/src/main/java/com/microsoft/hydralab/center/service/TestTaskService.java
<br> > <
#672 (comment)>:
<br> > <br> > >
relatedIdentifiers.addAll(deviceAgentManagementService.queryDeviceByGroup(deviceIdentifier));
<br> > } else { <br> > + if
(deviceAgentManagementService.isDeviceBlocked(deviceIdentifier)) { <br>
> + logger.warn("Device " + deviceIdentifier + " is
blocked currently."); <br> > + return false; <br> > + } <br>
> <br> > Here would always return false if pass the blocked device
serial, you may <br> > need to add another condition here. Such as check
blockDevice <br> > image.png (view on web) <br> > <
https://github.com/user-attachments/assets/57ec5840-f708-429c-a891-073684d1f491>
<br> > ------------------------------ <br> > <br> > In <br> >
center/src/main/java/com/microsoft/hydralab/center/service/DeviceAgentManagementService.java
<br> > <
#672 (comment)>:
<br> > <br> > > @@ -957,23 +978,34 @@ private JSONObject
runTestTaskByGroup(TestTaskSpec testTaskSpec) { <br> > } <br> > <br>
> private JSONObject runTestTaskByDevice(TestTaskSpec testTaskSpec) {
<br> > + if (testTaskSpec.unblockDevice) { <br> > <br> > If the
user wants to block the device and then run 3 tasks, an error <br> >
will occur. Secret detection and unlocking the device should be separated.
<br> > <br> > — <br> > Reply to this email directly, view it on
GitHub <br> > <
#672 (review)>,
<br> > or unsubscribe <br> > <
https://github.com/notifications/unsubscribe-auth/ADU3GOU7A7DZ5ZOPM47MRZD2RLGPHAVCNFSM6AAAAABXNXDAPCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMMZWGE4TMOJTGI>
<br> > . <br> > You are receiving this because you are subscribed to
this thread.Message <br> > ID: ***@***.***> <br> > <br>
—
Reply to this email directly, view it on GitHub
<#672 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACLJZCAZYTYHKY36STBLCKT2RMRSJAVCNFSM6AAAAABXNXDAPCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZYGQ4TQMBRHE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
[image: rakirs2]*rakirs2* left a comment (microsoft/HydraLab#672)
<#672 (comment)>
Please unsubscribe me from your mailing list <br> <br> On Mon, Feb 24,
2025 at 1:59 AM Le Zhou ***@***.***> wrote: <br> <br> > ***@***.****
commented on this pull request. <br> > ------------------------------
<br> > <br> > In <br> >
center/src/main/java/com/microsoft/hydralab/center/service/TestTaskService.java
<br> > <
#672 (comment)>:
<br> > <br> > >
relatedIdentifiers.addAll(deviceAgentManagementService.queryDeviceByGroup(deviceIdentifier));
<br> > } else { <br> > + if
(deviceAgentManagementService.isDeviceBlocked(deviceIdentifier)) { <br>
> + logger.warn("Device " + deviceIdentifier + " is
blocked currently."); <br> > + return false; <br> > + } <br>
> <br> > Here would always return false if pass the blocked device
serial, you may <br> > need to add another condition here. Such as check
blockDevice <br> > image.png (view on web) <br> > <
https://github.com/user-attachments/assets/57ec5840-f708-429c-a891-073684d1f491>
<br> > ------------------------------ <br> > <br> > In <br> >
center/src/main/java/com/microsoft/hydralab/center/service/DeviceAgentManagementService.java
<br> > <
#672 (comment)>:
<br> > <br> > > @@ -957,23 +978,34 @@ private JSONObject
runTestTaskByGroup(TestTaskSpec testTaskSpec) { <br> > } <br> > <br>
> private JSONObject runTestTaskByDevice(TestTaskSpec testTaskSpec) {
<br> > + if (testTaskSpec.unblockDevice) { <br> > <br> > If the
user wants to block the device and then run 3 tasks, an error <br> >
will occur. Secret detection and unlocking the device should be separated.
<br> > <br> > — <br> > Reply to this email directly, view it on
GitHub <br> > <
#672 (review)>,
<br> > or unsubscribe <br> > <
https://github.com/notifications/unsubscribe-auth/ADU3GOU7A7DZ5ZOPM47MRZD2RLGPHAVCNFSM6AAAAABXNXDAPCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMMZWGE4TMOJTGI>
<br> > . <br> > You are receiving this because you are subscribed to
this thread.Message <br> > ID: ***@***.***> <br> > <br>
—
Reply to this email directly, view it on GitHub
<#672 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACLJZCAZYTYHKY36STBLCKT2RMRSJAVCNFSM6AAAAABXNXDAPCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZYGQ4TQMBRHE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Repo owners: Please figure out how to set up notifications properly and stop sending notifications. |
Same for me
…On Mon, 24 Feb 2025 at 15:14, girmaw ***@***.***> wrote:
same here - please unsubscribe me from your mailing list. <br> <br> On
Mon, Feb 24, 2025 at 5:07 PM Srikar ***@***.***> wrote: <br> <br> >
Please unsubscribe me from your mailing list <br> <br> On Mon,
Feb 24, <br> > 2025 at 1:59 AM Le Zhou ***@***.***&gt; wrote:
<br> <br> &gt; ***@***.**** <br> > commented on this
pull request. <br> &gt; ------------------------------ <br> >
<br> &gt; <br> &gt; In <br> &gt; <br> >
center/src/main/java/com/microsoft/hydralab/center/service/TestTaskService.java
<br> > <br> &gt; &lt; <br> >
#672 (comment)&gt;:
<br> > <br> &gt; <br> &gt; &gt; <br> >
relatedIdentifiers.addAll(deviceAgentManagementService.queryDeviceByGroup(deviceIdentifier));
<br> > <br> &gt; } else { <br> &gt; + if <br> >
(deviceAgentManagementService.isDeviceBlocked(deviceIdentifier)) {
<br> <br> > &gt; + logger.warn(&quot;Device &quot; +
deviceIdentifier + &quot; is <br> > blocked currently.&quot;);
<br> &gt; + return false; <br> &gt; + } <br> <br>
> &gt; <br> &gt; Here would always return false if pass
the blocked device <br> > serial, you may <br> &gt; need to
add another condition here. Such as check <br> > blockDevice <br>
&gt; image.png (view on web) <br> &gt; &lt; <br> >
https://github.com/user-attachments/assets/57ec5840-f708-429c-a891-073684d1f491&gt;
<br> > <br> &gt; ------------------------------ <br>
&gt; <br> &gt; In <br> &gt; <br> >
center/src/main/java/com/microsoft/hydralab/center/service/DeviceAgentManagementService.java
<br> > <br> &gt; &lt; <br> >
#672 (comment)&gt;:
<br> > <br> &gt; <br> &gt; &gt; @@ -957,23
+978,34 @@ private JSONObject <br> > runTestTaskByGroup(TestTaskSpec
testTaskSpec) { <br> &gt; } <br> &gt; <br> <br>
> &gt; private JSONObject runTestTaskByDevice(TestTaskSpec
testTaskSpec) { <br> > <br> &gt; + if
(testTaskSpec.unblockDevice) { <br> &gt; <br> &gt; If
the <br> > user wants to block the device and then run 3 tasks, an
error <br> &gt; <br> > will occur. Secret detection and
unlocking the device should be separated. <br> > <br> &gt;
<br> &gt; — <br> &gt; Reply to this email directly,
view it on <br> > GitHub <br> &gt; &lt; <br> >
#672 (review)&gt;,
<br> > <br> &gt; or unsubscribe <br> &gt; &lt;
<br> >
https://github.com/notifications/unsubscribe-auth/ADU3GOU7A7DZ5ZOPM47MRZD2RLGPHAVCNFSM6AAAAABXNXDAPCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMMZWGE4TMOJTGI&gt;
<br> > <br> &gt; . <br> &gt; You are receiving this
because you are subscribed to <br> > this thread.Message <br>
&gt; ID: ***@***.***&gt; <br> &gt; <br> <br> >
<br> > — <br> > Reply to this email directly, view it on GitHub <br>
> <
#672 (comment)>,
<br> > or unsubscribe <br> > <
https://github.com/notifications/unsubscribe-auth/ACLJZCAZYTYHKY36STBLCKT2RMRSJAVCNFSM6AAAAABXNXDAPCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZYGQ4TQMBRHE>
<br> > . <br> > You are receiving this because you are subscribed to
this thread.Message <br> > ID: ***@***.***> <br> > [image:
rakirs2]*rakirs2* left a comment (microsoft/HydraLab#672) <br> > <
#672 (comment)>
<br> > Please unsubscribe me from your mailing list <br>
<br> On Mon, Feb 24, <br> > 2025 at 1:59 AM Le Zhou
***@***.***&gt; wrote: <br> <br> &gt; ***@***.**** <br>
> commented on this pull request. <br> &gt;
------------------------------ <br> > <br> &gt; <br>
&gt; In <br> &gt; <br> >
center/src/main/java/com/microsoft/hydralab/center/service/TestTaskService.java
<br> > <br> &gt; &lt; <br> >
#672 (comment)&gt;:
<br> > <br> &gt; <br> &gt; &gt; <br> >
relatedIdentifiers.addAll(deviceAgentManagementService.queryDeviceByGroup(deviceIdentifier));
<br> > <br> &gt; } else { <br> &gt; + if <br> >
(deviceAgentManagementService.isDeviceBlocked(deviceIdentifier)) {
<br> <br> > &gt; + logger.warn(&quot;Device &quot; +
deviceIdentifier + &quot; is <br> > blocked currently.&quot;);
<br> &gt; + return false; <br> &gt; + } <br> <br>
> &gt; <br> &gt; Here would always return false if pass
the blocked device <br> > serial, you may <br> &gt; need to
add another condition here. Such as check <br> > blockDevice <br>
&gt; image.png (view on web) <br> &gt; &lt; <br> >
https://github.com/user-attachments/assets/57ec5840-f708-429c-a891-073684d1f491&gt;
<br> > <br> &gt; ------------------------------ <br>
&gt; <br> &gt; In <br> &gt; <br> >
center/src/main/java/com/microsoft/hydralab/center/service/DeviceAgentManagementService.java
<br> > <br> &gt; &lt; <br> >
#672 (comment)&gt;:
<br> > <br> &gt; <br> &gt; &gt; @@ -957,23
+978,34 @@ private JSONObject <br> > runTestTaskByGroup(TestTaskSpec
testTaskSpec) { <br> &gt; } <br> &gt; <br> <br>
> &gt; private JSONObject runTestTaskByDevice(TestTaskSpec
testTaskSpec) { <br> > <br> &gt; + if
(testTaskSpec.unblockDevice) { <br> &gt; <br> &gt; If
the <br> > user wants to block the device and then run 3 tasks, an
error <br> &gt; <br> > will occur. Secret detection and
unlocking the device should be separated. <br> > <br> &gt;
<br> &gt; — <br> &gt; Reply to this email directly,
view it on <br> > GitHub <br> &gt; &lt; <br> >
#672 (review)&gt;,
<br> > <br> &gt; or unsubscribe <br> &gt; &lt;
<br> >
https://github.com/notifications/unsubscribe-auth/ADU3GOU7A7DZ5ZOPM47MRZD2RLGPHAVCNFSM6AAAAABXNXDAPCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMMZWGE4TMOJTGI&gt;
<br> > <br> &gt; . <br> &gt; You are receiving this
because you are subscribed to <br> > this thread.Message <br>
&gt; ID: ***@***.***&gt; <br> &gt; <br> <br> >
<br> > — <br> > Reply to this email directly, view it on GitHub <br>
> <
#672 (comment)>,
<br> > or unsubscribe <br> > <
https://github.com/notifications/unsubscribe-auth/ACLJZCAZYTYHKY36STBLCKT2RMRSJAVCNFSM6AAAAABXNXDAPCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZYGQ4TQMBRHE>
<br> > . <br> > You are receiving this because you are subscribed to
this thread.Message <br> > ID: ***@***.***> <br> > <br>
—
Reply to this email directly, view it on GitHub
<#672 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJIQGE2B27ID4TNSWJRWMT2RMSNJAVCNFSM6AAAAABXNXDAPCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZYGUZDQMRUGY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
[image: girmaw]*girmaw* left a comment (microsoft/HydraLab#672)
<#672 (comment)>
same here - please unsubscribe me from your mailing list. <br> <br> On
Mon, Feb 24, 2025 at 5:07 PM Srikar ***@***.***> wrote: <br> <br> >
Please unsubscribe me from your mailing list <br> <br> On Mon,
Feb 24, <br> > 2025 at 1:59 AM Le Zhou ***@***.***&gt; wrote:
<br> <br> &gt; ***@***.**** <br> > commented on this
pull request. <br> &gt; ------------------------------ <br> >
<br> &gt; <br> &gt; In <br> &gt; <br> >
center/src/main/java/com/microsoft/hydralab/center/service/TestTaskService.java
<br> > <br> &gt; &lt; <br> >
#672 (comment)&gt;:
<br> > <br> &gt; <br> &gt; &gt; <br> >
relatedIdentifiers.addAll(deviceAgentManagementService.queryDeviceByGroup(deviceIdentifier));
<br> > <br> &gt; } else { <br> &gt; + if <br> >
(deviceAgentManagementService.isDeviceBlocked(deviceIdentifier)) {
<br> <br> > &gt; + logger.warn(&quot;Device &quot; +
deviceIdentifier + &quot; is <br> > blocked currently.&quot;);
<br> &gt; + return false; <br> &gt; + } <br> <br>
> &gt; <br> &gt; Here would always return false if pass
the blocked device <br> > serial, you may <br> &gt; need to
add another condition here. Such as check <br> > blockDevice <br>
&gt; image.png (view on web) <br> &gt; &lt; <br> >
https://github.com/user-attachments/assets/57ec5840-f708-429c-a891-073684d1f491&gt;
<br> > <br> &gt; ------------------------------ <br>
&gt; <br> &gt; In <br> &gt; <br> >
center/src/main/java/com/microsoft/hydralab/center/service/DeviceAgentManagementService.java
<br> > <br> &gt; &lt; <br> >
#672 (comment)&gt;:
<br> > <br> &gt; <br> &gt; &gt; @@ -957,23
+978,34 @@ private JSONObject <br> > runTestTaskByGroup(TestTaskSpec
testTaskSpec) { <br> &gt; } <br> &gt; <br> <br>
> &gt; private JSONObject runTestTaskByDevice(TestTaskSpec
testTaskSpec) { <br> > <br> &gt; + if
(testTaskSpec.unblockDevice) { <br> &gt; <br> &gt; If
the <br> > user wants to block the device and then run 3 tasks, an
error <br> &gt; <br> > will occur. Secret detection and
unlocking the device should be separated. <br> > <br> &gt;
<br> &gt; — <br> &gt; Reply to this email directly,
view it on <br> > GitHub <br> &gt; &lt; <br> >
#672 (review)&gt;,
<br> > <br> &gt; or unsubscribe <br> &gt; &lt;
<br> >
https://github.com/notifications/unsubscribe-auth/ADU3GOU7A7DZ5ZOPM47MRZD2RLGPHAVCNFSM6AAAAABXNXDAPCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMMZWGE4TMOJTGI&gt;
<br> > <br> &gt; . <br> &gt; You are receiving this
because you are subscribed to <br> > this thread.Message <br>
&gt; ID: ***@***.***&gt; <br> &gt; <br> <br> >
<br> > — <br> > Reply to this email directly, view it on GitHub <br>
> <
#672 (comment)>,
<br> > or unsubscribe <br> > <
https://github.com/notifications/unsubscribe-auth/ACLJZCAZYTYHKY36STBLCKT2RMRSJAVCNFSM6AAAAABXNXDAPCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZYGQ4TQMBRHE>
<br> > . <br> > You are receiving this because you are subscribed to
this thread.Message <br> > ID: ***@***.***> <br> > [image:
rakirs2]*rakirs2* left a comment (microsoft/HydraLab#672) <br> > <
#672 (comment)>
<br> > Please unsubscribe me from your mailing list <br>
<br> On Mon, Feb 24, <br> > 2025 at 1:59 AM Le Zhou
***@***.***&gt; wrote: <br> <br> &gt; ***@***.**** <br>
> commented on this pull request. <br> &gt;
------------------------------ <br> > <br> &gt; <br>
&gt; In <br> &gt; <br> >
center/src/main/java/com/microsoft/hydralab/center/service/TestTaskService.java
<br> > <br> &gt; &lt; <br> >
#672 (comment)&gt;:
<br> > <br> &gt; <br> &gt; &gt; <br> >
relatedIdentifiers.addAll(deviceAgentManagementService.queryDeviceByGroup(deviceIdentifier));
<br> > <br> &gt; } else { <br> &gt; + if <br> >
(deviceAgentManagementService.isDeviceBlocked(deviceIdentifier)) {
<br> <br> > &gt; + logger.warn(&quot;Device &quot; +
deviceIdentifier + &quot; is <br> > blocked currently.&quot;);
<br> &gt; + return false; <br> &gt; + } <br> <br>
> &gt; <br> &gt; Here would always return false if pass
the blocked device <br> > serial, you may <br> &gt; need to
add another condition here. Such as check <br> > blockDevice <br>
&gt; image.png (view on web) <br> &gt; &lt; <br> >
https://github.com/user-attachments/assets/57ec5840-f708-429c-a891-073684d1f491&gt;
<br> > <br> &gt; ------------------------------ <br>
&gt; <br> &gt; In <br> &gt; <br> >
center/src/main/java/com/microsoft/hydralab/center/service/DeviceAgentManagementService.java
<br> > <br> &gt; &lt; <br> >
#672 (comment)&gt;:
<br> > <br> &gt; <br> &gt; &gt; @@ -957,23
+978,34 @@ private JSONObject <br> > runTestTaskByGroup(TestTaskSpec
testTaskSpec) { <br> &gt; } <br> &gt; <br> <br>
> &gt; private JSONObject runTestTaskByDevice(TestTaskSpec
testTaskSpec) { <br> > <br> &gt; + if
(testTaskSpec.unblockDevice) { <br> &gt; <br> &gt; If
the <br> > user wants to block the device and then run 3 tasks, an
error <br> &gt; <br> > will occur. Secret detection and
unlocking the device should be separated. <br> > <br> &gt;
<br> &gt; — <br> &gt; Reply to this email directly,
view it on <br> > GitHub <br> &gt; &lt; <br> >
#672 (review)&gt;,
<br> > <br> &gt; or unsubscribe <br> &gt; &lt;
<br> >
https://github.com/notifications/unsubscribe-auth/ADU3GOU7A7DZ5ZOPM47MRZD2RLGPHAVCNFSM6AAAAABXNXDAPCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMMZWGE4TMOJTGI&gt;
<br> > <br> &gt; . <br> &gt; You are receiving this
because you are subscribed to <br> > this thread.Message <br>
&gt; ID: ***@***.***&gt; <br> &gt; <br> <br> >
<br> > — <br> > Reply to this email directly, view it on GitHub <br>
> <
#672 (comment)>,
<br> > or unsubscribe <br> > <
https://github.com/notifications/unsubscribe-auth/ACLJZCAZYTYHKY36STBLCKT2RMRSJAVCNFSM6AAAAABXNXDAPCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZYGQ4TQMBRHE>
<br> > . <br> > You are receiving this because you are subscribed to
this thread.Message <br> > ID: ***@***.***> <br> > <br>
—
Reply to this email directly, view it on GitHub
<#672 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJIQGE2B27ID4TNSWJRWMT2RMSNJAVCNFSM6AAAAABXNXDAPCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZYGUZDQMRUGY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
…de the unblockDeviceSecretKey along with the device serial number to run a task on the blocked device with the specific device serial number.
…e blocked device itself if that task blocks that device earlier.
if (isAgentUpdating(agentSessionInfoByAgentId.agentUser.getId())) { | ||
return result; | ||
} | ||
updateDeviceStatus(device.getSerialNum(), DeviceInfo.TESTING, testTaskSpec.testTaskId); | ||
|
||
if (testTaskSpec.unblockDevice) { |
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.
Maybe you need to add a validation before: unblockDevice and blockDevice could not be true value at the same time
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.
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 gradle plugin is not the only way to access hydra lab, so we need to verify it again on the Center side.
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.
Call center is also possible via Azure Extension or REST API driectly
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 for the plugin part.
Description
This Pull Request adds two properties to the requestHydraLabTest test configuation for blocking and unblocking a device on which the test runs.
Blocking a device by a task
Input:
A boolean property blockDevice needs to be provided in the requestHydraLabTest Gradle task input. When it is passed as true, the deviceIdentifier passed in the task is blocked as follows:
Output:
Unblocking a device by a task
Input:
A boolean property unblockDevice and unblockDeviceSecretKey needs to be provided in the requestHydraLabTest Gradle task input. When the unblockDevice is passed as true and unblockDeviceSecretKey is not empty , then the deviceIdentifier passed in the task is unblocked as follows:
Unblocking frozen blocked devices
Automatically unblocking of the devices which have been blocked for more than 4 hours. The default time for unblocking a device is taken as 4 hours for now.
Usecase
This is useful in cases when you want to run multiple tasks on the same device one after the other.
typeSpecificParamCheck
Added the following type specific param check for runningType INSTRUMENTATION:
Linked GitHub issue ID: #673
Pull Request Checklist
Does this introduce a breaking change?
If this introduces a breaking change for Hydra Lab users, please describe the impact and migration path.
How you tested it
Tested it on the center side by sending a POST api
api/test/task/run
with required parameters. It successfully blocks and unblocks the device successfully. This can be validated from the test task id as well. Here are the screenshots of the same.Blocking:

Unblocking:

Please check the type of change your PR introduces:
Feature UI screenshots or Technical design diagrams
If this is a relatively large or complex change, kick it off by drawing the tech design with PlantUML and explaining why you chose the solution you did and what alternatives you considered, etc...