Skip to content

Add findInPath method to locate all matching executables in the system path - #609

Merged
thboop merged 1 commit into
actions:mainfrom
smorimoto:io-findinpath
Apr 2, 2021
Merged

Add findInPath method to locate all matching executables in the system path#609
thboop merged 1 commit into
actions:mainfrom
smorimoto:io-findinpath

Conversation

@smorimoto

@smorimotosmorimoto commented Oct 19, 2020

Copy link
Copy Markdown
Contributor

David is the original author. This PR is mainly for #610.

@smorimoto

Copy link
Copy Markdown
ContributorAuthor

Could you check this? @ericsciple@bryanmacfarlane

@smorimoto

Copy link
Copy Markdown
ContributorAuthor

CC: @konradpabjan@damccorm

@smorimoto

Copy link
Copy Markdown
ContributorAuthor

We won't be able to work on fixing a lot of cache-related issues until we've done this.

@smorimoto

Copy link
Copy Markdown
ContributorAuthor

@joshmgross Hi Josh. Sorry to keep pinging you all, but this is one of the steps needed to speed up actions/cache and avoid some bugs. Could you check it?

@smorimoto

Copy link
Copy Markdown
ContributorAuthor

ping

@smorimoto
smorimoto requested a review from a team as a code ownerJanuary 27, 2021 07:05
@smorimoto
smorimotoforce-pushed the io-findinpath branch 2 times, most recently from 9468eb1 to 9db7742CompareJanuary 27, 2021 07:06
@smorimoto

Copy link
Copy Markdown
ContributorAuthor

@dhadka as well as #698

@Be-ing

Copy link
Copy Markdown

ping

@smorimoto

Copy link
Copy Markdown
ContributorAuthor

@joshmgross@dhadka When using cache action on Windows with the Cygwin environment, we have to merge the PR that requires this change, and the delay in reviewing this is literally blocking all those tasks.

@Be-ing

Copy link
Copy Markdown

ping! Please prioritize whatever it takes to use zstd reliably on Windows. Decompressing a 1 GB cache on Windows takes 5 minutes per job!

@smorimoto

Copy link
Copy Markdown
ContributorAuthor

@dhadka Can you assign a person about this? Other team members seem to have no interest in working on this topic.

@dhadkadhadka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks fine to me.

@dhadka
dhadka requested a review from konradpabjanMarch 9, 2021 16:21
@dhadka

Copy link
Copy Markdown
Contributor

@actions/actions-runtime Can we please get a review on this PR?

@konradpabjankonradpabjan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes look good.

If you could add some tests though that would be great! Good to have for future maintenance. We have some existing ones here: https://github.com/actions/toolkit/blob/main/packages/io/__tests__/io.test.ts

@smorimoto
smorimotoforce-pushed the io-findinpath branch 2 times, most recently from 0364793 to aa6bdefCompareMarch 10, 2021 16:01
@smorimoto

Copy link
Copy Markdown
ContributorAuthor

@konradpabjan I just added the simplest test.

@smorimoto
smorimoto requested a review from a teamMarch 10, 2021 16:16
@smorimoto
smorimotoforce-pushed the io-findinpath branch 2 times, most recently from e1b358a to aa6bdefCompareMarch 10, 2021 16:39
@smorimoto

Copy link
Copy Markdown
ContributorAuthor

There are a lot of irrelevant changes after I changed what I was concerned, so I will do them in another PR. Anyway, this PR is ready to merge.

@dhadka

Copy link
Copy Markdown
Contributor

Thanks! @konradpabjan can you please give this another look and a ✔️ for actions-service if OK? findInPath is used by io.which so it should have good test coverage in addition to the test @smorimoto added.

@smorimoto

Copy link
Copy Markdown
ContributorAuthor

Actually, the coverage isn't as bad as we thought.

