-
Notifications
You must be signed in to change notification settings - Fork 128
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
refactor: Do not rely on prototype.js #98
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for removing usages of Prototype from this plugin.
.../resources/net/uaznia/lukanus/hudson/plugins/gitparameter/javascript/git-parameter-select.js
Show resolved
Hide resolved
af48fbf
to
af09467
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Prototype migration is incomplete. For example, when running with the user experimental flag to disable Prototype, I see console log errors like this:
TypeError: $ is not a function
gitParameterUpdateSelect http://127.0.0.1/adjuncts/89a94610/net/uaznia/lukanus/hudson/plugins/gitparameter/javascript/git-parameter-select.js:7
<anonymous> http://127.0.0.1/adjuncts/89a94610/net/uaznia/lukanus/hudson/plugins/gitparameter/javascript/git-parameter-select.js:109
h http://127.0.0.1/static/89a94610/scripts/hudson-behavior.js:1937
refillOnChange http://127.0.0.1/static/89a94610/scripts/hudson-behavior.js:1961
<anonymous> http://127.0.0.1/adjuncts/89a94610/net/uaznia/lukanus/hudson/plugins/gitparameter/javascript/git-parameter-select.js:107
applySubtree http://127.0.0.1/static/89a94610/scripts/behavior.js:135
applySubtree http://127.0.0.1/static/89a94610/scripts/behavior.js:126
applySubtree http://127.0.0.1/static/89a94610/scripts/behavior.js:107
apply http://127.0.0.1/static/89a94610/scripts/behavior.js:90
start http://127.0.0.1/static/89a94610/scripts/behavior.js:85
onload http://127.0.0.1/static/89a94610/scripts/behavior.js:152
onload http://127.0.0.1/static/89a94610/scripts/behavior.js:152
addLoadEvent http://127.0.0.1/static/89a94610/scripts/behavior.js:151
createSearchBox http://127.0.0.1/static/89a94610/scripts/hudson-behavior.js:2420
<anonymous> http://127.0.0.1/adjuncts/89a94610/jenkins/views/JenkinsHeader/search-box.js:4
<anonymous> http://127.0.0.1/adjuncts/89a94610/jenkins/views/JenkinsHeader/search-box.js:6
Taking this back to draft so I can fix that problem. I'm looking at a few other things - should be back to this shortly. |
@basil Do you have ideas about how we could get the default user to have that flag? |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice so far! Just three more points and I should be ready to approve this.
.../resources/net/uaznia/lukanus/hudson/plugins/gitparameter/javascript/git-parameter-select.js
Outdated
Show resolved
Hide resolved
.../resources/net/uaznia/lukanus/hudson/plugins/gitparameter/javascript/git-parameter-select.js
Show resolved
Hide resolved
.../resources/net/uaznia/lukanus/hudson/plugins/gitparameter/javascript/git-parameter-select.js
Outdated
Show resolved
Hide resolved
.../resources/net/uaznia/lukanus/hudson/plugins/gitparameter/javascript/git-parameter-select.js
Show resolved
Hide resolved
Jenkins has been using a very old version of Prototype.js. Starting with 2.406 of Jenkins, prototype is being gradually removed. This change removes direct calls to prototype in the git-parameter plugin. Refs: JENKINS-71298
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job! All the changes from jenkinsci/jenkins#7982 appear to be ported correctly and interactive testing on 2.412 shows no regression in both the success and failure code paths.
CC @jenkinsci/core-security-review |
Released in 0.9.19. |
Jenkins has been using a very old version of Prototype.js. Starting with 2.406 of Jenkins, prototype is being gradually removed.
This change removes direct calls to prototype in the git-parameter plugin.
Refs: JENKINS-71298
Testing done
I've got another PR open (#97) that verifies the UI still works.
I ran the
find
command suggested in the ticket - and it only shows a call to jQuery left after this.Submitter checklist