Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a client method to bypass server side timeout on upload #20419

Merged
merged 3 commits into from
Jul 28, 2018

Conversation

smarterclayton
Copy link
Contributor

@smarterclayton smarterclayton commented Jul 25, 2018

Fixes one part of https://bugzilla.redhat.com/show_bug.cgi?id=1608410

The import we were doing took longer than 30s in 3.11. In 3.10 it was only occasionally taking that long. ImageStreamImport is a "long running call", so when we perform it we need to allow it to run slightly longer for some use cases.

In general, the product has to support imports longer than 30s.

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 25, 2018
@smarterclayton
Copy link
Contributor Author

@bparees

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 25, 2018
@smarterclayton
Copy link
Contributor Author

@deads2k

Resource("imagestreamimports").
Body(imageStreamImport).
// this instructs the api server to allow our request to take up to an hour - chosen as a high boundary
Timeout(time.Hour).
Copy link
Contributor

Choose a reason for hiding this comment

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

why not just make this an argument to the function? especially since the function name is currently a lie.

also where's the generator code change that yields this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because we don't want end users setting arbitrary timeouts. We define what "no timeout" means behind the interface. End clients don't get to set it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no generator code change. This is an expansion, which are side car methods that you write and get slotted in to the interfaces.

Copy link
Contributor

Choose a reason for hiding this comment

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

An expansion that we will have to carry over when we move the image controllers to external :-)

Copy link
Contributor

Choose a reason for hiding this comment

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

@smarterclayton if there is just one place where we actually use this expansion, can't we just call the client directly with Timeout in that place? (instead of having one-time-use expansion)

Copy link
Contributor

Choose a reason for hiding this comment

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

can't we just call the client directly with Timeout in that place?

the client doesn't expose the timeout field that i saw, so no.

The last import had no change, so we were relying on the older, shorter timeout. Instead, we want to explicitly trigger this error.
@bparees
Copy link
Contributor

bparees commented Jul 26, 2018

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 26, 2018
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bparees, smarterclayton

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@smarterclayton smarterclayton merged commit 7e5415c into openshift:master Jul 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. queue/critical-fix size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants