jenkinsci / fortify-plugin

Fortify Jenkins plugin
https://plugins.jenkins.io/fortify
Other
23 stars 31 forks source link

Remove usages of Prototype from Fortify #64

Closed basil closed 1 year ago

basil commented 1 year ago

See this blog post for details. Prototype will eventually be removed from Jenkins core. To prepare for this transition, this plugin must be migrated away from Prototype. The blog post contains instructions on how to find and eliminate usages of Prototype. In this plugin, the following usages of Prototype have been identified. This may not be an exhaustive list:

./src/main/webapp/refresh-projects.js:38:    new Ajax.Request(url, {
./src/main/webapp/refresh-projects.js:105:    new Ajax.Request(url, {
./src/main/webapp/refresh-projects.js:146:    paramList.split(',').each(function(name) {
./src/main/webapp/refresh-projects.js:170:    new Ajax.Request(url, {
./src/main/webapp/refresh-projects.js:237:    new Ajax.Request(url, {
./src/main/webapp/refresh-issues.js:25:                 new Ajax.Request(urlLink, {
./src/main/webapp/refresh-issues.js:65:            new Ajax.Request(contextUrl+"/checkUpdates?stamp="+stamp,{
./src/main/webapp/refresh-issues.js:68:                    var update = rsp.getResponseHeader('go');
./src/main/webapp/refresh-issues.js:82:            new Ajax.Request(contextUrl+"/ajaxStats",{
./src/main/webapp/refresh-issues.js:95:            new Ajax.Request(contextUrl+"/ajaxIssues",{
./src/main/webapp/refresh-issues.js:108:            new Ajax.Request(url,{
./src/main/webapp/refresh-issues.js:125:               var request = new Ajax.Request(contextUrl+"/ajaxIssues?firstTime=yes",{
./src/main/resources/com/fortify/plugin/jenkins/ChartAction/floatingBox.jelly:26:            new Ajax.Request("${action.urlName}/checkUpdates?stamp="+stamp,{
./src/main/resources/com/fortify/plugin/jenkins/ChartAction/floatingBox.jelly:29:                    var update = rsp.getResponseHeader("go");

CC @akaryakina

basil commented 1 year ago

@akaryakina Gentle ping. It would be great to remove usages of Prototype from this plugin, as otherwise it will break when we eventually remove Prototype from Jenkins core.

akaryakina commented 1 year ago

Thank you @basil. We'll put it on our schedule. How much time do we have?

basil commented 1 year ago

We will most likely remove Prototype from Jenkins core within 3-6 months, possibly for the LTS release after 2.414 LTS (itself yet to be released) in 3 months, or if not that LTS then the one after that in 6 months.

akaryakina commented 1 year ago

We will most likely remove Prototype from Jenkins core within 3-6 months, possibly for the LTS release after 2.414 LTS (itself yet to be released) in 3 months, or if not that LTS then the one after that in 6 months.

Thank you very much for notifying us! We'll try to address it in 23.1.40 (the one after the next release) within the next 3 months.

timja commented 1 year ago

@akaryakina

We plan to remove it in the weekly line on October 3rd and in LTS most likely 15th November

akaryakina commented 1 year ago

We plan to remove it in the weekly line on October 3rd and in LTS most likely 15th November

@timja Thanks for the update! We're going to plan our next release in November.

akaryakina commented 1 year ago

@basil Thank you for the detailed directions on the Prototype removal. I remember seeing one of the articles that offered a code review after converting to Fetch API, but now I can't find it anymore... Do you by any chance know a reference to some place (maybe a gitter channel?) where I could ask for assistance?

basil commented 1 year ago

There are 22 completed pull requests in Jenkins core that illustrate how to do this, as well as many more in plugins (see links in this spreadsheet). In the unlikely case that you run into some unprecedented scenario you can always post to the developer mailing list.

akaryakina commented 1 year ago

@basil Thank you for the references! Wow, that's super useful, I didn't think to search for the log message. And I'm sorry that I wasn't clear when I asked. I have already finished the removal a few days ago, tested the changes manually and even merged them into master. I was looking for a place where I could ask for a code review, but I guess I can try a developer mailing list, indeed. Thanks!