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

Migrating to Node 16 #844

Merged
merged 22 commits into from
Jul 8, 2022
Merged

Conversation

AndreyIvanov42
Copy link
Contributor

@AndreyIvanov42 AndreyIvanov42 commented Jun 6, 2022

Task description

In order to migrate tasks to the Node16 execution handler, we have to update the pipelines-task-lib itself to support the Node16 runtime.

Changelog

  • Rewrote the pipeline to use node 16
  • Updated dev dependencies
  • Updated package-lock.json to version 2 to unlock the ability for deterministic and reproducible builds
  • Fixed types for tests
  • Fixed tool runner test to utilize changed output from Node 16
  • Fixed decipher.update method call

Testing

  • Changes have been tested on Linux, MacOS, Windows:
    by unit-tests
    manually as part of some task. Used tasks and cases are described here
  • Enough test coverage for changes and current test coverage for the task doesn't look poor
  • I didn't find any breaking changes
  • There are no other concerns
  • I haven't discovered any new uncovered test/use cases

Added unit tests: No

@AndreyIvanov42 AndreyIvanov42 marked this pull request as ready for review June 27, 2022 14:43
@AndreyIvanov42 AndreyIvanov42 requested a review from a team June 27, 2022 14:43
@AndreyIvanov42
Copy link
Contributor Author

Migrated task

CopyFiles, UsePythonVersion, CMake

Environment used (OS/Agent)

Windows 10x64 / Agent with Node 16 handler, Ubuntu 16.04x64 / Agent with Node 16 handler, macOS 12 / Agent with Node 16 handler

Test cases

- task: CMake@1
  inputs:
    workingDirectory: 'src'
    cmakeArgs: -DCMAKE_SHELL=false -DTEST_ONE=one;two -DTEST_TWO=/one/two/three -DTEST_WIN_VARIABLE=test -DTEST_VARIABLE=test
    runInsideShell: false 
- task: CMake@1
  inputs:
    workingDirectory: 'src'
    cmakeArgs: -DCMAKE_SHELL=true -DTEST_ONE=one;two -DTEST_TWO=/one/two/three -DTEST_VARIABLE=$USER -DTEST_WIN_VARIABLE=%OS%
    runInsideShell: true
- task: UsePythonVersion@0
  inputs:
    versionSpec: 3.10.5
    disableDownloadFromRegistry: true
- task: CopyFiles@2
  inputs:
    SourceFolder: 'src/copy-files/source'
    Contents: *.js
    TargetFolder: 'src/copy-files/target'
    CleanTargetFolder: false
    OverWrite: false
    flattenFolders: false
    preserveTimestamp: true
- task: CopyFiles@2
  inputs:
    SourceFolder: 'src/copy-files/source'
    Contents: *.js
    TargetFolder: 'src/copy-files/target'
    CleanTargetFolder: false
    OverWrite: true
    flattenFolders: false
    preserveTimestamp: true
- task: CopyFiles@2
  inputs:
    SourceFolder: 'src/copy-files/source'
    Contents: *
    TargetFolder: 'src/copy-files/target'
    CleanTargetFolder: true
    OverWrite: false
    flattenFolders: false
    preserveTimestamp: false
- task: CopyFiles@2
  inputs:
    SourceFolder: 'src/copy-files/source'
    Contents: **/bin/**
    TargetFolder: 'src/copy-files/target'
    CleanTargetFolder: true
    OverWrite: false
    flattenFolders: true
    preserveTimestamp: false
- task: CopyFiles@2
  inputs:
    SourceFolder: 'src/copy-files/source'
    Contents: **
    TargetFolder: 'src/copy-files/target'
    CleanTargetFolder: true
    OverWrite: false
    flattenFolders: true
    preserveTimestamp: false
- task: CopyFiles@2
  inputs:
    SourceFolder: 'src/copy-files/source'
    Contents: |
      *.css
      **/bin/**.css
    TargetFolder: 'src/copy-files/target'
    CleanTargetFolder: true
    OverWrite: false
    flattenFolders: true
    preserveTimestamp: false
- task: CopyFiles@2
  inputs:
    SourceFolder: 'src/copy-files/source'
    Contents:  root-file1.js
    TargetFolder: 'src/copy-files/target'
    CleanTargetFolder: true
    OverWrite: false
    flattenFolders: false
    preserveTimestamp: true

Copy link

@alexander-smolyakov alexander-smolyakov left a comment

Choose a reason for hiding this comment

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

Please take a look at the comments below.

Also, please add a contribution section to the README.md file in the follow-up pull request to describe the current workflow:

  • master branch for SDK v3 (stable and targets Node10)
  • releases/4.x branch for SDK v4 (preview and targets Node16)
  • Changes that were merged for SDK v3 should be cherry-picked for SDK v4 once they are merged to the master branch

azure-pipelines.yml Outdated Show resolved Hide resolved
node/package-lock.json Show resolved Hide resolved
azure-pipelines.yml Show resolved Hide resolved
@AndreyIvanov42 AndreyIvanov42 force-pushed the users/v-andivanov/release-4-node16 branch from 916e343 to 379cb2a Compare July 6, 2022 12:42
@AndreyIvanov42 AndreyIvanov42 changed the base branch from releases/4.x to master July 6, 2022 18:44
@AndreyIvanov42 AndreyIvanov42 changed the base branch from master to releases/4.x July 6, 2022 18:47
Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>
Co-authored-by: Konstantin Tyukalov <52399739+KonstantinTyukalov@users.noreply.github.com>
Copy link

@alexander-smolyakov alexander-smolyakov left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@AndreyIvanov42 AndreyIvanov42 merged commit 76d9677 into releases/4.x Jul 8, 2022
KonstantinTyukalov added a commit that referenced this pull request Dec 2, 2022
* Migrating to Node 16 (#844)

* create new release/4.x branch

* release for 4 version

* update pipeline

* update package.json

* fix test and build commands

* fixed tests on node18

* change image version for linux

* fix test for linux

* add separete test for linux

* node v16.13

* add v16.13.0 to test

* test on windows-2022, macOS-11

* separate branch for node16

* remove temporary code

* update package.json

* changed pipeline

* updated pipeline

* Microsoft mandatory file (#839)

* Update pipeline to include a step for publishing artifacts. (#848) (#849)

* Update pipeline

* Update azure-pipelines.yml

* nodeversion as variable

* Added node16 to schema (#852)

Co-authored-by: Andrey Ivanov <v-andivanov@microsoft.com>

* bump version (#862)

Co-authored-by: Andrey Ivanov <v-andivanov@microsoft.com>

* Update ci-cd for publishing npm package (#863)

* fix npm publish

Co-authored-by: Andrey Ivanov <v-andivanov@microsoft.com>

* fix add registry (#864)

Co-authored-by: Andrey Ivanov <v-andivanov@microsoft.com>

* fix ToolRunner - _getSpawnSyncOptions (#873)

* Mockery version is updated from 1.7.0 to 2.1.0 because of vulnerability (#878)

* Fixed release path (#888)

* Improvement of the release condition (#889)

* Added test task with test condition. Negative test

* Added test task with test condition. Positive test

* Fix path

* Fix path

* Fix path

* Changed build.sourcebranchname -> build.sourcebranch and path to branch

* Fix path

* Version changed (#894)

* Pipeline fixing (#893)

* Token test

* Test token

* Publish test

* call order changed

* Nmp token syntax reverted

* Changed windows job

* Script clearing

* Uncommented condition

* Token changed

* Test - off publish condition

* Switched on publish condition

* Package version was reverted

* Add escape for more correct working

* Add changelog

* Update package-lock version

* Bump tl version to 4.1.0

* Update changelog

* Remove PS task lib changes from node changelog

* Update changelog for 4.0.1-preview

Co-authored-by: AndreyIvanov42 <93121155+AndreyIvanov42@users.noreply.github.com>
Co-authored-by: Andrey Ivanov <v-andivanov@microsoft.com>
Co-authored-by: Denis Rumyantsev <mr.denis.rumyantsev@gmail.com>
Co-authored-by: Roman-Shchukin <111063382+Roman-Shchukin@users.noreply.github.com>
@qianz2 qianz2 mentioned this pull request Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants