-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add Task Azure IoT Edge and AzureIoTEdge in make-options.json #8901
Conversation
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.
Include version in the task folder name V2. Refer other task folders
@@ -0,0 +1,62 @@ | |||
{ |
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.
Include version in the task folder name V2. Refer other task folders
Tasks/AzureIoTEdge/util.ts
Outdated
public static validateModuleJson(moduleJsonObject: any): void { | ||
// Will throw error if parent property does not exist | ||
if (moduleJsonObject.image.tag.platforms == undefined) { | ||
throw new Error(`${Constants.fileNameModuleJson} image.tag.platforms not set`); |
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.
should move these literals to task.json messages
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.
validateModuleJson and validateDeployTemplateJson method are no longer used and I'll remove them.
Moved the literal in setTaskRootPath
method to task.json
Tasks/AzureIoTEdge/util.ts
Outdated
|
||
// Check if self(task) is included in a build pipeline | ||
public static checkSelfInBuildPipeline(): boolean { | ||
let hostType = tl.getVariable('system.hostType').toLowerCase(); |
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.
are we differentiating task behaviour based on whether the task is included in CI or CD?
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.
Yes. But we didn't use different code logic to treat it. We just print out this information for help user debug issues.
make-options.json
Outdated
@@ -12,6 +12,7 @@ | |||
"AzureFileCopyV1", | |||
"AzureFileCopyV2", | |||
"AzureFunctionV1", | |||
"AzureIoTEdge", |
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.
rename the task folder to AzureIoTEdgeV2
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.
fixed
Tasks/AzureIoTEdge/task.json
Outdated
"Release" | ||
], | ||
"author": "Microsoft", | ||
"version": { |
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 should add "preview":true
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 should let the second version be in preview for a while to get feedback
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 preview tag
Tasks/AzureIoTEdge/task.json
Outdated
], | ||
"author": "Microsoft", | ||
"version": { | ||
"Major": 2, |
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.
Typically we release a new major version first as preview before making it public . Not sure if you want to do the same. If so, add "preview": "true",
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 preview tag
Tasks/AzureIoTEdge/task.json
Outdated
"name": "AzureIoTEdge", | ||
"friendlyName": "Azure IoT Edge", | ||
"description": "Azure IoT Edge", | ||
"helpMarkDown": "", |
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.
Have a link that can take to your help documentation.
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.
recommend add link to the docs. We need to close on the removal of the second git hub which we can discuss seperately.
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.
recommend using an aka.ms url so that the link can be updated offline to point to the right url
Tasks/AzureIoTEdge/telemetry.ts
Outdated
@@ -0,0 +1,38 @@ | |||
import * as appInsights from 'applicationinsights'; |
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.
Are we pushing telemetry data? Typically all in-built task pushes data to Kusto using ##vso[telemetry.publish. Also I am not sure if it is ok in on-premise TFS to push data like this to AppInsights..
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.
Yes. We're sending some telemetry data to Application Insights for usage statistics. We have a statement for the telemetry, and user can disable the telemetry by setting variable DISABLE_TELEMETRY
to true
.
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.
In on-premise server, we push telemetry data only when user gives consent.
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 have several questions about telemetry on on-premise server
- In on-premise server, typically you push data to Kusto. Does that need user consent?
- Can I detect if the task is running in on-premise server or DevOps? If yes, I think we can choose to push to Application Insights when the server is DevOps (Maybe push to Kusto for on-premise server)
- If we change to logic to push all telemetry data to Kusto, how can our team query the data and use it for analytics
Thanks
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.
And our telemetry to AI will not persist(last for 2 days), then a back-end service will route these data to Kusto (under Visual Studio org). So in concept we also use Kusto to record telemetry.
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.
two things here:
- We should try and push telemetry only for hosted AzureDevops . I will get back on what parameter you can check to make the telemetry call
- Recommend you also push to kusto as well as all inhouse tasks telemetry is gathered here
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.
Also, assuming failure to log telemetry does not fail the task
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.
use tl.getVariable("System.ServerType") and check it for 'hosted' value
Reference: https://github.com/Microsoft/azure-pipelines-tasks/blob/01c1662494fb46710c1100a35d1ccb60e1126cdb/Tasks/Common/packaging-common/locationUtilities.ts
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.
you can simply call telemetry.emit telemetry https://github.com/Microsoft/azure-pipelines-tasks/blob/1d75fa8f66aa1cf7a9cb62946939f30f087b2969/Tasks/Common/utility-common/telemetry.ts
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.
Tasks/AzureIoTEdge/package-lock.json
Outdated
@@ -0,0 +1,111 @@ | |||
{ | |||
"name": "azure-iot-edge-vsts-extension-task", |
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.
Please ensure that the OSS dependencies and the specified versions are approved in OSS tool and have been code scanned. You might also need a ThirdPartyNotices.txt. @vincentdass as FYI.
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 TPN
Tasks/AzureIoTEdgeV2/task.json
Outdated
"Build", | ||
"Release" | ||
], | ||
"author": "Microsoft", |
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.
"author": "Microsoft Corporation",
* Add Task Azure IoT Edge and AzureIoTEdge in make-options.json * Rename task, remove unused code logic, refine task metadata * Add ThirdPartyNotice * Update description for the task and the aka.ms link to documentation * Add common telemetry and only send AI telemetry on hosted server * Change author
* Add Task Azure IoT Edge and AzureIoTEdge in make-options.json (#8901) * Add Task Azure IoT Edge and AzureIoTEdge in make-options.json * Rename task, remove unused code logic, refine task metadata * Add ThirdPartyNotice * Update description for the task and the aka.ms link to documentation * Add common telemetry and only send AI telemetry on hosted server * Change author * Fix ts file case and align author change in task.loc.json (#8928) * Include author change in task.loc.json * Rename all ts files to lowercase
No description provided.