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

feat(service-registry rule): add disable and and update command #1444

Merged
merged 2 commits into from
Feb 17, 2022

Conversation

rkpattnaik780
Copy link
Contributor

Disable and update command for service-registry rules.

Verification Steps

  1. Run the following command to update config value of an enabled rule:
rhoas service-registry rule update --rule-type compatibility --config forward 
  1. Run the following command to disable all global rules.
rhoas service-registry rule disable 

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation change
  • Other (please specify)

Checklist

  • Documentation added for the feature
  • CI and all relevant tests are passing
  • Code Review completed
  • Verified independently by reviewer

@wtrocki
Copy link
Collaborator

wtrocki commented Feb 16, 2022

Ok to look?

@rkpattnaik780
Copy link
Contributor Author

Ok to look?

Okay except the update lacks interactive mode as of now. Rest functionalities are ready for review.

@wtrocki
Copy link
Collaborator

wtrocki commented Feb 16, 2022

Me thinking: can disable be just flag as part of the update? Does this make your life easier? If not ignore

@rkpattnaik780
Copy link
Contributor Author

Me thinking: can disable be just flag as part of the update? Does this make your life easier? If not ignore

I will prefer having a separate disable command.

@rkpattnaik780
Copy link
Contributor Author

@wtrocki I wanted update to have interactive mode too, for suggesting valid config values. The problem is that unlike enable, update needs to check if a rule exists (is already enabled) , for which we will need values of registry-instance ID, group and artifact-id beforehand.

@rkpattnaik780 rkpattnaik780 marked this pull request as ready for review February 17, 2022 08:27
@wtrocki
Copy link
Collaborator

wtrocki commented Feb 17, 2022

verifying now

@wtrocki
Copy link
Collaborator

wtrocki commented Feb 17, 2022

@rkpattnaik780 I see some strange behaviour where text with progress disappears

Disabling rule..

and then it is gone in less than second which is making it very hard to read etc.

Copy link
Collaborator

@wtrocki wtrocki left a comment

Choose a reason for hiding this comment

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

Verified all commands:

  • Global rules
  • rules for artifact.

Made incompatible changes with rule applied and artifact update was rejected.

@rkpattnaik780 rkpattnaik780 merged commit 7f493b8 into service-registry-rules Feb 17, 2022
@rkpattnaik780 rkpattnaik780 deleted the rules_alter branch February 17, 2022 10:48
rkpattnaik780 added a commit that referenced this pull request Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants