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
Method UpdateEnvironmentWithRevision does not return diagnostics properly. Instead, empty array is returned and err is returned, filled with diagnostics in the error text.
Example
Call like this:
diagnostics, revision, err := st.client.UpdateEnvironmentWithRevision(context.Background(), input.OrgName, input.EnvName, input.Yaml, "")
if diagnostics != nil {
return nil, fmt.Errorf("failed to update environment, yaml code failed following checks: %+v", diagnostics)
}
if err != nil {
return nil, fmt.Errorf("failed to update environment due to error: %+v", err)
}
Diagnostics check is skipped, because it's empty array, then second if is hit. The error returned is failed to update environment due to error: [0] Diags: string must match the pattern "^[a-zA-Z0-9-_.]{1,100}\\/[a-zA-Z0-9-_.]{1,100}$"
Which shows that diags are present, just not parsed and returned correctly.
Output of pulumi about
Not relevant
Additional context
Found this in Pulumi Service Provider
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered:
### Summary:
- Add validation on Environment resource's values, blocking values using
/
- Improve error messages of Environment resource
- Moved diags check above error, as it should precede (even though diags
don't work currently, see
[bug](pulumi/esc#370))
### Testing
- Manually
- Integ tests
What happened?
Method
UpdateEnvironmentWithRevision
does not return diagnostics properly. Instead, empty array is returned and err is returned, filled with diagnostics in the error text.Example
Call like this:
Diagnostics check is skipped, because it's empty array, then second if is hit. The error returned is
failed to update environment due to error: [0] Diags: string must match the pattern "^[a-zA-Z0-9-_.]{1,100}\\/[a-zA-Z0-9-_.]{1,100}$"
Which shows that diags are present, just not parsed and returned correctly.
Output of
pulumi about
Not relevant
Additional context
Found this in Pulumi Service Provider
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: