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

refactor: plugins #273

Merged
merged 44 commits into from
Sep 30, 2022
Merged

refactor: plugins #273

merged 44 commits into from
Sep 30, 2022

Conversation

chesedo
Copy link
Contributor

@chesedo chesedo commented Jul 21, 2022

This turns our service feature flags into separate crates. The long game here will be to allow vendors to write their own plugins...

TODO

  • Update CI

Breaking changes

This changes the main function argument attributes yet again 😃 . These changes are as follow:

Old attribute New attribute
shared::Postgres shuttle_shared_db::Postgres
shared::MongoDb shuttle_shared_db::MongoDb
aws::rds::Postgres shuttle_aws_rds::Postgres
aws::rds::MySql shuttle_aws_rds::MySql
aws::rds::MariaDB shuttle_aws_rds::MariaDB
persist shuttle_persist::Persist

The old feature flag on shuttle_service also needs to be replaced with the following crates definitions:

Old feature flag Extra crate definition
sqlx-postgres shuttle-shared-db = { version = "0.5.2", features = ["postgres"] }
mongo-integration shuttle-shared-db = { version = "0.5.2", features = ["mongo"] }
sqlx-aws-postgres shuttle-aws-rds = { version = "0.5.2", features = ["postgres"] }
sqlx-aws-mysql shuttle-aws-rds = { version = "0.5.2", features = ["mysql"] }
sqlx-aws-mariadb shuttle-aws-rds = { version = "0.5.2", features = ["mariadb"] }
secrets shuttle-secrets = "0.5.2"
persist shuttle-persist = "0.5.2"

@chesedo chesedo mentioned this pull request Aug 3, 2022
Copy link
Collaborator

@brokad brokad left a comment

Choose a reason for hiding this comment

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

Holy conflict mackerel! I hope I resolved this without creating more issues (apart from the ones outlined below, due to the time difference between when this was introduced and support for additional resources we have added since then).

Couple more things not specifically pointed at in the comments below:

  • Web frameworks do not seem to have been modularised at all?
  • The CLI is missing a small tweak for secrets I think
  • Serenity is not modularised either (due to time difference)
  • The modules don't seem to call on their dependencies through fully qualified versions, so I guess this will need to be added before publishing
  • On that topic, will the publish scripts handle the version strings in the new crates correctly?

.circleci/config.yml Outdated Show resolved Hide resolved
service/src/lib.rs Outdated Show resolved Hide resolved
service/src/lib.rs Show resolved Hide resolved
@chesedo chesedo merged commit 9e2c01f into shuttle-hq:main Sep 30, 2022
@chesedo chesedo deleted the refactor/plugins branch September 30, 2022 05:44
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.

2 participants