Skip to content

Cherry-pick #16287 to 7.x: Fix timeout option of Functionbeat#16577

Merged
kvch merged 1 commit intoelastic:7.xfrom
kvch:backport_16287_7.x
Feb 25, 2020
Merged

Cherry-pick #16287 to 7.x: Fix timeout option of Functionbeat#16577
kvch merged 1 commit intoelastic:7.xfrom
kvch:backport_16287_7.x

Conversation

@kvch
Copy link
Copy Markdown
Contributor

@kvch kvch commented Feb 25, 2020

Cherry-pick of PR #16287 to 7.x branch. Original message:

What does this PR do?

This PR changes the type of timeout option of GCP functions to string from time.Duration.

Why is it important?

The option was parsed as time.Duration and then converted to string when creating the payload to upload a function. However, the format of the converted value was not accepted by GCP. This prevented users from setting the timeout from the manager.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works

How to test this PR locally

Set the timeout option of a GCP function and try to deploy it.

Related issues

Closes #16282

## What does this PR do?

This PR changes the type of `timeout` option of GCP functions to `string` from `time.Duration`.

## Why is it important?

The option was parsed as `time.Duration` and then converted to `string` when creating the payload to upload a function. However, the format of the converted value was not accepted by GCP. This prevented users from setting the timeout from the manager.
(cherry picked from commit 6cc308d)
@kvch kvch added [zube]: In Review backport Team:Services (Deprecated) Label for the former Integrations-Services team labels Feb 25, 2020
@kvch
Copy link
Copy Markdown
Contributor Author

kvch commented Feb 25, 2020

All relevant tests are passing.

@kvch kvch merged commit d828372 into elastic:7.x Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Team:Services (Deprecated) Label for the former Integrations-Services team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants