Skip to content

Refactor repository structure to adhere to new crate names and rust subfolder #157

Merged
soenkeliebau merged 35 commits intomainfrom
#88_refactor_structure
Sep 10, 2021
Merged

Refactor repository structure to adhere to new crate names and rust subfolder #157
soenkeliebau merged 35 commits intomainfrom
#88_refactor_structure

Conversation

@soenkeliebau
Copy link
Member

@soenkeliebau soenkeliebau commented Sep 9, 2021

Description

stackabletech/issues#88

Review Checklist

  • Code contains useful comments
  • (Integration-)Test cases added (or not applicable)
  • Documentation added (or not applicable)
  • Changelog updated (or not applicable)

soenkeliebau and others added 6 commits September 9, 2021 11:27
…r and renamed crates:

- operator -> operator-lib
- server -> operator
1. replace all occurrences of `server/Cargo.toml` with `rust/operator/Cargo.toml` in ci scripts (4 occurrences for Kafka)
2. Change occurrences of -server in following files:  deny, 2mal docker, build artifacts, stackable-kafka-operator-server.service, rust/operator/cargo.toml,  assets in cargo.toml
3. Rename rust/operator/packaging/rpm/SOURCES/stackable-kafka-operator-server-VERSION/usr/lib/systemd/system/stackable-kafka-operator-server.service  to stackable-kafka-operator.service
Also remove server from path to that file
4. Add extra ../ to assets paths in Cargo.toml for operator
5. Rename rust/operator/packaging/rpm/SPECS/stackable-kafka-operator-server.spec
Copy link

@djc djc left a comment

Choose a reason for hiding this comment

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

What is the reason not to put the server/src/main.rs in the operator-lib crate? Crates can contain a library and any number of binaries, which would mean you don't have to have the ugly -lib suffix.

@soenkeliebau
Copy link
Member Author

What is the reason not to put the server/src/main.rs in the operator-lib crate? Crates can contain a library and any number of binaries, which would mean you don't have to have the ugly -lib suffix.

I'll leave this for @lfrancke to answer, as he was the only one who had a preference either way. My reasoning why this could make sense was that the operator-lib crate actually is just that, a lib that can be used by wrapping crates to make this runnable. The current operator crate provides a command line wrapper that produces an executable, but it might be possible that we have other implementing crates down the line that wrap this and make it runnable as ... something else :)

Also, depending on the way the operator evolves, I can't say with certainty, that there will never be any other operators depending on it in the form of a library.

So to me this was just a precaution to keep things more separate just in case.

backstreetkiwi
backstreetkiwi previously approved these changes Sep 9, 2021
Copy link
Contributor

@backstreetkiwi backstreetkiwi left a comment

Choose a reason for hiding this comment

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

The PR binaries worked on CentOS 7, CentOS 8 and Debian 10 in test environments created using T2

lfrancke
lfrancke previously approved these changes Sep 10, 2021
@soenkeliebau soenkeliebau merged commit 6e28804 into main Sep 10, 2021
@soenkeliebau soenkeliebau deleted the #88_refactor_structure branch September 10, 2021 10:51
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.

5 participants