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

Use Task Executor Workdir #281

Merged
merged 2 commits into from
Jul 20, 2023
Merged

Use Task Executor Workdir #281

merged 2 commits into from
Jul 20, 2023

Conversation

SharonHart
Copy link
Contributor

@SharonHart SharonHart commented Jul 9, 2023

Addresses #282

@SharonHart
Copy link
Contributor Author

/azp run

@@ -1106,7 +1106,7 @@ private async Task<CloudTask> ConvertTesTaskToBatchTaskAsync(string taskId, TesT
sb.AppendLinuxLine($"chmod -R o+rwx $AZ_BATCH_TASK_WORKING_DIR/wd && \\");
sb.AppendLinuxLine($"export TES_TASK_WD=$AZ_BATCH_TASK_WORKING_DIR/wd && \\");
sb.AppendLinuxLine($"write_ts ExecutorStart && \\");
sb.AppendLinuxLine($"docker run --rm {volumeMountsOption} --entrypoint= --workdir / {executor.Image} {executor.Command[0]} \"{string.Join(" && ", executor.Command.Skip(1))}\" && \\");
sb.AppendLinuxLine($"docker run --rm {volumeMountsOption} --entrypoint= --workdir {executor.Workdir ?? "/"} {executor.Image} {executor.Command[0]} \"{string.Join(" && ", executor.Command.Skip(1))}\" && \\");
Copy link
Collaborator

@BMurri BMurri Jul 10, 2023

Choose a reason for hiding this comment

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

Suggestion: use string.IsNullOrWhitespace

Even better suggestion: remove --workdir entirely if/when there's no non-whitespace text in executor.Workdir, which would bring this implementation of TES into conformity with the TES specification.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It would change the default behavior right? running on the container workdir vs on root, are we good with that?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I will talk with the team on Friday about this, but the TES spec is clear that if this parameter is not set then the container default is to be used.

Copy link
Contributor Author

@SharonHart SharonHart Jul 11, 2023

Choose a reason for hiding this comment

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

Its fine by me, we are always passing a workdir, and I would be happy to push that change. I just wanted to make sure that there are no regressions or breaking changes for current users

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@BMurri Done

@BMurri
Copy link
Collaborator

BMurri commented Jul 10, 2023

/azp run

@SharonHart
Copy link
Contributor Author

SharonHart commented Jul 13, 2023

the creds secret aren't used in the dotnet-format action, maybe because its from a fork?

@BMurri
Copy link
Collaborator

BMurri commented Jul 13, 2023

the creds secret aren't used in the dotnet-format action, maybe because its from a fork?

That's definitely possible. Our azure CI/CD also doesn't work with forks (I've had to copy this branch to this repo in order to build your PR to run our integration tests, etc.)

@SharonHart
Copy link
Contributor Author

SharonHart commented Jul 16, 2023

In that case, can I get permission to create a branch in the repo? Or can this be merged without the check?

@BMurri
Copy link
Collaborator

BMurri commented Jul 17, 2023

In that case, can I get permission to create a branch in the repo? Or can this be merged without the check?

We can merge it without the check. I expect to complete validation by mid-week.

@BMurri
Copy link
Collaborator

BMurri commented Jul 19, 2023

@SharonHart Will the website allow you to merge?

@SharonHart
Copy link
Contributor Author

SharonHart commented Jul 20, 2023

@SharonHart Will the website allow you to merge?

Nope :(
image

@BMurri BMurri merged commit c9a0c23 into microsoft:main Jul 20, 2023
@SharonHart SharonHart deleted the patch-2 branch July 21, 2023 13:27
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.

2 participants