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

Legacy services clean up #3367

Merged
merged 8 commits into from
Apr 27, 2019
Merged

Legacy services clean up #3367

merged 8 commits into from
Apr 27, 2019

Conversation

PyvesB
Copy link
Member

@PyvesB PyvesB commented Apr 27, 2019

This will hopefully allow us to close #2863!

@PyvesB PyvesB added core Server, BaseService, GitHub auth, Shared helpers documentation Developer and end-user documentation labels Apr 27, 2019
@shields-ci
Copy link

shields-ci commented Apr 27, 2019

Warnings
⚠️

This PR modified package.json, but not package-lock.json - Perhaps you need to run npm install?

Messages
📖 ✨ Thanks for your contribution to Shields, @PyvesB!
📖

Thanks for contributing to our documentation. We ❤️ our documentarians!

Generated by 🚫 dangerJS against 926f409

platan
platan previously approved these changes Apr 27, 2019
Copy link
Member

@platan platan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Should we do something with this?

// When the legacy services have been rewritten, all the code in here
// will go away, which should achieve this goal in a simpler way.
//
// Ref: https://github.com/badges/shields/pull/2755
function setCacheHeadersOnResponse(res, serviceOverrideCacheLengthSeconds) {

@PyvesB
Copy link
Member Author

PyvesB commented Apr 27, 2019

@platan I believe we'll be able to start work on rewriting the request handler now that the legacy services are gone. 😉

// Legacy services do not have a route.
}
const { base, format, pattern } = this.route
const queryParams = getQueryParamNames(this.route)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😁

@@ -1,288 +0,0 @@
# Tips for rewriting legacy services
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This document has a lot of good content related to best practices for new-style services. Rather than delete it, I'd like to rework it into a design document.

Could you reset this file and then we can deal with that in a follow on?

If you want you could add a note at the top that the document is out of date and needs to be updated, so people take it with a grain of salt.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -1,34 +0,0 @@
'use strict'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😁

@paulmelnikow
Copy link
Member

@PyvesB @platan I opened #3368 with a couple comments about rewriting the request handler.

@PyvesB PyvesB merged commit 2806eb8 into badges:master Apr 27, 2019
@shields-deployment
Copy link

This pull request was merged to master branch. This change is now waiting for deployment, which will usually happen within a few days. Stay tuned by joining our #ops channel on Discord!

After deployment, changes are copied to gh-pages branch:

@chris48s
Copy link
Member

bye bye stuff we don't need any more 👋

I find it slightly disappointing that this PR doesn't delete many hundreds of lines of terrible code we don't want any more, but maybe its a reflection of the fact that wrapping the legacy code up in LegacyService classes allowed us to clean a lot of core up in parallel with the service refactoring :)

@paulmelnikow
Copy link
Member

Ha! In part that is true though I think there is a lot of that yet to come. So far there are #3371 #3392, and there's #3368 #3328 #3329 yet to do… all of which has been blocking on this, more or less.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Server, BaseService, GitHub auth, Shared helpers documentation Developer and end-user documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Help wanted to finish refactoring services 🏆
5 participants