-
Notifications
You must be signed in to change notification settings - Fork 51
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 flags 717 #743
Feature flags 717 #743
Conversation
Signed-off-by: Jamie Popkin <popkinj@littleearth.ca>
Signed-off-by: Jamie Popkin <popkinj@littleearth.ca>
Signed-off-by: Jamie Popkin <popkinj@littleearth.ca>
Signed-off-by: Jamie Popkin <popkinj@littleearth.ca>
Signed-off-by: Jamie Popkin <popkinj@littleearth.ca>
Signed-off-by: Jamie Popkin <popkinj@littleearth.ca>
Deployment URLs ready for review. |
I'm seeing some build errors.... Assuming it has something to do with the Helm chart still needing an update. Will look into that now. |
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.
default.json
is not sufficient to control deployment values. That is just the hard-coded built setting if the environmental setting is not there.
Need to add same key to custom-environment-variables.json
(uses standard Node-Config hierarchy) and add an environment variable name that can be set by the Helm Charts.
For example, see how in
default.json
there is the default value forshowInnkeeperAdminLogin
- And in
custom-environment-variables.json
that maps it to an env varshowInnkeeperAdminLogin": "FRONTEND_INNKEEPER_SHOW_ADMIN",
- Then to get that variable set from helm, in
config.yaml
it sets up a helm chart mapping
FRONTEND_INNKEEPER_SHOW_ADMIN: {{ .Values.oidc.showInnkeeperAdminLogin | quote }}
- which is then specified per-environment in the corresponding values files, such as
values-pr.yaml
,values-production.yaml
etc.
Same thing should be done here with the new showWritableComponents
Build errors aren't related to Helm values, it's Unit Tests failing. Check reason for failures with "details" link in PR
(or run npm run test
locally in the frontend folder)
Someone else from Quartech PR'd a lot of unit test coverage so I'd assume changes like taking away buttons could trigger failures (though default value being true here I'm not sure how would affect UTs, might need mocks or something).
I haven't had a chance to dig much into the unit test snapshot stuff with ViteTest. Akiff knows more and may be able to help, or skip specific tests if they are getting in the way too much for now.
services/tenant-ui/frontend/src/components/connections/Connections.vue
Outdated
Show resolved
Hide resolved
The unit tests are failing because I wrote some tests that was preventing features that I thought were important from being removed. They are basically doing what they are supposed to. To fix them:
I could fix it for you but haven't got direct push access to the repo yet. I still need to do a fork. I know it's a bit of a change but having the tests run when you are making changes is a good way to do continuous testing. These tests would have failed when you saved the file. |
All good @jamshale ... At least we know they're doing what they're supposed to. |
@esune You're right. The better way than removing the tests is to set the showWritableComponents flag in configStore mock in You could toggle it to false during a test and make sure they are hidden to test this feature. There is an example toggling the config store in the last test in Login.test.ts |
Signed-off-by: Jamie Popkin <popkinj@littleearth.ca>
Signed-off-by: Jamie Popkin <popkinj@littleearth.ca>
Signed-off-by: Jamie Popkin <popkinj@littleearth.ca>
Signed-off-by: Jamie Popkin <popkinj@littleearth.ca>
I don't have a problem with removing the tests but i think you should declare the flag as false in |
Yeah I'd rather see tests for the on/off cases for this flag (and agree, declare it in the mock test data) but if removing them can get this ticket done then can move forward and address later. |
Done. 👍 |
Signed-off-by: Jamie Popkin <popkinj@littleearth.ca>
Signed-off-by: Jamie Popkin <popkinj@littleearth.ca>
Looks like this is working now. 🎉 |
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.
Looks good with the false
flag working now. Couple minor points:
Think there's a spot or 2 missing the hiding
- IssuedCredentials.vue, the
DeleteCredentialExchangeButton
andRevokeCredentialButton
(referenced in issue, revoke is at least) - Schema Storage
Delete Schema
button.
Verifications page seems to pull the search over the left when the button is gone
Issuance page behaves correct here so can just copy what that is doing
Signed-off-by: Jamie Popkin <popkinj@littleearth.ca>
Signed-off-by: Jamie Popkin <popkinj@littleearth.ca>
c0f4492
to
b622007
Compare
b622007
to
404e9ed
Compare
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.
Looks good to me 👍
Tried flipping the config val manually in OCP console and looks good in both modes now.
Can just flip that flag in values-pr
back to true now that testing is done and then can merge.
Signed-off-by: Jamie Popkin <popkinj@littleearth.ca>
404e9ed
to
f87e231
Compare
New toggle attribute within the
local.json
anddefault.json
files to turn all writable features (aside from contacts) on/off.Here is the full list of features effected: