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

Always runAfterFinalized #462

Merged
merged 1 commit into from
Jan 3, 2019
Merged

Conversation

KreAch3R
Copy link
Contributor

Without this, Notifier#perform runs the Slack message publish code too early,
resulting in messages like this:

test - #68 Success after 6.9 sec and counting (Open)

isBuilding() should be true in this instance.

Instead, always run the plugin with runAfterFinalised=true.
This restores the older behavior, (before #361, #125) where SlackListener run
the publish code after isBuilding() was false and the end message was:

test - #80 Success after 6 sec (Open)

Refers: #446 (maybe #454) #455 #457

Without this, Notifier#perform runs the Slack message publish code too early,
resulting in messages like this:
```
test - jenkinsci#68 Success after 6.9 sec and counting (Open)
```
`isBuilding()` should be true in this instance.

Instead, always run the plugin with `runAfterFinalised=true.`
This restores the older behavior, (before jenkinsci#361, jenkinsci#125) where SlackListener run
the publish code after `isBuilding()` was false and the end message was:
```
test - jenkinsci#80 Success after 6 sec (Open)
```
@KreAch3R
Copy link
Contributor Author

@dshvedchenko can you test your environment with this commit?

@dshvedchenko
Copy link

@dshvedchenko can you test your environment with this commit

will do tomorrow, pls provide link to build

@KreAch3R
Copy link
Contributor Author

will do tomorrow, pls provide link to build

Thank you, here it is: correct-publish-time.slack-plugin.zip

@dshvedchenko
Copy link

job for Success notify with following configs
image
sends one
image


job for success/failur with cuystom success messages

image

sends only one message
image


job for message on started/on failure sends two messages
image


job that sends onstart/onsuccess

image

@dshvedchenko
Copy link

slack plugin :
image

@KreAch3R
Copy link
Contributor Author

@dshvedchenko Thanks for the detailed review! All the results look good and expected to me, did you find any problems with it?

@dshvedchenko
Copy link

@KreAch3R No issues with FreeStyleJob were found at my configs

@timja timja merged commit 8258946 into jenkinsci:master Jan 3, 2019
@jetersen
Copy link
Member

will do tomorrow, pls provide link to build

Thank you, here it is: correct-publish-time.slack-plugin.zip

Don't link to build like that, who knows what you put in that zip 😅

When the PR is open there is a HPI uploaded from ci.jenkins.io

See: https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fslack-plugin/detail/master/97/artifacts

@timja timja mentioned this pull request Jan 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants