Skip to content

murdock: don't run static tests#13339

Closed
benpicco wants to merge 2 commits intoRIOT-OS:masterfrom
benpicco:murdock-no-static-tests
Closed

murdock: don't run static tests#13339
benpicco wants to merge 2 commits intoRIOT-OS:masterfrom
benpicco:murdock-no-static-tests

Conversation

@benpicco
Copy link
Copy Markdown
Contributor

Contribution description

Static Tests are already executed by Travis.
Failing Travis will already block the merge, so we don't have to run those tests in Murdock again.

This has two benefits:

  • slightly decreased CI build times
  • Murdock failures will only be caused by build errors.

The last point is my main motivation for this patch.
It often happens that Murdock failures are dismissed during review if a PR is not squashed yet.
Even if there are still build failures, they are not visible at a glance.

Travis will already fail when the PR is not yet squashed, so Murdock doesn't have to check this again and can now only warn about serious issues.

Testing procedure

  • Murdock should not fail if there is a !fixup commit.
  • Travis should fail if there is a !fixup commit.

Issues/PRs references

none

static tests are already executed by Travis.
Failing Travis will already block the merge, so we don't have to run
those tests in Murdock again.

This has two benefits:

 - slightly decreased CI build times
 - Murdock failures will only be caused by build errors.

The last point is my main motivation for this patch.
It often happens that Murdock failures are dismissed during review if
a PR is not squashed yet.
Even if there are still build failures, they are not visible at a glance.

Travis will already fail when the PR is not yet squashed, so Murdock doesn't
have to check this again and can now only warn about serious issues.
@benpicco benpicco added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Discussion: RFC The issue/PR is used as a discussion starting point about the item of the issue/PR CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: CI Area: Continuous Integration of RIOT components labels Feb 11, 2020
@benpicco benpicco requested review from kaspar030 and miri64 February 11, 2020 11:59
@benpicco benpicco requested a review from smlng February 11, 2020 12:03
@aabadie
Copy link
Copy Markdown
Contributor

aabadie commented Feb 11, 2020

Failing Travis will already block the merge

Not really, Travis is not required to be green in the project configuration but that can be changed.

+1 for this PR.

@miri64 miri64 added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Feb 11, 2020
fi

BUILDTEST_MCU_GROUP=static-tests ./dist/tools/ci/build_and_test.sh
# Travis will already run static tests
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not remove the whole function static_tests() altogether?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

BTW... I think this skips the rebase step included in the static tests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It seems like the function also takes care of cloning the repo.
TBH I'm not very familiar with the inner workings of Murdock, so my bet was to invoke Cunningham's Law on this one.

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.

It seems like the function also takes care of cloning the repo.

Not entirely. The static tests script (./dist/tools/ci/build_and_test.sh) tests if the current branch can be rebased on master. It does so by rebaseing on upstream/master.
"static_tests()" just ensures that there's an upstream and it is correctly fetched.

@kaspar030
Copy link
Copy Markdown
Contributor

It often happens that Murdock failures are dismissed during review if a PR is not squashed yet.
Even if there are still build failures, they are not visible at a glance.

How do you mean? Murdock build failures are visible in the last PR build result. Or do you mean possible warnings in the static test?

@kaspar030
Copy link
Copy Markdown
Contributor

This also skips the static tests in nightlies.

I don't like it, I prefer a single source of authority.

@benpicco
Copy link
Copy Markdown
Contributor Author

How do you mean? Murdock build failures are visible in the last PR build result. Or do you mean possible warnings in the static test?

If the PR contains !fixup commits, Murdock failure is to be expected, so often a Murdock failure is ignored even though it was caused by a build failure.
That just means the PR needs to go another round unnecessarily, because the failure could have been caught much earlier.

@miri64
Copy link
Copy Markdown
Member

miri64 commented Feb 11, 2020

If the PR contains !fixup commits, Murdock failure is to be expected, so often a Murdock failure is ignored even though it was caused by a build failure.
That just means the PR needs to go another round unnecessarily, because the failure could have been caught much earlier.

Isn't that basically more of a graphic design issue? We could just make the compile errors more prominent (and not put them to the very end of output.html).

@benpicco
Copy link
Copy Markdown
Contributor Author

Isn't that basically more of a graphic design issue?

Sure!

We could just make the compile errors more prominent (and not put them to the very end of output.html).

I'm talking about this interface:

Download

If you expect the Murdock failure to be just because of !fixups, you don't click the link to get more details.

Another option would be to make Murdock reply to the PR directly.
That would also help new users who don't know about Murdock yet, but I don't know how to implement that.

@kaspar030
Copy link
Copy Markdown
Contributor

If you expect the Murdock failure to be just because of !fixups, you don't click the link to get more details.

I've been thinking of adding more fine grained PR statuses. I was mostly concerned with warnings, which are currently easily ignored.

This needs some setup, but we could add anything here.

@miri64
Copy link
Copy Markdown
Member

miri64 commented Feb 11, 2020

If you expect the Murdock failure to be just because of !fixups, you don't click the link to get more details.

Ok, but if you don't even look at the results and expect everything to be perfect then its a PEBCAK.

Another option would be to make Murdock reply to the PR directly.
That would also help new users who don't know about Murdock yet, but I don't know how to implement that.

It kind of does already in the status. If the build fails it says "the build failed", if only the static tests fail it says "static tests failed" IIRC.

Copy link
Copy Markdown
Contributor

@kaspar030 kaspar030 left a comment

Choose a reason for hiding this comment

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

(blocking)

@miri64 miri64 mentioned this pull request Jul 6, 2020
@benpicco benpicco added the State: stale State: The issue / PR has no activity for >185 days label Aug 7, 2020
@stale stale bot closed this Sep 7, 2020
@benpicco benpicco deleted the murdock-no-static-tests branch September 7, 2020 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: CI Area: Continuous Integration of RIOT components CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Discussion: RFC The issue/PR is used as a discussion starting point about the item of the issue/PR State: stale State: The issue / PR has no activity for >185 days Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants