You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For my extension, i run several tests after install a pre-release version to testing org. I have noticed that there is a delay after installing an extension before it can actually be used. I have found that polling the tfx build tasks list for my task id allows my pipeline to know when the task is ready for use. Having either the install task or a new task perform this check may be helpful to others that are experiencing the same. Here is the bash I use to poll for task availability from my pipeline. I think the same could be done from node much easier
#/bin/bashset -e
task_id=
token=
service_url=
attempts=0
max=25
whilegetopts t:s:c: flag;docase"${flag}"in
t) token="${OPTARG}";;
s) service_url="${OPTARG}";;
c) task_id="${OPTARG}";;
esacdoneuntil$(npx tfx build tasks list --service-url $service_url -t $token --no-color --json | jq -r --arg t "$task_id"'.[] | select(.id == $t) | .id'| grep -q "$task_id");doif [ $attempts-gt$max ]
thenecho"wait limit reached! exiting..."return 1;elseecho"waiting for task to become available..."
sleep $(( attempts++));fidoneecho"task is available!"
The text was updated successfully, but these errors were encountered:
Here is the error I get if i try to use the tasks too quickly after install. If I rerun the jobs a few minutes later, they work fine
##[error]A task is missing. The pipeline references a task called '<my-task-id>'. This usually indicates the task isn't installed, and you may be able to install it from the Marketplace: https://marketplace.visualstudio.com.
For my extension, i run several tests after install a pre-release version to testing org. I have noticed that there is a delay after installing an extension before it can actually be used. I have found that polling the
tfx build tasks list
for my task id allows my pipeline to know when the task is ready for use. Having either the install task or a new task perform this check may be helpful to others that are experiencing the same. Here is the bash I use to poll for task availability from my pipeline. I think the same could be done from node much easierThe text was updated successfully, but these errors were encountered: