Skip to content
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

Merged
merged 6 commits into from
Nov 28, 2018
Merged

Add Task Azure IoT Edge and AzureIoTEdge in make-options.json #8901

merged 6 commits into from
Nov 28, 2018

Conversation

michaeljqzq
Copy link
Contributor

No description provided.

Copy link
Member

@prativen prativen left a 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 @@
{
Copy link
Member

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

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`);
Copy link
Member

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

Copy link
Contributor Author

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


// Check if self(task) is included in a build pipeline
public static checkSelfInBuildPipeline(): boolean {
let hostType = tl.getVariable('system.hostType').toLowerCase();
Copy link
Member

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?

Copy link
Contributor Author

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.

@@ -12,6 +12,7 @@
"AzureFileCopyV1",
"AzureFileCopyV2",
"AzureFunctionV1",
"AzureIoTEdge",
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

"Release"
],
"author": "Microsoft",
"version": {
Copy link
Member

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

Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added preview tag

],
"author": "Microsoft",
"version": {
"Major": 2,
Copy link
Member

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",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added preview tag

"name": "AzureIoTEdge",
"friendlyName": "Azure IoT Edge",
"description": "Azure IoT Edge",
"helpMarkDown": "",
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I need to add links to docs ? Can I add link to our own github so that we can manage the issues, change log more conveniently? Or is there other best practices?

Copy link
Member

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.

Copy link
Member

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

@@ -0,0 +1,38 @@
import * as appInsights from 'applicationinsights';
Copy link
Member

@kmkumaran kmkumaran Nov 23, 2018

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..

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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

  1. In on-premise server, typically you push data to Kusto. Does that need user consent?
  2. 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)
  3. 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

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two things here:

  1. 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
  2. Recommend you also push to kusto as well as all inhouse tasks telemetry is gathered here

Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,111 @@
{
"name": "azure-iot-edge-vsts-extension-task",
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added TPN

"Build",
"Release"
],
"author": "Microsoft",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"author": "Microsoft Corporation",

@chshrikh chshrikh merged commit 9d274be into microsoft:master Nov 28, 2018
chshrikh pushed a commit that referenced this pull request Nov 28, 2018
* 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
chshrikh pushed a commit that referenced this pull request Nov 28, 2018
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants