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

feature: flag to enable/disable experimental features #1762

Merged
merged 1 commit into from
Oct 28, 2023

Conversation

rustatian
Copy link
Member

@rustatian rustatian commented Oct 28, 2023

Reason for This PR

  • Ability to provide some experimental features (like http3 or new destroy mechanism for the JOBS plugin and drivers)

Description of Changes

  • Add the experimental features flag:
    • -e: short form.
    • --enable-experimental: long form.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

PR Checklist

[Author TODO: Meet these criteria.]
[Reviewer TODO: Verify that these criteria are met. Request changes if not]

  • All commits in this PR are signed (git commit -s).
  • The reason for this PR is clearly provided (issue no. or explanation).
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this PR.
  • Any user-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.

Summary by CodeRabbit

  • New Feature: Added an --enable-experimental flag to enable experimental features. This new option allows users to test out upcoming features that are still in the experimental phase. Please note that these features may not be fully stable or complete. Use this flag with caution and at your own risk.
  • Test: Updated tests to accommodate the new --enable-experimental flag. These changes ensure that our testing suite remains accurate and reliable as we introduce new features.

@rustatian rustatian added the C-enhancement Category: enhancement. Meaning improvements of current module, transport, etc.. label Oct 28, 2023
@rustatian rustatian requested a review from wolfy-j October 28, 2023 10:55
@rustatian rustatian self-assigned this Oct 28, 2023
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 28, 2023

Walkthrough

The codebase has been updated to include an experimental feature flag. This flag, when enabled, activates experimental features in the application. The changes have been implemented in the command functions and their corresponding tests, ensuring the new feature is well-integrated and thoroughly tested.

Changes

File Summary
internal/cli/root.go Added a new flag --enable-experimental to NewCommand.
internal/cli/serve/... Modified NewCommand to accept an additional experimental parameter. Updated configImpl.Plugin struct to include ExperimentalFeatures field.
internal/cli/serve/..._test.go Updated test functions TestCommandProperties and TestCommandNil to include the new experimental parameter in serve.NewCommand calls.

🐇💻

In the land of code, where the rabbits play,

A new flag was born, to brighten the day.

With a flip of a switch, and a hop in our step,

We've added new features, with plenty of pep.

So here's to the changes, may they serve us well,

In the land of code, where the rabbits dwell. 🎉🥕


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai help to get help.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.json

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between b5acfd6 and 64b4d4f.
Files ignored due to filter (2)
  • go.mod
  • go.sum
Files selected for processing (3)
  • internal/cli/root.go (3 hunks)
  • internal/cli/serve/command.go (3 hunks)
  • internal/cli/serve/command_test.go (1 hunks)
Files skipped from review due to trivial changes (2)
  • internal/cli/root.go
  • internal/cli/serve/command_test.go
Additional comments: 2
internal/cli/serve/command.go (2)
  • 24-24: The function signature has been changed to include an additional parameter experimental *bool. Ensure that all calls to this function throughout the codebase have been updated to match the new signature.

  • 47-47: The ExperimentalFeatures field in the configImpl.Plugin struct is set based on the value of the experimental parameter. This is a good way to enable or disable experimental features.

@codecov
Copy link

codecov bot commented Oct 28, 2023

Codecov Report

Merging #1762 (64b4d4f) into master (b5acfd6) will increase coverage by 0.17%.
The diff coverage is 41.66%.

@@            Coverage Diff             @@
##           master    #1762      +/-   ##
==========================================
+ Coverage   37.12%   37.29%   +0.17%     
==========================================
  Files          16       16              
  Lines         862      866       +4     
==========================================
+ Hits          320      323       +3     
- Misses        516      517       +1     
  Partials       26       26              
Files Coverage Δ
internal/cli/root.go 58.03% <100.00%> (+1.15%) ⬆️
internal/cli/serve/command.go 4.00% <12.50%> (-0.05%) ⬇️

@rustatian rustatian merged commit 319f7d3 into master Oct 28, 2023
14 of 15 checks passed
@rustatian rustatian deleted the feature/experimental-flag branch October 28, 2023 11:10
@rustatian rustatian added this to the v2023.3.4 milestone Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: enhancement. Meaning improvements of current module, transport, etc..
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

1 participant