------------|---------|----------|---------|---------|----------------------------------------------------------------------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------|---------|----------|---------|---------|----------------------------------------------------------------------------------
All files | 74.02 | 65.96 | 94.12 | 75.63 |
io-util.ts | 64.2 | 53.85 | 87.5 | 64.1 | 29,50,54,125,133-135,147,149-151,153,155,161,162,164-170,175,180,182,183,196,199
io.ts | 80.49 | 73.03 | 100 | 83.19 | 54,69,98,117-119,121,126,130,131,135,182,204,215,221-223,323,327,328
------------|---------|----------|---------|---------|----------------------------------------------------------------------------------

@smorimoto

smorimoto commented Mar 10, 2021

Copy link
Copy Markdown
ContributorAuthor

@dhadka As for actions-service, the review request is made because of the unrelated commit (I already excluded them), so we can ignore it.

@konradpabjankonradpabjan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me! Thanks for adding some tests. Going to ask one more person for a quick 👀 (runtime team) though before merging this in and publishing

@smorimoto

Copy link
Copy Markdown
ContributorAuthor

Thanks again 🙂

@thboopthboop left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Left some minor comments but lets get a new version of this out once they have been addressed!

Comment threadpackages/io/src/io.ts
Comment threadpackages/io/src/io.ts Outdated
Comment threadpackages/io/src/io.ts
…m path
Signed-off-by: Sora Morimoto <sora@morimoto.io>
@smorimoto

Copy link
Copy Markdown
ContributorAuthor

@thboop now all points have been fixed!

@smorimoto

Copy link
Copy Markdown
ContributorAuthor

Please let me know if there is anything else I can do to finish.

@smorimoto

Copy link
Copy Markdown
ContributorAuthor

ping @dhadka@thboop

@dhadka

Copy link
Copy Markdown
Contributor

Changes LGTM, ready to 🚀 once @thboop gives the 👍

@smorimoto

Copy link
Copy Markdown
ContributorAuthor

ping @thboop

@smorimoto

Copy link
Copy Markdown
ContributorAuthor

Hi? @thboop

@thboop

Copy link
Copy Markdown
Collaborator

Hey @smorimoto ,

I'll take a look at this next week and see if we can get a new release out. We typically have longer turnaround times for new features in open source repositories, as any feature requires further maintenance and support in the long term by our team. I'll be updating the repo with some templates to set better guidance for contributors in the future, I'm sorry for the churn this has caused you.

@smorimoto

Copy link
Copy Markdown
ContributorAuthor

Thanks. I can understand the reason itself, but to be honest I'm quite skeptical about the fact that it would be a reasonable reason for hardly do a review for 6 months. And that seems to conflict with the reason why we do versioning in software in general. In any case, I hope we can make a "fix" (not an improvement!) for actions/cache as soon as possible.

@Be-ing

Copy link
Copy Markdown

I also think you should reconsider your processes if it takes 6 months to review a rather small pull request.

@smorimotosmorimoto mentioned this pull request Mar 28, 2021
4 tasks
@smorimoto

Copy link
Copy Markdown
ContributorAuthor

I'm glad I'm not the only one who feels that. In fact, the most PRs sent to the Actions repositories are well-known to require 100 pings to move the review process forward. This is a real loss for both GitHub and its users.

@smorimoto

Copy link
Copy Markdown
ContributorAuthor

ping?

@thboopthboop left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Changes Look great LGTM

@thboop
thboop merged commit bd9017e into actions:mainApr 2, 2021
@dhadka

Copy link
Copy Markdown
Contributor

🚀

@dhadka

Copy link
Copy Markdown
Contributor

@konradpabjan Can we please get a new version of this built?

@thboop

Copy link
Copy Markdown
Collaborator

Thanks for the contribution @smorimoto and being patient with the delay, working on a new npm release now 🚀 🚀

@smorimoto

Copy link
Copy Markdown
ContributorAuthor

That was quick.

@smorimoto
smorimoto deleted the io-findinpath branch April 2, 2021 16:33
@thboop

Copy link
Copy Markdown
Collaborator

@actions/io v1.1.0 has been published 🚀 🚀 🚀

Sign up for freeto 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.

5 participants

@smorimoto@Be-ing@dhadka@thboop@konradpabjan