Skip to content

Commit

Permalink
Merge pull request #742 from ystia/backport40/bugfix/GH-739-slurm-exe…
Browse files Browse the repository at this point in the history
…cution-option

[Backport 4.0] Checking TOSCA value RawString() to see if property execution_option is defined
  • Loading branch information
laurentganne authored May 25, 2021
2 parents f3e32e2 + 43dd80c commit 305fe13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## UNRELEASED

### BUG FIXES

* Error submitting a SLURM job with no execution option ([GH-739](https://github.com/ystia/yorc/issues/739))

## 4.0.7 (May 19, 2021)

### BUG FIXES
Expand Down
2 changes: 1 addition & 1 deletion prov/slurm/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ func (e *executionCommon) buildJobInfo(ctx context.Context) error {
if err != nil {
return err
}
if eo != nil && eo.Value != nil {
if eo != nil && eo.RawString() != "" {
err = mapstructure.Decode(eo.Value, &e.jobInfo.ExecutionOptions)
if err != nil {
return errors.Wrapf(err, `invalid execution options datatype for attribute "execution_options" for node %q`, e.NodeName)
Expand Down

0 comments on commit 305fe13

Please sign in to comment.