-
Notifications
You must be signed in to change notification settings - Fork 0
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
supports configure workspace features with wildcard #96
Conversation
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Codecov Report
@@ Coverage Diff @@
## workspace #96 +/- ##
==========================================
Coverage 65.81% 65.81%
==========================================
Files 3334 3335 +1
Lines 64404 64428 +24
Branches 10248 10257 +9
==========================================
+ Hits 42385 42401 +16
- Misses 19451 19459 +8
Partials 2568 2568
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
@@ -140,6 +142,7 @@ export class WorkspacePlugin implements Plugin<{}, {}> { | |||
name: i18n.translate('workspaces.management.workspace.default.name', { | |||
defaultMessage: 'Management', | |||
}), | |||
features: [`@${DEFAULT_APP_CATEGORIES.management.id}`], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add features when creating public workspace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question, do we have a conclusion already of what features to show in a public
workspace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think one thing for sure is that management category should not be displayed in public workspace.
} | ||
|
||
// If a config starts with `!`, such feature or category will be excluded | ||
if (featureConfig.startsWith('!')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For featureConfigs that only have one config like "!dev_tools", the result would be false
when validate match({ id: 'integrations', category: { id: 'management', label: 'Management' } })
. Is this by intention?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, my thinking was, if user wants to match everything but not dev_tools
, then the config should look like this: ['*', '!dev_tools']
supports configure workspace features with wildcard --------- Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
supports configure workspace features with wildcard --------- Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
supports configure workspace features with wildcard --------- Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Description
This PR adds support to configure workspace features with wildcard.
Supported rules with examples:
*
matches all features@management
(with@
prefix) matchesmanagement
categorydiscover
matches feature id!
prefix to exclude category or feature, such as!@management
and!discover
will excludemanagement
category anddiscover
featureIssues Resolved
Screenshot
Testing the changes
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr