You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure unicity when creating instances of Autogroup (#3650)
The default label of an `Autogroup` instance was based on the current
date and time, with a precision of seconds. If multiple scripts attempted
to create an instance at the same time, a uniqueness error would be thrown
by the database. This commit adds the logic to the `get_or_create_group`
method to be able to deal with this situtation and iteratively generate
unique labels by appending an integer.
The CLI parameters of the `verdi run` command were broken and badly
tested. These have been altered so as to fix the behavior:
* removed the `--group` flag, which was true by default and so served
no purpose whatsoever, and replaced it with `--auto-group`. The auto
grouping is now disabled by default, but can be enabled by this new
flag.
* deprecated use of `group-name' in favour of `group-label-prefix`
* the flags to include or exclude certain node types have been merged
into just `--exclude` and `--include` which are mutually exclusive.
By default everything is included and the flags take entry point
strings of nodes to narrow the scope. The entry point string can
contain SQL wildcards `%` and `_` to match entry points with the
`like` operator.
The `Autogroup` interface has been adapted to match the new logic of the
CLI. Finally, an overzealous `isinstance` check has been removed from the
`Node.store` method to check that the `current_autogroup` global, if set,
is of type `Autogroup`, which should speed up the storing of nodes.
0 commit comments