Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Upgrade cruft & fix a bunch of flaky tests #2124

Merged
merged 11 commits into from
Mar 18, 2021
Merged

Conversation

carver
Copy link
Contributor

@carver carver commented Mar 17, 2021

What was wrong?

Some things aren't building

How was it fixed?

Upgrade them to the latest. Probably just a code rot issue...

To-Do

  • Clean up commit history

Cute Animal Picture

put a cute animal picture link inside the parentheses

@carver

This comment has been minimized.

carver added a commit to carver/trinity that referenced this pull request Mar 17, 2021
@carver
Copy link
Contributor Author

carver commented Mar 17, 2021

Oof this is ugly. For some reason connecting to the geth bootnodes crashes us right now 🙈 I suspect it's a whole eth/66 rabbit-hole. Well, it's at least two distinct problems:

  1. a node dropping us during connect shouldn't flood the screen with warnings
  2. we need to support the newer devp2p eth protocol

@carver
Copy link
Contributor Author

carver commented Mar 17, 2021

More bad news: flaky tests in py37-long_run_integration and py37-rpc-state-istanbul. Maybe we need to drop the concurrency on the rpc test? There was a worker crash which I think usually means out-of-memory error.

Also:
- upgrade go version to v1.13 for geth build
- uses --ropsten instead of --testnet in tests
They seem to crash us, maybe because eth/66 is unsupported.

See the simplest `trinity` run on this test:
tests/integration/test_trinity_cli.py:test_does_not_throw_errors_on_short_run
carver added a commit to carver/trinity that referenced this pull request Mar 17, 2021
carver added a commit to carver/trinity that referenced this pull request Mar 17, 2021
The py37-rpc-state-istanbul test is kind of flaky, with unclear cause
(one of the worker threads just dies). Maybe it's a memory thing, or an
old version of xdist thing?

- Upgrade pytest-xdist to v1.34.0
- Reduce the number of worker threads from 3 to 2
The test was so short that a pretty small perturbation (>1ms) would cause
a false failure. Now it needs at least a 5ms extrinsic delay to get a
false failure.
Not convinced this really fixed it, but I think it gives extra time for
the logs to make it to the handler. Ideally, the server shouldn't shut
down until all the logs are passed on, but I couldn't confirm that with
a quick scan.

test_queued_logging failed once at:

        with queue_listener.run(ipc_path):
            assert len(handler.logs) == 0
            proc.start()
            proc.join()
>           assert len(handler.logs) == 3
E           assert 0 == 3
E            +  where 0 = len([])
E            +    where [] = <HandlerForTest (DEBUG)>.logs
Sometimes they seem to just cause a forever-hang. See:
postlund/pyatv#904

This might make an uglier result when a timeout actually happens, but
it's way better to have fewer false failure CI runs.

Note that you can't put --forked into pytest.ini's addopts because we
don't always have pytest-xdist installed (like in the wheel tests).
@carver carver changed the title Upgrade cruft Upgrade cruft - fix a bunch of flaky tests Mar 18, 2021
@carver carver changed the title Upgrade cruft - fix a bunch of flaky tests Upgrade cruft & fix a bunch of flaky tests Mar 18, 2021
@carver
Copy link
Contributor Author

carver commented Mar 18, 2021

Trinity development is on-pause, at best. So yolo-merge it is...

@carver carver merged commit 468da26 into ethereum:master Mar 18, 2021
@carver carver deleted the upgrade-cruft branch March 18, 2021 19:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant