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

cluster: remove legacy version upgrade tests for auto upgrade merge #25184

Merged
merged 1 commit into from May 14, 2018

Conversation

windchan7
Copy link
Contributor

Legacy tests such as TestClusterVersionUpgrade1_0To2_0,
TestDockerReadWriteBidirectionalReferenceVersion, and
TestDockerReadWriteForwardReferenceVersion no longer applies.

Therefore, we remove and they will be replaced with new roachtests
when the auto upgrade PR #24987 merges.

Release note: None

@windchan7 windchan7 requested a review from benesch April 30, 2018 20:15
@windchan7 windchan7 requested a review from a team as a code owner April 30, 2018 20:15
@windchan7 windchan7 requested a review from a team April 30, 2018 20:15
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@benesch
Copy link
Contributor

benesch commented Apr 30, 2018

:lgtm: but hold off on merging until we get someone else to buy in that these are no longer useful.

I think the TestDockerReadWrite...ReferenceVersion tests are already obsoleted by the already-existing version roachtest. (Your PR, #24987, enhances the roachtest version coverage but is not strictly necessary to justify removing these tests.) The one argument for keeping them is that they run on every PR while roachtests only run nightly, but they sure require a lot of duplicated effort and haven't caught a bug in quite a long time.

The obvious choices are @bdarnell and @tschottdorf, but they're both OOO. Perhaps @nvanbenschoten or @petermattis feels comfortable LGTM'ing in their absence?


Reviewed 2 of 2 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@tbg
Copy link
Member

tbg commented May 2, 2018

I'm fine (happy, actually) removing the docker reference tests, these haven't caught anything in a long time and I've wanted to kill them for a while (#18960).

What is the rationale for removing the unit tests? Yes, the same functionality is exercised by roachtest, but there's value in having a basic sanity check that the upgrade mechanism works (and one that can be stress tested). My suggestion here is to remove all the stuff about Raft tombstones and to populate the versions slice automatically (assuming that the binary version is 3.3-6, it would upgrade from 3.3 to 4.0). That way, the test won't rot in the future and can be used to test specific migrations that are currently being introduced.

If the auto-upgrade mechanism somehow makes this test unfeasible, we should massage it slightly so that it becomes feasible. I'd be curious to see if there are any problems. (The test should definitely still run quickly, we don't want longer waiting periods here).


Review status: all files reviewed at latest revision, all discussions resolved.


pkg/server/version_cluster_test.go, line 146 at r1 (raw file):

	}

	// We will put down fake legacy tombstones (#12154) to jog

I love how you can just delete migration-related tests when the migration isn't "current" any more.


Comments from Reviewable

@bdarnell
Copy link
Member

bdarnell commented May 2, 2018

I agree with @tschottdorf that removing the acceptance test is fine but it would be nice to keep the unit test.

When this is gone, we can also remove the old binaries from the docker image:

https://github.com/cockroachdb/postgres-test/blob/b1347c055696856624c1a62aeffd0fd3b066695a/Dockerfile#L99-L107

@windchan7
Copy link
Contributor Author

@tschottdorf Hey Tobi, I understand your idea to make the test not rot in the future. But do you mind clarifying what you mean by populating the versions slice automatically?

Legacy tests such as `TestDockerReadWriteBidirectionalReferenceVersion`, and
`TestDockerReadWriteForwardReferenceVersion` no longer applies. Therefore, we
remove these two tests.

In addition, test `TestClusterVersionUpgrade1_0To2_0` is outdated as well.
In the auto upgrade PR cockroachdb#24987, it is updated.

Release note: None
@windchan7
Copy link
Contributor Author

@tschottdorf , want to LGTM this test removal?

Copy link
Member

@tbg tbg left a comment

Choose a reason for hiding this comment

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

LGTM 🔥

@windchan7
Copy link
Contributor Author

bors r+

craig bot pushed a commit that referenced this pull request May 14, 2018
25184: cluster: remove legacy version upgrade tests for auto upgrade merge r=windchan7 a=windchan7

Legacy tests such as `TestClusterVersionUpgrade1_0To2_0`,
`TestDockerReadWriteBidirectionalReferenceVersion`, and
`TestDockerReadWriteForwardReferenceVersion` no longer applies.

Therefore, we remove and they will be replaced with new roachtests
when the auto upgrade PR #24987 merges.

Release note: None

25473: opt/optbuilder: Fix bug with order by, aggregate alias, and having. r=rytaft a=rytaft

Previously, queries such as:
`SELECT SUM(a) AS a2 FROM abcd GROUP BY c HAVING SUM(a)=10
ORDER BY a2`

were incorrectly causing an error:
`error: column name "a2" not found`

This commit fixes the error by ensuring that a column alias for an
aggregate function is applied even when the same aggregate appears
multiple times in the same query (e.g., in the HAVING clause).

Release note: None

Co-authored-by: Victor Chen <victor@cockroachlabs.com>
Co-authored-by: Rebecca Taft <becca@cockroachlabs.com>
@craig
Copy link
Contributor

craig bot commented May 14, 2018

Build succeeded

@craig craig bot merged commit 05290b9 into cockroachdb:master May 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants