Skip to content
New issue

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

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

Already on GitHub? # to your account

Installing plugins was flaky #1318

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

jtnord
Copy link
Member

@jtnord jtnord commented Aug 9, 2023

it has been observed that plugin installation was flaky as the installation clicked the button but then immediately looked like there where no plugins to update.

the HAR showed that the response to the install POST had not finished and then the GET call to the UpdateCenter was made. As the previous call had not completed, there where no installation jobs present and so deemed that there was nothing to wait for. the check then fails as the plugin has not infact been installed

e.g.

java.lang.IllegalArgumentException: workflow-multibranch plugin not installed
	at org.jenkinsci.test.acceptance.po.Plugin.<init>(Plugin.java:49)
	at org.jenkinsci.test.acceptance.po.Jenkins.getPlugin(Jenkins.java:214)
	at org.jenkinsci.test.acceptance.po.UpdateCenter.waitForInstallationToComplete(UpdateCenter.java:98)
	at org.jenkinsci.test.acceptance.po.PluginManager.installPlugins(PluginManager.java:259)
	at org.jenkinsci.test.acceptance.junit.WithPlugins$RuleImpl$1.installPlugins(WithPlugins.java:191)

clicking anything that changes URL based on javascript (or does anything dynamic in JS) is going to be flaky - I think it is time to revert 5606d3b

Testing done

None.

Submitter checklist

Preview Give feedback

it has been observed that plugin installation was flaky as the
installation clicked the button but then immediatly looked like there
where no plugins to update.

the HAR showed that the response to post the install had not finished
and then the call to the UpdateCenter was made and as the previous call
had not completed, there where no installation jobs present and so
deeemed that there was nothing to wait for.  the check then fails as the
plugin has not infact been installed

```
java.lang.IllegalArgumentException: workflow-multibranch plugin not installed
	at org.jenkinsci.test.acceptance.po.Plugin.<init>(Plugin.java:49)
	at org.jenkinsci.test.acceptance.po.Jenkins.getPlugin(Jenkins.java:214)
	at org.jenkinsci.test.acceptance.po.UpdateCenter.waitForInstallationToComplete(UpdateCenter.java:98)
	at org.jenkinsci.test.acceptance.po.PluginManager.installPlugins(PluginManager.java:259)
	at org.jenkinsci.test.acceptance.junit.WithPlugins$RuleImpl$1.installPlugins(WithPlugins.java:191)
```
@jtnord jtnord requested review from jglick and timja August 9, 2023 11:29
@jtnord jtnord enabled auto-merge (squash) August 9, 2023 11:40
@jtnord jtnord merged commit bf1ceb4 into jenkinsci:master Aug 9, 2023
@jtnord jtnord added the bug label Aug 9, 2023
}
}
}

// Jenkins will be restarted if necessary
boolean hasBeenRestarted = new UpdateCenter(jenkins).waitForInstallationToComplete(specs);
if (!hasBeenRestarted && specs.length > 0 && jenkins.getVersion().isNewerThan(new VersionNumber("2.188"))) {
Copy link
Member Author

Choose a reason for hiding this comment

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

supported Jenkins for the ath are passed this version now, so removed this condition whilst I was here.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant