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

Create Plugin: Allow setting feature flags via cli args #984

Merged
merged 11 commits into from
Jul 8, 2024

Conversation

jackw
Copy link
Collaborator

@jackw jackw commented Jul 1, 2024

What this PR does / why we need it:
This PR allows users to set feature flags via cli args when scaffolding or updating a plugin. This makes it much easier for users when scaffolding as they don't need to scaffold, create or change the cprc json file, then run @grafana/create-plugin update to update the configs. It also makes it easier for contributors to test or add new features behind flags.

Feature flags can be passed using the feature-flags arg. Multiple can be comma separated. Any unknown flags will produce a warning:

image

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Use the below canary release feature flags can be set using an arg like --feature-flags="bundleGrafanaUI".

📦 Published PR as canary version: Canary Versions

✨ Test out this PR locally via:

npm install @grafana/[email protected]
# or 
yarn add @grafana/[email protected]

@jackw jackw added create-plugin related to the create-plugin tool minor Increment the minor version when merged release Create a release when this pr is merged labels Jul 1, 2024
@jackw jackw self-assigned this Jul 1, 2024
Copy link

github-actions bot commented Jul 1, 2024

Hello! 👋 This repository uses Auto for releasing packages using PR labels.

✨ This PR can be merged and will trigger a new minor release.
NOTE: When merging a PR with the release label please avoid merging another PR. For further information see here.

@jackw jackw marked this pull request as ready for review July 1, 2024 09:59
@jackw jackw requested a review from a team as a code owner July 1, 2024 09:59
@jackw jackw requested review from academo and removed request for a team July 1, 2024 09:59
@jackw jackw force-pushed the jackw/expose-flags-to-cli branch from f879305 to 0f5704c Compare July 2, 2024 07:01
Copy link
Collaborator

@leventebalogh leventebalogh left a comment

Choose a reason for hiding this comment

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

Nice one, I think we needed this for a long time! 👏

Left two comments, but generally LGTM 👍

packages/create-plugin/src/utils/utils.config.ts Outdated Show resolved Hide resolved
@jackw jackw force-pushed the jackw/expose-flags-to-cli branch from 51417fd to 9ef654f Compare July 3, 2024 10:10
leventebalogh
leventebalogh previously approved these changes Jul 4, 2024
@jackw jackw dismissed leventebalogh’s stale review July 5, 2024 15:16

changed approach making review stale

Copy link
Collaborator

@leventebalogh leventebalogh left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@jackw jackw merged commit 268ff00 into main Jul 8, 2024
13 of 14 checks passed
@jackw jackw deleted the jackw/expose-flags-to-cli branch July 8, 2024 14:03
@grafana-plugins-platform-bot
Copy link

🚀 PR was released in @grafana/[email protected] 🚀

@grafana-plugins-platform-bot grafana-plugins-platform-bot bot added the released This issue/pull request has been released. label Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create-plugin related to the create-plugin tool minor Increment the minor version when merged release Create a release when this pr is merged released This issue/pull request has been released.
Projects
Status: 🚀 Shipped
Development

Successfully merging this pull request may close these issues.

None yet

2 participants