Skip to content

MINOR: Streams system test fixes/updates#4689

Merged
guozhangwang merged 1 commit intoapache:trunkfrom
vvcephei:system-tests
Mar 15, 2018
Merged

MINOR: Streams system test fixes/updates#4689
guozhangwang merged 1 commit intoapache:trunkfrom
vvcephei:system-tests

Conversation

@vvcephei
Copy link
Copy Markdown
Contributor

@vvcephei vvcephei commented Mar 12, 2018

Some changes required to get the Streams system tests working via Docker

To test:

TC_PATHS="tests/kafkatest/tests/streams" bash tests/docker/run_tests.sh

That command will take about 3.5 hours, and should pass. Note there are a couple of ignored tests.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

Comment thread tests/kafkatest/services/streams.py Outdated
Copy link
Copy Markdown
Contributor Author

@vvcephei vvcephei Mar 12, 2018

Choose a reason for hiding this comment

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

So, this wasn't valid python3... It's also the only super invocation in kafkatest that's formatted this way. I'm not sure if it's valid python2.

But it only affects cleanup for the Eos test, and it just generates a warning instead of failing the test. So I can see how this could go unnoticed if the tests are usually run from a clean state instead of cleaning up after themselves.

Comment thread tests/setup.py Outdated
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.

This was not valid python3. Maybe everyone else ran setup.py in python2 and haven't run it again since?

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.

note that it's also valid python2 to use parens here, so I'd advocate for keeping this change.

Comment thread .gitignore Outdated
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.

setup.py generates these directories. I assume we don't want them checked in.

Comment thread tests/docker/Dockerfile Outdated
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.

These test deps were missing. I guess no one has had to run the upgrade/downgrade test in docker. (Jenkins still uses Vagrant)

@vvcephei vvcephei changed the title WIP: MINOR: System tests MINOR: System tests Mar 12, 2018
@mjsax
Copy link
Copy Markdown
Member

mjsax commented Mar 12, 2018

@vvcephei Can you trigger the branch builder to see if this changes work there? Thx.

Comment thread tests/docker/Dockerfile Outdated
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.

I think the chmod is done in vagrant/base.sh?

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.

yeah, it is. That's what I found that ultimately tipped me off to what was wrong with the docker code. (it starts at line 104 there)

@vvcephei vvcephei changed the title MINOR: System tests WIP (do not merge): Streams system test updates Mar 13, 2018
Comment thread tests/kafkatest/services/streams.py Outdated
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.

Having this in the output reduced my debug cycle time a lot. I've stripped out all my other debugging output. What do you think about leaving this in?

Comment thread tests/kafkatest/services/streams.py Outdated
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.

I got a lot of value out of having this in the output. What do you think about leaving this in?

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.

+1 from me

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.

+1.

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.

Note: I had to drop 0.10.1 because StreamsSmokeTest had a different package name in that version (was: org.apache.kafka.streams.smoketest.StreamsSmokeTest.

I can put it back in, but it would require a conditional in the streams.py::StreamsSmokeTestBaseService. Or we can leave it out.

Thoughts?

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.

I would say leave it out, I believe the change from 0.10.1 to a higher version requires a full stop and can't be done from a rolling restart.

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.

Actually from 0.10.0 to 0.10.1 requires a full stop, from 0.10.1 to newer version does not. But I think it is still fine to leave it out.

@vvcephei
Copy link
Copy Markdown
Contributor Author

The most substantial change here is the switch from @parameterize to @matrix to ensure we cover every combination of versions.

Downside: this increases the test run time by at least 1 hour!

We can:

  • accept that
  • prune the matrix (select just a handful of scenarios like before)
  • fork multiple jenkins builds of different parts of that matrix to run them in parallel

Thoughts?

@vvcephei
Copy link
Copy Markdown
Contributor Author

@guozhangwang @bbejeck @mjsax Please take another look at this. It passes on my machine (using docker). I'm running an all-streams jenkins test to make sure it still passes using vagrant and also to measure the new run time.

@vvcephei vvcephei changed the title WIP (do not merge): Streams system test updates MINOR: Streams system test fixes/updates Mar 13, 2018
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.

I think you can do the zookeeper start in the setUp method

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.

hm. actually, there isn't a setUp method... Are you suggesting I make one?

FWIW, I think it's actually fine like this. The test is linearly readable this way.

Copy link
Copy Markdown
Member

@bbejeck bbejeck Mar 14, 2018

Choose a reason for hiding this comment

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

There's a setUp method on the Test class that we can override. It's fine like it is, but most of the other tests do ZK start-up in the setUp method, so I was aiming for consistency.

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.

aha, I gotcha. sure, I can do that.

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.

+1

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.

Ok, I'm glad that I know what you were talking about now. I actually think in this case, it's a little better as is, since we want to start the broker with different versions during the test.

We could still do it, but then we'd have to stop the broker and upgrade it and restart it during the test, or only start zk in startUp and start the broker during the tests... I think in this case, it's a more complicated control flow in the tests in exchange for diminishing returns.

I can totally get it for tests that just need zk and kafka running and don't care about the version, but in this case, I think I like it better flat.

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.

same as above

Copy link
Copy Markdown
Contributor

@guozhangwang guozhangwang left a comment

Choose a reason for hiding this comment

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

Just a note that @bbejeck is working on https://github.com/apache/kafka/pull/4690/files which may have some overlap on the class files, some we would need some rebasing either one way or the other.

Comment thread tests/kafkatest/services/streams.py Outdated
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.

+1.

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.

Actually from 0.10.0 to 0.10.1 requires a full stop, from 0.10.1 to newer version does not. But I think it is still fine to leave it out.

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.

Remove LATEST_0_10_1 as you mentioned below?

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.

+1

@vvcephei
Copy link
Copy Markdown
Contributor Author

@guozhangwang Thanks. Yeah, I'm prepared to rebase on #4690 once it's merged.

I'm running a full streams system test again now, just to be double-sure that it passes before recommending a merge.

* add 1.0.0 and 1.0.1

Closes #4689
@vvcephei
Copy link
Copy Markdown
Contributor Author

I've just added 1.0.1, since it's in the mirror now.
I also rebased onto trunk.
I'm running the sys tests once more to be sure they work with 1.0.1, but otherwise, this will be ready to merge.

@vvcephei
Copy link
Copy Markdown
Contributor Author

Alright, @mjsax @guozhangwang, I think this thing is ready to merge. I re-ran the streams system tests (both locally:docker and in jenkins:vagrant), and they actually all passed this time!

Copy link
Copy Markdown
Contributor

@guozhangwang guozhangwang left a comment

Choose a reason for hiding this comment

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

LGTM!

@guozhangwang guozhangwang merged commit 7006d0f into apache:trunk Mar 15, 2018
@vvcephei vvcephei deleted the system-tests branch March 15, 2018 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants