Skip to content

chore: restructure cargo workspace#118

Open
erenatas wants to merge 17 commits intomainfrom
eatas/flagd-workspace-split
Open

chore: restructure cargo workspace#118
erenatas wants to merge 17 commits intomainfrom
eatas/flagd-workspace-split

Conversation

@erenatas
Copy link
Contributor

This PR is not done, we need to merge #117 first. It represents how workspace split would look like

erenatas and others added 17 commits March 1, 2026 11:26
Signed-off-by: Eren Atas <eren_atas@hotmail.com>
Signed-off-by: Eren Atas <eren_atas@hotmail.com>
Signed-off-by: Eren Atas <eren_atas@hotmail.com>
Signed-off-by: Eren Atas <eren_atas@hotmail.com>
Signed-off-by: Eren Atas <eren_atas@hotmail.com>
Signed-off-by: Eren Atas <eren_atas@hotmail.com>
Signed-off-by: Eren Atas <eren_atas@hotmail.com>
Signed-off-by: Eren Atas <eren_atas@hotmail.com>
Signed-off-by: Eren Atas <eren_atas@hotmail.com>
Signed-off-by: Eren Atas <eren_atas@hotmail.com>
- Add open-feature-ofrep as dependency to flagd
- Update rest feature to use open-feature-ofrep
- Add cert_path option to OfrepOptions for TLS support

Signed-off-by: Eren Atas <eren_atas@hotmail.com>
Signed-off-by: Eren Atas <eren_atas@hotmail.com>
Signed-off-by: Eren Atas <eren_atas@hotmail.com>
Signed-off-by: Eren Atas <eren_atas@hotmail.com>
Signed-off-by: Eren Atas <eren_atas@hotmail.com>
Signed-off-by: Eren Atas <eren_atas@hotmail.com>
Signed-off-by: Eren Atas <eren.atas@booking.com>
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request initiates a significant restructuring of the Rust cargo workspace, separating certain crates for independent release management. Concurrently, it refactors the flagd crate's REST resolver to utilize the open-feature-ofrep crate, streamlining its implementation and enhancing its capabilities with new TLS certificate options.

Highlights

  • Cargo Workspace Restructuring: The main Cargo.toml workspace has been updated to exclude env-var, flagsmith, and flipt crates, indicating a shift in how these are managed within the monorepo.
  • Release Please Configuration Split: The release-please-config.json was modified to remove the excluded crates and enable merging for the cargo-workspace plugin. A new release-please-standalone-config.json was added to manage releases for the now standalone crates (env-var, flipt, flagsmith).
  • OFREP Integration and RestResolver Simplification: The crates/flagd now leverages the open-feature-ofrep crate for its REST resolver. This refactoring significantly simplifies the RestResolver implementation by delegating HTTP request and evaluation logic to the dedicated OfrepProvider.
  • Enhanced ofrep Crate: The crates/ofrep crate's OfrepOptions now supports specifying a cert_path for custom CA certificates, improving TLS connection flexibility.
Changelog
  • .release-please-manifest-standalone.json
    • Added a new manifest for standalone release management.
  • .release-please-manifest.json
    • Removed env-var and flipt entries from the manifest.
  • Cargo.toml
    • Removed env-var, flagsmith, and flipt from workspace members.
    • Added env-var, flagsmith, and flipt to a new exclude list in the workspace.
  • crates/flagd/Cargo.toml
    • Added open-feature-ofrep as a dependency for the rest feature.
    • Included open-feature-ofrep in optional dependencies.
  • crates/flagd/src/lib.rs
    • Updated the RestResolver::new call to be awaitable.
  • crates/flagd/src/resolver/rest.rs
    • Rewrote the module to wrap open-feature-ofrep::OfrepProvider.
    • Removed manual HTTP client building and request logic.
    • Simplified RestResolver::new to initialize OfrepProvider.
    • Delegated all FeatureProvider trait methods to the wrapped OfrepProvider.
    • Removed extensive error handling and context conversion logic, now handled by open-feature-ofrep.
    • Removed several test cases related to error handling and client building.
  • crates/ofrep/Cargo.toml
    • Updated dependencies to use workspace versions.
    • Enabled the rustls feature for reqwest.
  • crates/ofrep/src/lib.rs
    • Added a cert_path field to OfrepOptions for custom CA certificates.
  • release-please-config.json
    • Changed the merge property to true for the cargo-workspace plugin.
    • Removed crates/env-var and crates/flipt from the packages list.
  • release-please-standalone-config.json
    • Added a new release-please configuration for standalone packages.
Ignored Files
  • Ignored by pattern: .github/workflows/** (4)
    • .github/workflows/flagd-ofrep-check.yml
    • .github/workflows/release-please-flagd-family.yml
    • .github/workflows/release-please-standalone.yml
    • .github/workflows/rust.yml
Activity
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully restructures the Cargo workspace by separating env-var, flipt, and flagsmith crates into a standalone release configuration. This improves modularity and clarifies dependency management. A major refactoring was also performed in crates/flagd/src/resolver/rest.rs, where the custom HTTP client and OFREP implementation were replaced by delegating to the new open-feature-ofrep crate. This change streamlines the flagd provider's REST resolver, making it more maintainable and leveraging a dedicated external OFREP implementation. The open-feature-ofrep crate was updated to use workspace dependencies and now includes a cert_path option for TLS configurations. The changes are well-executed and enhance the overall architecture.

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.

3 participants