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

roachprod: remove support for spinning up cassandra clusters #64029

Merged
merged 1 commit into from
May 26, 2021

Conversation

alan-mas
Copy link
Contributor

@alan-mas alan-mas commented Apr 21, 2021

When working on #47567, we discovered that the cassandra cluster support is no longer used and can be removed. This commit removes cassandra cluster support.

Release note: None

@alan-mas alan-mas added the do-not-merge bors won't merge a PR with this label. label Apr 21, 2021
@alan-mas alan-mas requested a review from jlinder April 21, 2021 23:22
@blathers-crl
Copy link

blathers-crl bot commented Apr 21, 2021

Thank you for contributing to CockroachDB. Please ensure you have followed the guidelines for creating a PR.

My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

@blathers-crl blathers-crl bot added the O-community Originated from the community label Apr 21, 2021
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@alan-mas alan-mas removed the request for review from jlinder April 21, 2021 23:22
@alan-mas alan-mas force-pushed the cassandra-refactor branch from 6db1de2 to f16d6c2 Compare April 22, 2021 02:26
@blathers-crl
Copy link

blathers-crl bot commented Apr 22, 2021

Thank you for updating your pull request.

My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI.

I have added a few people who may be able to assist in reviewing:

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

@blathers-crl blathers-crl bot added the X-blathers-triaged blathers was able to find an owner label Apr 22, 2021
@blathers-crl blathers-crl bot requested a review from jlinder April 22, 2021 02:26
Copy link
Collaborator

@petermattis petermattis left a comment

Choose a reason for hiding this comment

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

I think we could safely remove cassandra.go and everything that depends on it. I doubt anyone has used it in a long time.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @jlinder)

@alan-mas alan-mas force-pushed the cassandra-refactor branch from f16d6c2 to 6407ab7 Compare April 23, 2021 16:47
@blathers-crl
Copy link

blathers-crl bot commented Apr 23, 2021

Thank you for updating your pull request.

My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

@alan-mas alan-mas force-pushed the cassandra-refactor branch from 6407ab7 to e775292 Compare April 23, 2021 19:48
Copy link
Collaborator

@jlinder jlinder left a comment

Choose a reason for hiding this comment

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

Suggestion for the commit message (and the PR title + description):

roachprod: remove support for spinning up cassandra clusters

When working on #47567, we discovered that the cassandra cluster support is no longer used and can be removed. This commit removes cassandra cluster support.

Reviewed 5 of 5 files at r1.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @alan-mas)


pkg/cmd/roachprod/main.go, line 173 at r1 (raw file):

			}
		}
	case "cassandra":

With removing cassandra as a cluster type, there is no need for the switch clusterType statement and no need for the clusterType field (defined on about line 90 above).


pkg/testutils/lint/lint_test.go, line 215 at r1 (raw file):

			stream.GrepNot(`cassandra\.go`),
			stream.GrepNot(`cassandra_yaml\.go`),

Why are these lines necessary?


pkg/testutils/lint/lint_test.go, line 1650 at r1 (raw file):

				// TODO (alanmas): Remove this line after refactoring ssh.go
				// as now it is produccing "func is unused" errors.
				stream.GrepNot(`pkg/cmd/roachprod/ssh/ssh.go`),

I'd recommend just removing the functions that are unused from pkg/cmd/roachprod/ssh/ssh.go in this PR.

@alan-mas alan-mas changed the title roachprod: refactor cassandra.go roachprod: remove support for spinning up cassandra clusters May 12, 2021
@alan-mas alan-mas force-pushed the cassandra-refactor branch from e775292 to b4c6262 Compare May 13, 2021 00:53
@alan-mas
Copy link
Contributor Author

alan-mas commented May 13, 2021

pkg/testutils/lint/lint_test.go, line 215 at r1 (raw file):

			stream.GrepNot(`cassandra\.go`),
			stream.GrepNot(`cassandra_yaml\.go`),

Why are these lines necessary?

If I do not add those lines go lint test failed as it goes and checks if the file exists:

=== CONT  TestLint/TestCopyrightHeaders
    lint_test.go:229: open /Users/admin/go/src/github.com/cockroachdb/cockroach/pkg/cmd/roachprod/install/cassandra.go: no such file or directory
    lint_test.go:229: open /Users/admin/go/src/github.com/cockroachdb/cockroach/pkg/cmd/roachprod/install/cassandra_yaml.go: no such file or directory

It might be a better way to avoid this issue that I am missing here. @jlinder

This is also happening with pkg/cmd/roachprod/ssh/ssh.go as we are changing his name to io.go with the refactor.

Copy link
Collaborator

@jlinder jlinder left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @alan-mas and @jlinder)


pkg/testutils/lint/lint_test.go, line 215 at r1 (raw file):

Previously, alan-mas (alanmas) wrote…

If I do not add those lines go lint test failed as it goes and checks if the file exists:

=== CONT  TestLint/TestCopyrightHeaders
    lint_test.go:229: open /Users/admin/go/src/github.com/cockroachdb/cockroach/pkg/cmd/roachprod/install/cassandra.go: no such file or directory
    lint_test.go:229: open /Users/admin/go/src/github.com/cockroachdb/cockroach/pkg/cmd/roachprod/install/cassandra_yaml.go: no such file or directory

It might be a better way to avoid this issue that I am missing here. @jlinder

This is also happening with pkg/cmd/roachprod/ssh/ssh.go as we are changing his name to io.go with the refactor.

I don't know much about how this linter works, but this does not seem like the right fix. Removing files should not make the linter fail. And this particular linter test is for validating files contain the correct copyright headers. My guess would be there is an ordering problem here. Let's look at this together.

