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

Running bots without zstd leaves lock dirs behind #316

Open
AlexDaniel opened this issue May 19, 2018 · 5 comments
Open

Running bots without zstd leaves lock dirs behind #316

AlexDaniel opened this issue May 19, 2018 · 5 comments
Labels
good first issue Low-hanging fruit (relatively easy issue, good for drive-by contributions) hacktoberfest whateverable Issues affecting the bot framework (and therefore all of the bots)

Comments

@AlexDaniel
Copy link
Member

AlexDaniel commented May 19, 2018

@sylints++ for the finding.

Here's some explanation:
https://github.com/perl6/whateverable/blob/031cf5de521ba1002ab7379bedc6b432213de194/lib/Whateverable.pm6#L393-L416

<AlexDaniel> so first it runs this: run(:err(Nil), ‘mkdir’, ‘--’, $build-path).exitcode ≠ 0 {
<AlexDaniel> which pre-creates the lock dir
<AlexDaniel> and then it calls die if zstd is not there
<AlexDaniel> and as a result, rmtree $build-path; is never called!

@AlexDaniel AlexDaniel added whateverable Issues affecting the bot framework (and therefore all of the bots) good first issue Low-hanging fruit (relatively easy issue, good for drive-by contributions) labels May 19, 2018
@JJ
Copy link
Contributor

JJ commented Jun 2, 2018

I changed the detection of ZSTD to the beginning of the file, and I'm getting this error now:

# Failed to get expected result in 11.09198240 seconds (11 nominal)
not ok 56 - Search using the code block
# Failed test 'Search using the code block'
# at /home/jmerelo/Code/forks/perl6/whateverable/t/lib/Testable.pm6 (Testable) line 85
# expected: ["testable430956, U+1F98B BUTTERFLY [So] (🦋)"]
#  matcher: 'infix:<~~>'
#      got: []
# Test failed. Stopping test suite, because PERL6_TEST_DIE_ON_FAIL environmental variable is set to a true value.
# Bot process finished (exit code=0, signal=1)

I got that error before, when zstd was not installed... So I don't really know if that's the thing. Maybe an independent test somewhere else?

JJ added a commit to JJ/whateverable that referenced this issue Jun 2, 2018
@AlexDaniel
Copy link
Member Author

AlexDaniel commented Jun 2, 2018

FWIW I'm against early detection. Some bots (e.g. Notable) don't need zstd at all, and unicodable does not need it in most cases. Maybe one way to do it is to write a helper sub somewhere here, and call it from all bots that need zstd. Note that another dependency is lrzip, and some bots also don't need it (e.g. Evalable needs zstd but not lrzip, same for Unicodable, but Committable and Bisectable also need lrzip).

@JJ
Copy link
Contributor

JJ commented Jun 3, 2018 via email

@JJ
Copy link
Contributor

JJ commented Jun 3, 2018

Testable is probably not a good place, since it's, well, only in the test directory.

@AlexDaniel
Copy link
Member Author

Testable is probably not a good place, since it's, well, only in the test directory.

So? Meaning that if you run tests, you'll get an error relatively early. If you run something like sake debug:evalable, then the bot will respond with a stack trace and everything when it attempts to use zstd, which is good enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Low-hanging fruit (relatively easy issue, good for drive-by contributions) hacktoberfest whateverable Issues affecting the bot framework (and therefore all of the bots)
Projects
None yet
Development

No branches or pull requests

2 participants