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

[JENKINS-26130] Way to print progress from pickles #4

Merged
merged 6 commits into from Jun 16, 2016

Conversation

Projects
None yet
3 participants
@jglick
Copy link
Member

jglick commented Jun 9, 2016

Use exponential backoff for logging in TryRepeatedly.
The actual attempts still happen at a regular interval.
/** Number of {@link #tryLater} calls to run between logging attempts. */
private float backoff = 1;
/** Amount by which {@link #backoff} gets multiplied, so we do not flood the log with endless messages. */
private static final float BACKOFF_EXPONENT = 1.42f; // >√2

This comment has been minimized.

Copy link
@oleg-nenashev

oleg-nenashev Jun 10, 2016

Member

You could use the Golden ratio constant to make the code more scientific :)

This comment has been minimized.

Copy link
@jglick

jglick Jun 10, 2016

Author Member

:-)

The exponent here is pretty arbitrary, I just chose something which seemed to behave reasonably by watching it interactively.

DurableTaskStep.Execution uses a lower exponent, but there we want to actually grab process output sooner rather than later, whereas here the message is usually redundant, we just want to make it clear in the build log that something is still happening.

next.cancel(mayInterruptIfRunning);
}
LOGGER.fine("cancelling " + this + " in " + getOwner());

This comment has been minimized.

Copy link
@oleg-nenashev

oleg-nenashev Jun 10, 2016

Member

uppercase?

public ListenableFuture<PickleResolver> rehydrate() {
return rehydrate(new ArrayList<ListenableFuture<?>>());

This comment has been minimized.

Copy link
@oleg-nenashev

oleg-nenashev Jun 10, 2016

Member

Why don't you just use the same implementation in jenkinsci/workflow-api-plugin#5?

This comment has been minimized.

Copy link
@jglick

jglick Jun 10, 2016

Author Member

Not sure what you mean. This is just a compatibility stub in case a user neglects to update workflow-cps to match.

This comment has been minimized.

Copy link
@oleg-nenashev
@reviewbybees

This comment has been minimized.

Copy link

reviewbybees commented Jun 15, 2016

This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.

@oleg-nenashev

This comment has been minimized.

Copy link
Member

oleg-nenashev commented Jun 15, 2016

🐝

@jglick jglick merged commit c836c28 into jenkinsci:master Jun 16, 2016

1 check was pending

Jenkins Jenkins is validating pull request ...
Details

@jglick jglick deleted the jglick:PPPP-JENKINS-26130 branch Jun 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.