Fixed pattern matching for task IDs in 'task exec'. #1189
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, there were problems with the way patterns were matched for
the task ID when calling
task exec
. Specifically, it didn't follow thesemantics indicated in the help string for (1) matching regular
expressions and (2) matching any substring within the ID, not just the
prefix of the ID.
The reason we did not adhere to these semantics is because we were
trying to match the exact semantics of
docker exec
, which only allowsprefix matching, not arbitrary regex or 'contains()' like semantics for
pattern matching the ID.
With this change, we have decided to break from the docker semantics and
use the default pattern matching semantics provided by the dcos-cli
library command for pattern matching task ids.
Unfortunately, there is a bug in this library, and regular expressions
are not supported! However, arbitrary substring pattern mathing is.
This commit, therefore, updates the semantics of
task exec
to adhereto 'contains()' like smeantics within the task ID for the 'task_id'
parameter passed to it, but does not yet support proper regular
expression pattern matching.
A subsequent commit will be added to fix regex matching in library call
implementing task ID pattern matching.