-
Notifications
You must be signed in to change notification settings - Fork 203
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
CLI: added option to check a single import source or sync rule by name #2698
base: master
Are you sure you want to change the base?
Conversation
Issue birthday is nearing, so I'd like to ask for a current state. boldly pinging @lippserd @Thomas-Gelf |
@log1-c PR will be reviewed next week. |
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 it makes sense to add an option to filter check targets by name. Since jobs also have a name, we could also support the filter here. With the current implementation, the combination of --name
with --check deployment
or --check jobs
would fail in my opinion, as the corresponding filter parameter is missing for the functions. Anyway, I would like to have an implementation that provides roughly the following:
- Support for multiple specification of
--name
. Wildcards should also be supported. - Analogous support for the specification of
--exclude-name
. - Trigger an error if
--check deployment
or--check config
and--*name are specified
. - Support filter arguments without having to specify
--check
so that it applies to sync, import and jobs. - Create a filter object from the specified filter arguments.
- Apply the filter in the corresponding health check functions.
All in all, these changes are not trivial, so I would keep them to a minimum so that we get something done here:
- Raise an error when
--name
is specified with--check deployment
or--check config
, i.e.$this->fail('--name is not supported with --check ...');
- Support filtering of jobs.
- Fix code style and indentation 😉.
@log1-c if you need any help with the changes requested, please let me know.
added basic error check to not use --name with deployment or config check changed variable names simplified if clauses
@lippserd I've done the requested changes regarding the variable naming and the if clauses. |
Did a (possibly quick and dirty, as I'm not experienced in PHP) implementation of a new
--name
parameter to make it possible to check a single import source or sync rule with the cli command.