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

Remove usages of Prototype from Fortify #64

Closed
basil opened this issue May 18, 2023 · 9 comments
Closed

Remove usages of Prototype from Fortify #64

basil opened this issue May 18, 2023 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@basil
Copy link
Member

basil commented May 18, 2023

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
Copy link
Member Author

basil commented Jun 29, 2023

@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
Copy link
Contributor

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

@basil
Copy link
Member Author

basil commented Jul 26, 2023

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
Copy link
Contributor

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
Copy link
Member

timja commented Aug 21, 2023

@akaryakina

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

@akaryakina
Copy link
Contributor

akaryakina commented Aug 22, 2023

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
Copy link
Contributor

@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?

@akaryakina akaryakina self-assigned this Nov 2, 2023
@akaryakina akaryakina added the enhancement New feature or request label Nov 2, 2023
@basil
Copy link
Member Author

basil commented Nov 2, 2023

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
Copy link
Contributor

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants