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

Support destination param on Install task #120

Open
spowser opened this issue May 8, 2024 · 4 comments
Open

Support destination param on Install task #120

spowser opened this issue May 8, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@spowser
Copy link

spowser commented May 8, 2024

Scenario:

  • Ubuntu VM with 4 attached disks.
    • Each disk has an agent installed on it at /mnt/disk/somedirectory
    • Each agent runs under its own account
    • Each account is added to a group
    • The group has permissions (chmod 2770) to the /opt/hostedtoolcache which is where Flutter gets installed normally

Issue:

  • The first agent to the party succeeds and builds fine
  • The second and third agents that try to install Flutter at almost the same time (race condition) but are just behind the first and throw errors trying to rm files trying to clean up the extraction destination
  • The last agent is a bit slower and sees Flutter is installed but when it attempts to use the SDK gets the following error
Flutter failed to open a file at "/opt/hostedtoolcache/Flutter/3.13.9/linux/flutter/bin/cache/lockfile".
Please ensure that the SDK and/or project is installed in a location that has read/write permissions for the current user.
Try running:
  sudo chown -R $(whoami) /opt/hostedtoolcache/Flutter/3.13.9/linux/flutter/bin/cache/lockfile

Assumptions:

Since the error is stating the current user doesn't have permissions and the permissions for the lockfile located at /opt/hostedtoolcache/Flutter/3.13.9/linux/flutter/bin/cache, and are NOT 770, the SDK is designed to only allow 1 user to use it at a time

Multiple users on a machine will need their own copies of the SDK to do work in parallel

Request:

Allow the Flutter SDK be installed to a location defined by a parameter

@spowser
Copy link
Author

spowser commented May 8, 2024

I see the Flutter Env task allows a custom path to be defined. Does this mean that it is expected that the Install task was not used and this is a way to tie in a custom Flutter install to the rest of the task ecosystem?

@spowser
Copy link
Author

spowser commented May 9, 2024

I ended up implementing a custom version of the Flutter Install task and using the Flutter Env task to point to the install location. Things seem to be working fine now.

Still would be nice if the Install task supported a destination parameter

@hey24sheep
Copy link
Owner

I see the Flutter Env task allows a custom path to be defined. Does this mean that it is expected that the Install task was not used and this is a way to tie in a custom Flutter install to the rest of the task ecosystem?

Hi, that is correct. You can install your - own SDK and connect other tasks

@hey24sheep
Copy link
Owner

Glad to see you got it working. I'll see what I can do. A PR will be great too 😁. Thanks 👍🏻

@hey24sheep hey24sheep added the enhancement New feature or request label May 11, 2024
@hey24sheep hey24sheep changed the title Multi-Agent Support Support destination param on Install task Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants