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

I refactored the project #78

Closed
wants to merge 44 commits into from

Conversation

DaniGuardiola
Copy link
Collaborator

@DaniGuardiola DaniGuardiola commented Jan 7, 2018

I refactored and modernized the whole codebase. The reason is that I plan on actively using this on my company and I would like to help maintain and extend the module in the future (for example, with the addition of aws EC2 and IAM auth support).

The main changes are:

  • Migrated to standardjs for simplicity (less boilerplate, more standard).
  • Using code up-to-date with the latest LTS Node version (v8), that allows ES6 and ES7 features like the spread operator and async / await syntax. Removed for node v6 compatibility.
  • Organized, commented and cleaned up a lot of little things.
  • The most notable design change is the use of an ES6 class that is not exported directly, but used to keep state. A method of the class called _createClient returns the 'client' object where all the features, methods and properties are explicitly exposed. The function that the module exports creates an instance of this class, creates a client through _createClient and returns it.

About breaking API changes, there are none except that the methods that are supposed to be private (like the legacy generateFunction, now called _generateFeature, and similar) are now actually private.

All the tests are passing and coverage is the same, only one non-critical test is outdated because of design changes, pending a rewrite that shouldn't block progress.

All package.json scripts tested and I even played around a little bit with the examples.

Some pending stuff:

  • Refactor features.js a bit
  • Deeper refactor (most formal logic is untouched)
  • Make sure everything is documented and clear
  • Other stuff that will be added down in the comments

Let me know what you think :)

@DaniGuardiola
Copy link
Collaborator Author

Ideally, I would like to finish the last details and send another pull request to finish the whole refactor. After that my plan is to add a better authentication interface with different backends (token, IAM, EC2) and automating it at most levels even getting the role credentials, instance id, etc through the instance metadata service and such, signing, sending the signed request to vault and so on.

@DaniGuardiola
Copy link
Collaborator Author

DaniGuardiola commented Jan 7, 2018

I just saw your 'Modernize' project on the repo.

In this PR, the use ES6 syntax step is already done and the provide better documentation is on the way.

I would like to understand how you pretend to achieve this: split into smaller packages i.e. what would you like to split in specific.

I still need to understand how mustache and the requests work for your last two points, but if you can give me a TL;DR summary that would really facilitate things, thank you!

These are the last two points, just for reference:

  • use tagged template literals instead mustache
  • use r2 instead of full-blown request + request-native-promise package

@DaniGuardiola
Copy link
Collaborator Author

BTW I also think that the integration tests need a bit more stress, i.e. storing and retrieving values, changing configurations and testing if the changes where effective and so on.

@DaniGuardiola
Copy link
Collaborator Author

PD: I think I broke codecov, help! :S

@DaniGuardiola DaniGuardiola changed the title Refactor I refactored the whole thing Jan 7, 2018
@DaniGuardiola DaniGuardiola changed the title I refactored the whole thing I refactored the project Jan 7, 2018
@DaniGuardiola
Copy link
Collaborator Author

@kr1sp1n any comments? :)

@jhnlsn
Copy link

jhnlsn commented Jun 25, 2018

@kr1sp1n +1 approving changes so this can be merged in

@DaniGuardiola
Copy link
Collaborator Author

DaniGuardiola commented Jun 25, 2018 via email

@jhnlsn
Copy link

jhnlsn commented Jun 25, 2018

I was not trying to put any pressure, and I really appreciate the work being done here! Just wanted to relate that I too was looking out for this to get merged in. Again, thanks for your time maintaining this! it's one of those low level SDKs that gets used by many maintained by few.

@darkobits
Copy link

Hey guys, thanks for all the hard work you've put into this project thus far. 👏

Let's get this merged! 🎉

@DaniGuardiola
Copy link
Collaborator Author

DaniGuardiola commented Jul 26, 2018

Hey @kr1sp1n what do you say we set a datetime for a call one of these weekends and we get it done in two hours by working in sync?

It could be useful to also brainstorm more features and improvements for future versions.

@kr1sp1n
Copy link
Collaborator

kr1sp1n commented Jul 26, 2018

Hey @DaniGuardiola I think it's a great idea for getting things done but unfortunately I prepare myself for a big journey that starts in August. So no time at all 😢 Maybe you could fix and merge that stuff you wrote by yourself? Would be great!

@DaniGuardiola
Copy link
Collaborator Author

@kr1sp1n gotcha, will see what I can do then. I still need you for the npm release!

@kr1sp1n
Copy link
Collaborator

kr1sp1n commented Jul 26, 2018

@DaniGuardiola I will do the release after you have finished the merge 😉

@GeoffreyBooth
Copy link

It's possible for multiple people to have access to push versions to NPM: https://docs.npmjs.com/cli/owner

@kr1sp1n
Copy link
Collaborator

kr1sp1n commented Jul 26, 2018

@GeoffreyBooth thanks for the hint 😜
Ok, @DaniGuardiola what's your npm user name?

@DaniGuardiola
Copy link
Collaborator Author

@kr1sp1n
Copy link
Collaborator

kr1sp1n commented Jul 26, 2018

@DaniGuardiola done ✅

@jhnlsn
Copy link

jhnlsn commented Aug 13, 2018

Does this mean a merge is close? Any way I could help here? about to start a project and would love to use the refactored version instead of the old one.

@DaniGuardiola
Copy link
Collaborator Author

@jhnlsn yes, a merge is close. I need to find time.

However, the interface will remain the same so don't worry, you can use the current version and this refactored version should work as a drop-in replacement when it's out in NPM.

@EZEDSEA
Copy link

EZEDSEA commented Jun 28, 2019

Is this merge still happening?

@longnguyen1997
Copy link

I don't think it's going to happen.

@briananstett
Copy link

briananstett commented Dec 6, 2019

@DaniGuardiola Do you have any updates on this merge? This is a project I'd like to contribute to but I'm not sure if I should be making my changes to the current project's master or this fork (which will be eventually be merged in)

Any advice would be great.

@bfaulk96
Copy link

This thread is incredibly frustrating seeing so many affirmations that this would get merged followed by no action 😆😅

@jhnlsn
Copy link

jhnlsn commented Jun 23, 2021

@bfaulk96 it might make sense to fork off of this project since it looks like it's been abandoned at this point. I wouldn't mind taking that on.

@bfaulk96
Copy link

bfaulk96 commented Jun 23, 2021

@jhnlsn I don't know that I could commit to keeping it updated consistently, but I imagine I could at the very least take a look more than once every 6 months and merge simple PRs that have been neglected here 😆

@DaniGuardiola has a lot of GH contributions even as recently as May and June, so I feel like it's safe to say this project is no longer a priority

@longnguyen1997
Copy link

longnguyen1997 commented Jun 23, 2021

thx boys, this has been interesting to see two years later haha

hope it works out! I gave up all hope of seeing this merged, but excited to see your fork!

@bfaulk96
Copy link

thx boys, this has been interesting to see two years later haha

hope it works out! I gave up all hope of seeing this merged, but excited to see your fork!

Funny enough, I just stumbled onto this PR.
My org is currently having an issue with a different PR; A JS max call stack exceeded error that has a tiny fix submitted in February and never merged. Either way, it's very clear that this repo could use some love, even if that means it must be forked.

@jhnlsn
Copy link

jhnlsn commented Jun 23, 2021

@kr1sp1n is the current maintainer of this project. I'll give a final 24 hours to see if he is willing to hand over the project in the current repo. At that point i'll go ahead and fork into an org and move forward. I own other open source projects etc so don't mind carrying the torch for this one if need be, we can fan out to other maintainers too.

@bfaulk96
Copy link

Worth noting that @kr1sp1n merged the PR I mentioned him in, so he is around 😄
Maybe we could request some more maintainers be added to help with the workload and keep this maintained a bit more?

@jhnlsn
Copy link

jhnlsn commented Jun 23, 2021

I guess he is still around. Just saw a flurry or fixes in the past hour.

@DaniGuardiola
Copy link
Collaborator Author

I have different priorities and not a lot of time to look into this nowadays, but if anyone wants to pick this up I'd be happy to help review it and get it merged. I just won't be able to work on it directly. Something critical, though, will be back porting all fixes and features that were added on master since this branch was last updated.

@aviadhahami
Copy link
Collaborator

aviadhahami commented Nov 10, 2022

Hi @DaniGuardiola, the PR is stale for a while now and also conflicting.

I'm also doing cleanup now, so I will be closing the PR in the meantime.

Feel free to re-open it when you have the time to work on this again :)

@DaniGuardiola
Copy link
Collaborator Author

@aviadhahami got it.

I maintain my disposition to help merge this if someone's up to the task. @aviadhahami you seem to be a new maintainer around here? Would you be down to leading this effort? :)

@aviadhahami
Copy link
Collaborator

I am indeed a new maintainer here - hi :)

I'll touch all relevant tickets in lowest-hanging-fruit order, and then I'll go for the refactor

Was mainly doing clutter cleanup thus far

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.