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

Faster way to add roles #468

Merged
merged 3 commits into from
May 8, 2018
Merged

Faster way to add roles #468

merged 3 commits into from
May 8, 2018

Conversation

v-kumar
Copy link
Contributor

@v-kumar v-kumar commented Nov 14, 2017

This method is much faster than role_ids |= [role.id].

.include? does a fast exists check without having to load all the ids. The slowness is not in the insert, but in loading all the role_ids, which is not needed here.

This method is much faster than `role_ids |= [role.id]`.

.include? does a fast exists check without having to load all the ids.
Copy link
Member

@EppO EppO left a comment

Choose a reason for hiding this comment

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

LGTM

@EppO
Copy link
Member

EppO commented Nov 20, 2017

Hi @v-kumar,

the test suite is not kicking off on Travis-ci that raises a "Abuse detected" error. I got in touch with Travis-ci support that told me the organization you used (Ogwee) to create the fork never logged in Travis-ci and may have trigger this false positive in their abuse detection process.
Here is the communication I had with them:

Thanks for writing in and sorry for the troubles.

I've been looking into these rejected requests and I see that the Ogwee organization nor any of its members have been never logged into Travis CI and this is why we are currently blocking these requests that come from Ogwee's' fork of the RolifyCommunity/rolify repository. Sorry for the inconvenience.

We are looking into fixing this false positive in our abuse detection system, as we don't feel that an organization or account should have to create a Travis account when working with another project that is using Travis CI.

To sort this out in the meantime, do you know who manages this organization and do you think one of their members could try to log into Travis CI at least once at https://travis-ci.org/ and try closing and reopen one of the rejected Pull Requests?

Please let us know the result and we would be happy to have another look if it's still not working.

Thanks in advance and have a great day!

Best,
Carla

Can you try to login with your github account on Travis to unblock the PR? Or if you can't/don't want to, you can re-create a fork using your personal account, not the Ogwee organization, that maybe would do the trick.

Thanks

@v-kumar
Copy link
Contributor Author

v-kumar commented Feb 9, 2018

Hi @EppO

Sorry, it took a while for me to see your earlier message.

I just granted the access to travis-ci.

You should be all set now.

Let me know once this gets merged,

@coveralls
Copy link

coveralls commented Feb 9, 2018

Coverage Status

Coverage remained the same at 93.089% when pulling 93d590b on Ogwee:master into 154748c on RolifyCommunity:master.

3 similar comments
@coveralls
Copy link

coveralls commented Feb 9, 2018

Coverage Status

Coverage remained the same at 93.089% when pulling 93d590b on Ogwee:master into 154748c on RolifyCommunity:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 93.089% when pulling 93d590b on Ogwee:master into 154748c on RolifyCommunity:master.

@coveralls
Copy link

coveralls commented Feb 9, 2018

Coverage Status

Coverage remained the same at 93.089% when pulling 93d590b on Ogwee:master into 154748c on RolifyCommunity:master.

@thomas-mcdonald
Copy link
Member

thomas-mcdonald commented Apr 14, 2018

I'm investigating similar performance issues with one of our applications, it would be great to get this merged in. Is there anything I can do to help this land?

@v-kumar
Copy link
Contributor Author

v-kumar commented May 7, 2018

The CI failed because it ran out of time. Can we please get this merged?

@EppO

@EppO EppO merged commit 99ec022 into RolifyCommunity:master May 8, 2018
@EppO
Copy link
Member

EppO commented May 8, 2018

Merge done. Thanks for you PR. really appreciated

@dprater
Copy link

dprater commented Apr 22, 2019

Looks like this PR has been merged into the master branch, but it's not in the latest gem release (5.2.0), and it's not even tagged. The only way for us to get this fix (which is very important for us - we're seeing 60+ seconds for role creations in some cases) is to point our Gemfile at this specific commit, which we'd prefer not to do if possible. We'd like to at least be able to point at a specific release (although ideally you'd just create a tag and then push that tag to rubygems to make the fix available to everyone). Any way a new gem release could be done, or at least a new tagged release in GitHub we could point to?

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.

5 participants