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 usage of prototype.js #852

Open
timja opened this issue Aug 7, 2023 · 6 comments
Open

Remove usage of prototype.js #852

timja opened this issue Aug 7, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@timja
Copy link

timja commented Aug 7, 2023

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

@timja timja added the bug Something isn't working label Aug 7, 2023
@timja
Copy link
Author

timja commented Aug 21, 2023

@eyalbe4

We plan to remove prototype.js from Jenkins in the weekly line on October 3rd and in LTS most likely 15th November

@timja
Copy link
Author

timja commented Sep 29, 2023

fyi @yahavi

This plugin will break from next week in the weekly line.

@yahavi
Copy link
Member

yahavi commented Sep 30, 2023

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.

@timja
Copy link
Author

timja commented Sep 30, 2023

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.

@yahavi
Copy link
Member

yahavi commented Oct 2, 2023

Hi @timja,
It's still not working, even though we haven't made any modifications.
Who can lend us a hand with this? Thanks!

@timja
Copy link
Author

timja commented Oct 2, 2023

can you write steps to reproduce please and I can try have a look (fyi @basil if you have any ideas)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants