Remove usage of prototype.js
timja opened this issue · comments
Describe the bug
See this blog post for details. Prototype will soon be removed from Jenkins core, and 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.
To Reproduce
In this plugin, the following usages of Prototype have been identified. This may not be an exhaustive list:
lib/jfrog/promotions/promotions.js: target = spinner.next();
lib/jfrog/repos/repos.js: credentialsId = $(credentialsInput).down('select').value;
lib/jfrog/repos/repos.js: let spinner = $(button).up("DIV").next();
lib/jfrog/repos/repos.js: let target = spinner.next();
lib/jfrog/repos/repos.js: let target = spinner.next();
lib/jfrog/repos/repos.js: let warning = target.next();
lib/jfrog/repos/repos.js: let warning = target.next();
lib/jfrog/repos/repos.js: overrideCredentials = legacyInput.down('input[type=checkbox]').checked;
lib/jfrog/repos/repos.js: password = legacyInput.down('input[name=_.password]').value;
lib/jfrog/repos/repos.js: target.addClassName('error');
lib/jfrog/repos/repos.js: target.removeClassName('error');
lib/jfrog/repos/repos.js: username = legacyInput.down('input[name=_.username]').value;
Expected behavior
No usages of prototype
Screenshots
If applicable, add screenshots to help explain your problem.
Versions
- Jenkins Artifactory plugin version:
- Jenkins operating system:
- Artifactory Version:
Additional context
This was originally posted here: https://issues.jenkins.io/browse/JENKINS-71671
We plan to remove prototype.js from Jenkins in the weekly line on October 3rd and in LTS most likely 15th November
fyi @yahavi
This plugin will break from next week in the weekly line.
Thanks, @timja.
We've created #889 to remove the usage of prototype.js from the plugin. However, I'm still uncertain about how to handle Javascript binding. For instance:
Javascript:
https://github.com/jfrog/jenkins-artifactory-plugin/blob/artifactory-3.18.10/src/main/resources/lib/jfrog/repos/repos.js#L49
Java binding:
https://github.com/jfrog/jenkins-artifactory-plugin/blob/artifactory-3.18.10/src/main/java/org/jfrog/hudson/ivy/ArtifactoryIvyFreeStyleConfigurator.java#L453
These requests are resulting in a 500 error.
unsure off the top of my head, there is supposed to be shims in there to make it work out of the box without any changes from what I remember.
Hi @timja,
It's still not working, even though we haven't made any modifications.
Who can lend us a hand with this? Thanks!
can you write steps to reproduce please and I can try have a look (fyi @basil if you have any ideas)