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 parts of Plane into a plane-common crate (DIS-2967) #849

Merged
merged 10 commits into from
Dec 3, 2024

Conversation

paulgb
Copy link
Member

@paulgb paulgb commented Nov 25, 2024

The main plane crate contains a client, but depending on it in another project requires bringing in all of Plane, including the openssl dependency. This breaks the client (and other pieces) out into a plane-common crate with the parts needed to "consume" Plane as a client, and a crate for Plane itself (in particular, without the database and ACME stuff, which bring in other dependencies that can be hard to wrangle).

This looks like a huge PR but there is essentially no net new code here; files are just moved around. A few notes:

  • I got rid of plane-dynamic; it was a hack to make tests compile faster but it should be less necessary now that we have broken up Plane into several crates.
  • Roughly, the criteria for "what goes in common" is "the client and everything it depends on". plane depends on plane-common, but plane-common does NOT depend on plane, so things like ExponentialBackoff (used by the client to manage reconnects) go in plane-common.

Todo:

  • get test_get_metrics and backend_lifecycle tests to pass.
  • rename to plane-common?
  • p2 PR for refactor and ensure p2 integration tests pass

Copy link

vercel bot commented Nov 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
plane ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 3, 2024 0:08am

@paulgb paulgb changed the title Split out Plane into a client crate Split out Plane into a client crate (DIS-2967) Nov 25, 2024
@paulgb paulgb changed the title Split out Plane into a client crate (DIS-2967) Refactor parts of Plane into a plane-common crate (DIS-2967) Nov 25, 2024
@paulgb paulgb marked this pull request as ready for review November 25, 2024 17:29
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to a33face in 1 minute and 7 seconds

More details
  • Looked at 3379 lines of code in 102 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_m24uWA9S6sFjgjAv


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@michaelsilver michaelsilver left a comment

Choose a reason for hiding this comment

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

Some small nits about import whitespace, otherwise LGTM!

plane/src/controller/core.rs Outdated Show resolved Hide resolved
plane/src/drone/command.rs Outdated Show resolved Hide resolved
plane/src/drone/executor.rs Outdated Show resolved Hide resolved
plane/src/drone/key_manager.rs Outdated Show resolved Hide resolved
plane/src/drone/mod.rs Outdated Show resolved Hide resolved
plane/src/proxy/connection_monitor.rs Outdated Show resolved Hide resolved
@paulgb
Copy link
Member Author

paulgb commented Dec 3, 2024

Some small nits about import whitespace, otherwise LGTM!

Fixed, thanks!

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on 164567a in 36 seconds

More details
  • Looked at 98 lines of code in 6 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_50RrllTWWWkURskQ


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@paulgb paulgb merged commit 0a43883 into main Dec 3, 2024
6 checks passed
@paulgb paulgb deleted the paulgb/common-crate branch December 3, 2024 12:11
@paulgb paulgb mentioned this pull request Dec 6, 2024
paulgb added a commit that referenced this pull request Dec 6, 2024
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