Skip to content

Fix the status command#176

Merged
DavidMarchant merged 11 commits into
developfrom
fix/status
Nov 19, 2018
Merged

Fix the status command#176
DavidMarchant merged 11 commits into
developfrom
fix/status

Conversation

@WilliamMcCumstie
Copy link
Copy Markdown
Contributor

Based on #175

This is fairly simple fix to the status command. The configs weren't being passed into the command, as such the root status command would always run. Fixes #173

Shell variables are essentially key value pairs that are associated with
a `Batch`. It isn't a great idea to store lists within a db and as such
each variable will be stored in its own table.

The basic design of ShellVariable has been modelled of Job (w/o the
running code)
To allow for greater flexibility in the arguments passing, the
individual config files now dictate their arguments list.

Note: The `config.args()` method is the safe version which handles the
case when no arguments are specified. The `config.arguments` attribute
returns the raw version from the config

BUG FIX: It should have been `arg_n` not `arg_name`
There are going to be a couple of steps involved when creating a
`batch`. Thus it is easier if they are abstracted away into a single
function
It is only going to be used within the run method and as such should be
located with it
The ShellVariable models need to be added to the batches in a similar
way to Jobs. This does take some effort to combined the shell variables
as key value pairs
This will prevent threading issue with SQLAlchemy
The shell variables are set as bash variables before the command is ran.
This allows then to be substituted into the config command.
This is to prevent a injection attack through the shell variables
This allows the error to be caught by clicks top level error handler
The configs do not get passed for the `root` command BUT should be
passed in all other cases
Copy link
Copy Markdown
Contributor

@DavidMarchant DavidMarchant left a comment

Choose a reason for hiding this comment

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

Yep LGTM! merge through soon as #175 is good to go

@DavidMarchant DavidMarchant merged commit 7aab33f into develop Nov 19, 2018
@DavidMarchant DavidMarchant deleted the fix/status branch November 19, 2018 17:36
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.

Tool filters are being ignored in the status command

2 participants