Skip to content

Fix source="*" with HyperlinkedModelSerializer #5138

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

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented May 16, 2017

For #5137.

Closes #5137

self.maxDiff = None

self.assertEqual(unicode_repr(TestSerializer()), expected)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The test should be moved to TestStarredSource in tests/test_serializer.py maybe.

@tomchristie tomchristie added this to the 3.6.4 Release milestone May 16, 2017
@tomchristie tomchristie merged commit a8e527a into encode:master May 16, 2017
@tomchristie
Copy link
Member

Nice one. Thank you!

@blueyed
Copy link
Contributor Author

blueyed commented May 16, 2017

@tomchristie
This was meant to be squashed..
Now there are three commits instead of one, and one even make git-bisect harder..!

@blueyed blueyed deleted the fix-star-source-with-HyperlinkedModelSerializer branch May 16, 2017 12:02
@xordoquy
Copy link
Collaborator

@blueyed maybe not. Whether you end up with one commit or another, you get the associated PR which will give you the context.

@blueyed
Copy link
Contributor Author

blueyed commented May 16, 2017

?

I certainly meant it to be squashed.. what does "Possible fix" or a "fixup!" (meant for git's autosquashing) have to do in a project's history?

Also there are 3 times more commits when git-bisecting (which I've used to debug this issue itself), and one of them needs to be skipped/ignored when running all tests.

@blueyed
Copy link
Contributor Author

blueyed commented Jun 21, 2017

@tomchristie @xordoquy @jpadilla
Any feedback on my previous comment?

I think (especially with widely-used projects) the history of the master branch should be kept clean (for reviewers, git-bisect etc).

This also includes squashing single-commit PRs, instead of merging them.

@xordoquy
Copy link
Collaborator

xordoquy commented Jun 21, 2017

There are a lot of arguments one way or another. Sometime it's better to have several more atomic commits to have a better understanding and I like much better merging rather than rebasing because it keeps the commit uuid which helps me to know whether a branch has been merged or not and makes it easier in an heavily distributed env.

To conclude, my thoughts on that are that it's been merged so it's history now and I doubt the extra work is worth it.

@xordoquy
Copy link
Collaborator

Additional side note, the commit itself isn't so much important as it leads to the PR anyway.
09f62e1 has a nice master (#5138) tag which leads to the full discussion here. Much more useful than a simple commit.

@blueyed
Copy link
Contributor Author

blueyed commented Jun 21, 2017

@xordoquy
Yes, the history of this PR cannot be changed of course, but my call was to have maintainers agree on some consensus in this regard.

And also raising awareness that commits with a "fixup!" prefix should not get merged as-is in general.

Re 09f62e1: the commit message "Possible fix" is very bad (even worse than some "fixup!"-prefixed one).
And on GitHub you get the PR reference also for squashed commits (of course).

@xordoquy
Copy link
Collaborator

The PR makes sense. It has a well described context through the linked issue as well as a test case.
You did a very good job with this PR.
I'll probably take some attention to the commit messages from now on but we also have to balance that with the fact that requesting too much for contribution will turn some contributors away from the project and OSS in general could do with more contributors.

@blueyed
Copy link
Contributor Author

blueyed commented Jun 21, 2017

@xordoquy
Thanks.
In this case it should have been just squashed using the GitHub UI, in which case there is no extra effort required from the contributor - except for their local branch not being easily identified as being merged.
If there is uncertainty then it is best from my experience to ask for squashing and force-pushing from the maintainer, if they want to do it.

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

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy