Comments (6)
Ok, solution is to avoid the deasync code paths completely.
The problem is that whenever the deasync lib is called, the promises start to not work anymore. Solution? Don't go through the deasync code paths. How? Avoid the constructor that calls the sync methods.
Instead of doing:
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(testPath, taskJsonPath)
await tr.runAsync()
Do:
let tr: ttm.MockTestRunner = new ttm.MockTestRunner()
await tr.LoadAsync(testPath, taskJsonPath);
await tr.runAsync()
It will completelly avoid calling deasync, as it won't call getNodePathSync
from azure-pipelines-task-lib.
I'm still having issues with newer version of this lib. The packages are now installing, but they fail to run:
Could not locate the bindings file. Tried:
→ C:\Users\alzollin\source\repos\setup-msstore-cli\node_modules\deasync\build\deasync.node
→ C:\Users\alzollin\source\repos\setup-msstore-cli\node_modules\deasync\build\Debug\deasync.node
→ C:\Users\alzollin\source\repos\setup-msstore-cli\node_modules\deasync\build\Release\deasync.node
→ C:\Users\alzollin\source\repos\setup-msstore-cli\node_modules\deasync\out\Debug\deasync.node
→ C:\Users\alzollin\source\repos\setup-msstore-cli\node_modules\deasync\Debug\deasync.node
→ C:\Users\alzollin\source\repos\setup-msstore-cli\node_modules\deasync\out\Release\deasync.node
→ C:\Users\alzollin\source\repos\setup-msstore-cli\node_modules\deasync\Release\deasync.node
→ C:\Users\alzollin\source\repos\setup-msstore-cli\node_modules\deasync\build\default\deasync.node
→ C:\Users\alzollin\source\repos\setup-msstore-cli\node_modules\deasync\compiled\21.2.0\win32\x64\deasync.node
→ C:\Users\alzollin\source\repos\setup-msstore-cli\node_modules\deasync\addon-build\release\install-root\deasync.node
→ C:\Users\alzollin\source\repos\setup-msstore-cli\node_modules\deasync\addon-build\debug\install-root\deasync.node
→ C:\Users\alzollin\source\repos\setup-msstore-cli\node_modules\deasync\addon-build\default\install-root\deasync.node
→ C:\Users\alzollin\source\repos\setup-msstore-cli\node_modules\deasync\lib\binding\node-v120-win32-x64\deasync.node
It is installing version 0.1.29 of deasync. I've tried forcing it to 0.1.28, but then it fails to build.
Version 0.1.29 has the node files in here:
.\node_modules\deasync\bin\win32-x64-node-21\deasync.node
from azure-pipelines-task-lib.
Hi, the addition on "deasync": "^0.1.28", to the package-json made our ndoe_modules 3 times bigger and our 30MB extension to 80MB extension.
Can you look into it?
@DenisRumyantsev
from azure-pipelines-task-lib.
@azchohfi, that is the problem related to missing binaries as I see.
There are no node20 binaries deasync-bin repository.
from azure-pipelines-task-lib.
@azchohfi I noticed binaries (node v19-21) that were uploaded 3 days ago.
I'm closing this ticket for now.
@sverdlov93 upgrading azure-pipelines-task-lib
from 4.5.0 to 4.6.0 makes node_modules
bigger by 7MB. Could you please double-check that your problem depends on deasync module? If your problem persists, feel free to create another issue.
from azure-pipelines-task-lib.
The specific issue was related to Jest itself. I had to add 'node' do the moduleFileExtensions in the jest.config.js.
Still, I'm facing a different issue now. deasyn doesn't seem to work with Jest:
abbr/deasync#156
from azure-pipelines-task-lib.
Related Issues (20)
- Invalid download directory for MockTestRunner (EPERM) HOT 2
- environment variables are not picked up by task. HOT 2
- Secrets (within quotes) that are part of Variable Group linked to KeyVault are not masked in logs HOT 2
- visibleRule validation failing for custom extension HOT 3
- ToolRunner is leaking the command line HOT 2
- How to authenticate using AccessToken to call DevOps API from custom PowerShell task HOT 4
- ToolRunner does not properly buffer the `stdline` and `errline`. HOT 1
- CVE-2022-37614: Critical Vulnerability in mockery module HOT 16
- Version of VstsTaskSdk packages in PSGallery module stop at 0.11.0 and does not contain fixes from 0.12.0 thru 0.14.0. Please publish newer versions referenced in release notes. HOT 2
- FR - Provide a way to get Task/Extension information HOT 4
- azure-pipelines-task-lib/node/docs /proxy.md contains a minor mistake on one of the samples HOT 4
- Node version discrepancy between task library docs, tutorial docs, build, and mock task runner HOT 3
- `azure-pipelines-task-lib/task`'s `execAsync` fails on `this.tool(...)` HOT 2
- azure-pipelines-task-lib/task's _argStringToArray strips double quotes HOT 2
- It is not clear which version of the node is supported by the version of the azure-pipelines-task-lib HOT 3
- Implementing custom pipeline task to execute multiple tasks in parallel HOT 1
- Implement log grouping commands HOT 4
- Find-Match crashes if Onedrive synced file is missing on harddisk - Find-Match : Cannot convert value "4199968" to type "VstsTaskSdk.FS.Attributes" due to enumeration values that are not valid. Specify one of the following enumeration values and try again. HOT 1
- clarify *wrapper task* and *task variable* HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-pipelines-task-lib.