Scala lint failing unexpectedly

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Scala lint failing unexpectedly

Shmuel Blitz
Hi,

These are my first steps in building and testing Spark locally.

After successfully building Spark locally, I ran `./build/run-tests`, which starts by running the linters.

The Scala lint fails with:
Scalastyle checks failed at following occurrences:
```
[error] /usr/dev/spark/core/src/main/scala/org/apache/spark/deploy/rest/RestSubmissionClient.scala:269:34:
[error]       Are you sure that you want to use Await.result? In most cases, you should use ThreadUtils.awaitResult instead.
[error]       If you must use Await.result, wrap the code block with
[error]       // scalastyle:off awaitresult
[error]       Await.result(...)
[error]       // scalastyle:on awaitresult
[error]
[error] Total time: 41 s, completed Nov 21, 2018 1:46:48 PM
[error] running /usr/dev/spark/dev/lint-scala ; received return code 1
```

But if I look at RestSubmissionClient.scala, at line 269, there is no Await.result there.

Is the lint reliable?
If so, what am I missing?
It it's not reliable, what is the easiest way to overcome this failure when running the test?


Thanks,
Shmuel
-- 
Shmuel Blitz
Data Analysis Team Leader
Email: [hidden email]
www.similarweb.com
Reply | Threaded
Open this post in threaded view
|

Re: Scala lint failing unexpectedly

Sean Owen-2
I don't see any of the CI builds failing like this. There's an Await.result in the file, but it's suppressed already, and I don't see it at line 269. I don't see an issue like this in recent branches either.

You're sure you are working off, say, master, and/or you're looking at the code that it's looking at?

On Wed, Nov 21, 2018 at 2:12 PM Shmuel Blitz <[hidden email]> wrote:
Hi,

These are my first steps in building and testing Spark locally.

After successfully building Spark locally, I ran `./build/run-tests`, which starts by running the linters.

The Scala lint fails with:
Scalastyle checks failed at following occurrences:
```
[error] /usr/dev/spark/core/src/main/scala/org/apache/spark/deploy/rest/RestSubmissionClient.scala:269:34:
[error]       Are you sure that you want to use Await.result? In most cases, you should use ThreadUtils.awaitResult instead.
[error]       If you must use Await.result, wrap the code block with
[error]       // scalastyle:off awaitresult
[error]       Await.result(...)
[error]       // scalastyle:on awaitresult
[error]
[error] Total time: 41 s, completed Nov 21, 2018 1:46:48 PM
[error] running /usr/dev/spark/dev/lint-scala ; received return code 1
```

But if I look at RestSubmissionClient.scala, at line 269, there is no Await.result there.

Is the lint reliable?
If so, what am I missing?
It it's not reliable, what is the easiest way to overcome this failure when running the test?


Thanks,
Shmuel
-- 
Shmuel Blitz
Data Analysis Team Leader
Email: [hidden email]
www.similarweb.com
Reply | Threaded
Open this post in threaded view
|

Re: Scala lint failing unexpectedly

Shmuel Blitz
Hi Sean. Thanks for the very fast response.

Absolutely.

I'm on master, and I couldn't find any Await on line 269 either.
That's what's so weird.

Shmuel

On Wed, Nov 21, 2018 at 10:21 PM Sean Owen <[hidden email]> wrote:
I don't see any of the CI builds failing like this. There's an Await.result in the file, but it's suppressed already, and I don't see it at line 269. I don't see an issue like this in recent branches either.

You're sure you are working off, say, master, and/or you're looking at the code that it's looking at?

On Wed, Nov 21, 2018 at 2:12 PM Shmuel Blitz <[hidden email]> wrote:
Hi,

These are my first steps in building and testing Spark locally.

After successfully building Spark locally, I ran `./build/run-tests`, which starts by running the linters.

The Scala lint fails with:
Scalastyle checks failed at following occurrences:
```
[error] /usr/dev/spark/core/src/main/scala/org/apache/spark/deploy/rest/RestSubmissionClient.scala:269:34:
[error]       Are you sure that you want to use Await.result? In most cases, you should use ThreadUtils.awaitResult instead.
[error]       If you must use Await.result, wrap the code block with
[error]       // scalastyle:off awaitresult
[error]       Await.result(...)
[error]       // scalastyle:on awaitresult
[error]
[error] Total time: 41 s, completed Nov 21, 2018 1:46:48 PM
[error] running /usr/dev/spark/dev/lint-scala ; received return code 1
```

But if I look at RestSubmissionClient.scala, at line 269, there is no Await.result there.

Is the lint reliable?
If so, what am I missing?
It it's not reliable, what is the easiest way to overcome this failure when running the test?


Thanks,
Shmuel
-- 
Shmuel Blitz
Data Analysis Team Leader
Email: [hidden email]
www.similarweb.com


--
Shmuel Blitz
Data Analysis Team Leader
Email: [hidden email]
www.similarweb.com