@alan-mas alan-mas force-pushed the cassandra-refactor branch 3 times, most recently from 4d22975 to 192a6dd Compare May 13, 2021 17:41
@alan-mas
Copy link
Contributor Author

I don't know much about how this linter works, but this does not seem like the right fix. Removing files should not make the linter fail. And this particular linter test is for validating files contain the correct copyright headers. My guess would be there is an ordering problem here. Let's look at this together.

Just took away the cassandra lines and it is working (not sure why it was failing before):

stream.GrepNot(`cassandra\.go`),
stream.GrepNot(`cassandra_yaml\.go`),

The ones related to ssh.go it is still failing, but my guess is that, when the PR related to ssh.go refactor got approved we can safely remove this line within that PR: stream.GrepNot(pkg/cmd/roachprod/ssh/ssh.go)

Copy link
Collaborator

@jlinder jlinder left a comment

Choose a reason for hiding this comment

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

On the cassandra lines: excellent.

On the ssh.go line, please see my comments in the line in lint_test.go.

Reviewed 2 of 2 files at r2.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @alan-mas)


pkg/testutils/lint/lint_test.go, line 1650 at r1 (raw file):

Previously, jlinder (James H. Linder) wrote…

I'd recommend just removing the functions that are unused from pkg/cmd/roachprod/ssh/ssh.go in this PR.

The intent of TestStaticCheck is to tell the developer when code is no longer used so it can be removed. This helps us keep the code base clean. And it's particularly helpful for PRs like this one where we are removing code so we can be sure we remove all the related unused code too. Thus, this PR should remove any functions in pkg/cmd/roachprod/ssh/ssh.go that are no longer in use.

@alan-mas alan-mas force-pushed the cassandra-refactor branch 6 times, most recently from b605835 to 7ba1b4a Compare May 15, 2021 00:59
@alan-mas alan-mas force-pushed the cassandra-refactor branch 5 times, most recently from 5ee238c to 32c1544 Compare May 18, 2021 17:01
@alan-mas alan-mas force-pushed the cassandra-refactor branch 2 times, most recently from 1631e5f to 355a5d1 Compare May 25, 2021 16:10
Second part of cockroachdb#47567 where we need to ensure no dependency is
getting affected when we remove ssh.go.

So we are removing cassandra.go and all its dependencies.

Release note: None
@knz knz force-pushed the cassandra-refactor branch from 355a5d1 to 0ca24f6 Compare May 26, 2021 10:20
Copy link
Contributor

@knz knz left a comment

Choose a reason for hiding this comment

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

I rebased the branch manually and fixed up the vendor update for Alan.
I think the PR is fine now. @jlinder do you agree?
I think if we agree it's fine we should merge this soon to prevent another vendor bump from "under" the PR, which would require one of us to re-do the vendor thing again.

Reviewed 3 of 5 files at r1, 1 of 2 files at r2, 4 of 4 files at r3, 2 of 2 files at r4.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @alan-mas)

@jlinder jlinder removed the do-not-merge bors won't merge a PR with this label. label May 26, 2021
Copy link
Collaborator

@jlinder jlinder left a comment

Choose a reason for hiding this comment

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

Yes, this is ready. :lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @alan-mas)

@jlinder
Copy link
Collaborator

jlinder commented May 26, 2021

bors r+

@jlinder
Copy link
Collaborator

jlinder commented May 26, 2021

Thank you for your help with this @knz!

@alan-mas
Copy link
Contributor Author

Thank you for your help with this @knz!

Agree with James, thank you so much @knz !

@craig
Copy link
Contributor

craig bot commented May 26, 2021

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented May 26, 2021

Build succeeded:

@craig craig bot merged commit 3322dfc into cockroachdb:master May 26, 2021
renatolabs added a commit to renatolabs/cockroach that referenced this pull request Apr 11, 2024
The following install targets are removed in this commit:

* `cassandra`: this should have been removed along with cockroachdb#64029.
* `charybdefs`: this is also no longer used and should have been
  removed along with cockroachdb#102492.
* `confluent`: only cdc tests would use this, and they implement their
  own logic to install `confluent`. In the future, we can consider
  including that logic in roachprod itself as part of `Install`, but
  that can be done in the future separately.
* `tools`: this target doesn't work, which indicates no one has been
  using it.

Epic: none

Release note: None
blathers-crl bot pushed a commit that referenced this pull request Apr 11, 2024
The following install targets are removed in this commit:

* `cassandra`: this should have been removed along with #64029.
* `charybdefs`: this is also no longer used and should have been
  removed along with #102492.
* `confluent`: only cdc tests would use this, and they implement their
  own logic to install `confluent`. In the future, we can consider
  including that logic in roachprod itself as part of `Install`, but
  that can be done in the future separately.
* `tools`: this target doesn't work, which indicates no one has been
  using it.

Epic: none

Release note: None
renatolabs added a commit to renatolabs/cockroach that referenced this pull request Apr 12, 2024
The following install targets are removed in this commit:

* `cassandra`: this should have been removed along with cockroachdb#64029.
* `charybdefs`: this is also no longer used and should have been
  removed along with cockroachdb#102492.
* `confluent`: only cdc tests would use this, and they implement their
  own logic to install `confluent`. In the future, we can consider
  including that logic in roachprod itself as part of `Install`, but
  that can be done in the future separately.
* `tools`: this target doesn't work, which indicates no one has been
  using it.

Epic: none

Release note: None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-community Originated from the community X-blathers-triaged blathers was able to find an owner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants