Growthbook - Feature Flags Display Tab Plugin#7800
Growthbook - Feature Flags Display Tab Plugin#7800zaki-hanafiah wants to merge 17 commits intobackstage:mainfrom
Conversation
Changed Packages
|
|
Thanks for the contribution! |
Signed-off-by: Zaki Hanafiah <zaki@zakhov.com>
Signed-off-by: Zaki Hanafiah <zaki@zakhov.com>
Signed-off-by: Zaki Hanafiah <zaki@zakhov.com>
Signed-off-by: Zaki Hanafiah <zaki@zakhov.com>
Signed-off-by: Zaki Hanafiah <zaki@zakhov.com>
Signed-off-by: Zaki Hanafiah <zaki@zakhov.com>
Signed-off-by: Zaki Hanafiah <zaki@zakhov.com>
Signed-off-by: Zaki Hanafiah <zaki@zakhov.com>
… plugin with deps Signed-off-by: Zaki Hanafiah <zaki@zakhov.com>
Signed-off-by: Zaki Hanafiah <zaki@zakhov.com>
Signed-off-by: Zaki Hanafiah <zaki@zakhov.com>
Signed-off-by: Zaki Hanafiah <zaki@zakhov.com>
Signed-off-by: Zaki Hanafiah <zaki@zakhov.com>
Signed-off-by: Zaki Hanafiah <zaki@zakhov.com>
Signed-off-by: Zaki Hanafiah <zaki@zakhov.com>
Signed-off-by: Zaki Hanafiah <zaki@zakhov.com>
Signed-off-by: Zaki Hanafiah <zaki@zakhov.com>
|
Hey @zaki-hanafiah looking forward for trying this new plugin, but seems like you need a rebase as the changes triggered every workspace |
hi @Sarabadu |
awanlin
left a comment
There was a problem hiding this comment.
Thanks for the contirbution @zaki-hanafiah, nice work overall, left a few comments the vast majority are simple things.
Additonally you need to add yourself as to the CODEOWNERS file - https://github.com/backstage/community-plugins/blob/main/.github/CODEOWNERS - and also submit a request to become an Org Member here: https://github.com/backstage/community/issues/new?template=org_member.yaml
Once this PR is merged and release I would recommend following this up with a PR to add support for the New Frontend System, docs on that are here: https://backstage.io/docs/frontend-system/building-plugins/index
| '@backstage-community/plugin-growthbook-backend': minor | ||
| --- | ||
|
|
||
| Initial release of GrowthBook feature flags plugin for Backstage. |
There was a problem hiding this comment.
This can be shorted to just this line and a note to see the README for more details 👍
changesets get rolled up into a changelog and we want to keep them short and concise.
|
|
||
| http.use(handler); | ||
| http.addAuthPolicy({ path: '/flags', allow: 'unauthenticated' }); | ||
| http.addAuthPolicy({ path: '/projects', allow: 'unauthenticated' }); |
There was a problem hiding this comment.
Why are you doing this? This seems like a security risk.
| @@ -13,11 +13,3 @@ | |||
| * See the License for the specific language governing permissions and | |||
| * limitations under the License. | |||
| */ | |||
There was a problem hiding this comment.
I would expect to see: export {}; at the end of this file otherwise I'm not sure why it's needed?
There was a problem hiding this comment.
Delete this file, it will be created by the release process and should not be touched by hand 👍
| * GrowthBook Management API secret key (read-only). | ||
| * When present, flags are fetched via the Management API with full project and environment metadata. | ||
| * When absent, the SDK API fallback is used and sdkKeys must be provided. | ||
| * @visibility backend |
There was a problem hiding this comment.
| * @visibility backend | |
| * @visibility secret |
This is a secret and should be marked as such.
| "private": true, | ||
| "engines": { | ||
| "node": "22 || 24" | ||
| "node": "20 || 22" |
There was a problem hiding this comment.
| "node": "20 || 22" | |
| "node": "22 || 24" |
| "node-gyp": "^10.0.0", | ||
| "prettier": "^2.3.2", | ||
| "typescript": "~5.8.0" | ||
| "typescript": "~5.3.0" |
There was a problem hiding this comment.
| "typescript": "~5.3.0" | |
| "typescript": "~5.8.0" |
| - **[@backstage-community/plugin-growthbook](./plugins/growthbook/README.md)**: Frontend plugin providing UI components and entity page integration | ||
| - **[@backstage-community/plugin-growthbook-backend](./plugins/growthbook-backend/README.md)**: Backend plugin providing API proxy and caching | ||
|
|
||
| ## Getting Started |
There was a problem hiding this comment.
To save on maintenance I would just point people to the proper README files instead, with this approach you have duplication to maitain.
|
|
||
| export type FlagType = 'boolean' | 'number' | 'string' | 'json' | 'null'; | ||
|
|
||
| export type FlagRow = { |
There was a problem hiding this comment.
FlagRow and FlagType are used by both the frontend and the backend, I would create a common package to store these to avoid duplicaiton.
| /** | ||
| * Base URL of your GrowthBook instance. | ||
| * @example https://app.growthbook.io | ||
| * @visibility frontend |
There was a problem hiding this comment.
You have this marked as frontend but best I can tell it's not being used in the frontend.
Hey, I just made a Pull Request!
This adds a new Growthbook Plugin workspace with the frontend and backend plugins.
This plugin will add a "Feature Flags" tab to Backstage catalog entity pages for any entity annotated with
growthbook.io/enabled: "true". You can also use thegrowthbook.io/project: 'my-project-name'to scope it to one project only.I have also included a standalone entity page that can be used if needed (GrowthbookEntityPage.tsx).
Other basic features for the frontend include:
boolean,string,number,json) and default valuesThe backend plugin serves as a proxy/cache layer between Backstage and GrowthBook:
secretKeyis configured / available): full project filtering and additional feature metadata via/api/v1/features+/api/v1/projects- More Info/api/growthbook-flags/flagsand/api/growthbook-flags/projectswithunauthenticatedauth policy (read-only viewer, seems like this is how it's setup with other community-plugins, correct me if im wrong 🙏🏻 (✔️ Checklist
Signed-off-byline in the message