-
Notifications
You must be signed in to change notification settings - Fork 36
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
extract Servlet functionality into sse-common module for reuse #23
base: master
Are you sure you want to change the base?
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.
Looking great Jordan ... I'll try take it for a spin later.
sse-gateway/package.json
Outdated
}, | ||
"homepage": "https://github.com/jenkinsci/sse-gateway-plugin", | ||
"dependencies": { | ||
"@jenkins-cd/sse-gateway": "0.0.21" |
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.
Maybe you can use the relative dep for this + as a devDependency
e.g. same as in sse-gateway-sample/package.json
.
"@jenkins-cd/sse-gateway": "../"
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.
With that though, you might want to get the maven clean
task to wipe node_modules/@jenkins-cd/sse-gateway
.
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.
Done and done. Not sure how sse-gateway-sample worked before, I assume it had a stale copy of sse-gateway already present.
sse-gateway/package.json
Outdated
@@ -23,7 +23,7 @@ | |||
}, | |||
"homepage": "https://github.com/jenkinsci/sse-gateway-plugin", | |||
"dependencies": { | |||
"@jenkins-cd/sse-gateway": "0.0.21" | |||
"@jenkins-cd/sse-gateway": "../sse-gateway-client" |
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.
It probably doesn't matter too much in this case, but I guess this really is a devDependencies
since it's only there to service unit tests.
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.
Updated.
Blue Ocean CI run using these changes ... https://ci.blueocean.io/job/blueocean/job/sse-gateway-pr23-verify/ |
@jordanglassman I think we need a few more tweaks to the poms. The root/parent pom prob shouldn't have he plugin parent pom as it's parent. See the last commit on https://github.com/tfennelly/sse-gateway-plugin/tree/jordanglassman-ANALYTICS-682. Those tweaks cause compile errors in commons because it's no longer able to get some of the deps it needs (that it was getting from the plugin parent pom). |
@tfennelly are you saying that you want to import all these deps individually, rather than transitively via jenkins-core? sse-common still has a couple of hudson.* imports, so I think jenkins-core is needed in any case. |
Had to roll back java version in sse-gateway based on parent pom enforcer settings. |
@jordanglassman what are the hudson deps? |
Mostly in the EventDispatcher classes: Only used in tests: Want me to try to factor all of this stuff out into other classes? I think it should be possible. |
@jordanglassman yeah ... I think ideally the pubsub and sse "common" modules should have no Jenkins deps what so ever. So maybe it means that, after all, we do need a separate pubsub module that becomes the pubsub commons. Then maybe the pubsub Jenkins plugin could define the Guava bus implementation. Would need to look at the code, but maybe you know what I mean. |
return; | ||
} | ||
|
||
try { | ||
SimpleMessage message = new SimpleMessage() | ||
.setChannelName("sse") | ||
.set("jenkins_channel", "sse") |
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.
A lot of special tweaks like this were needed to avoid the need to update the client.
blueocean-plugin acceptance tests currently hanging in the nightwatch section, even with the existing version of sse-gateway/pubsub-light. Going to try rolling it back a bit. |
Description
Extracts the pieces of the Endpoint class into a common module for reuse elsewhere.
Reviewer should verify no regressions with existing, unchanged test suite as well as the new unit tests. Smoke test by installing the plugin and the sse-gateway-sample, to verify functionality.
Submitter checklist
Reviewer checklist