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

thboop merged 1 commit into
actions:mainfrom
smorimoto:io-findinpath

Conversation

@smorimoto

@smorimoto smorimoto 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
Contributor Author

Could you check this? @ericsciple @bryanmacfarlane

@smorimoto

Copy link
Copy Markdown
Contributor Author

CC: @konradpabjan @damccorm

@smorimoto

Copy link
Copy Markdown
Contributor Author

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
Contributor Author

@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
Contributor Author

ping

@smorimoto
smorimoto requested a review from a team as a code owner January 27, 2021 07:05
@smorimoto
smorimoto force-pushed the io-findinpath branch 2 times, most recently from 9468eb1 to 9db7742 Compare January 27, 2021 07:06
@smorimoto

Copy link
Copy Markdown
Contributor Author

@dhadka as well as #698

@Be-ing

Be-ing commented Feb 7, 2021

Copy link
Copy Markdown

ping

@smorimoto

Copy link
Copy Markdown
Contributor Author

@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

Be-ing commented Feb 25, 2021

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
Contributor Author

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

@dhadka dhadka 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 konradpabjan March 9, 2021 16:21
@dhadka

dhadka commented Mar 9, 2021

Copy link
Copy Markdown
Contributor

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

@konradpabjan konradpabjan 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
smorimoto force-pushed the io-findinpath branch 2 times, most recently from 0364793 to aa6bdef Compare March 10, 2021 16:01
@smorimoto

Copy link
Copy Markdown
Contributor Author

@konradpabjan I just added the simplest test.

@smorimoto
smorimoto requested a review from a team March 10, 2021 16:16
@smorimoto
smorimoto force-pushed the io-findinpath branch 2 times, most recently from e1b358a to aa6bdef Compare March 10, 2021 16:39
@smorimoto

Copy link
Copy Markdown
Contributor Author

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

dhadka commented Mar 10, 2021

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
Contributor Author

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
Contributor Author

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

@konradpabjan konradpabjan 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
Contributor Author

Thanks again 🙂

@thboop thboop 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 thread packages/io/src/io.ts Resolved
Comment thread packages/io/src/io.ts Resolved
Comment thread packages/io/src/io.ts Resolved
@smorimoto

Copy link
Copy Markdown
Contributor Author

@thboop now all points have been fixed!

@smorimoto

Copy link
Copy Markdown
Contributor Author

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

@smorimoto

Copy link
Copy Markdown
Contributor Author

ping @dhadka @thboop

@dhadka

dhadka commented Mar 20, 2021

Copy link
Copy Markdown
Contributor

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

@smorimoto

Copy link
Copy Markdown
Contributor Author

ping @thboop

@smorimoto

Copy link
Copy Markdown
Contributor Author

Hi? @thboop

@thboop

thboop commented Mar 24, 2021

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
Contributor Author

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

Be-ing commented Mar 25, 2021

Copy link
Copy Markdown

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

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

Copy link
Copy Markdown
Contributor Author

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
Contributor Author

ping?

@thboop thboop 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:main Apr 2, 2021
@dhadka

dhadka commented Apr 2, 2021

Copy link
Copy Markdown
Contributor

🚀

@dhadka

dhadka commented Apr 2, 2021

Copy link
Copy Markdown
Contributor

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

@thboop

thboop commented Apr 2, 2021

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
Contributor Author

That was quick.

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

thboop commented Apr 2, 2021

Copy link
Copy Markdown
Collaborator

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

Derrick-MUGISHA pushed a commit to Derrick-MUGISHA/toolkit that referenced this pull request Oct 12, 2026
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.

5 participants