Seems like I need write-access to merge a PR
Hi, It's been a lifetime since I last worked on Boost, and I'm lost as to the current procedures with the repository. I've been looking into this open ticket: https://svn.boost.org/trac10/ticket/12972 and noticed this open pull request: https://github.com/boostorg/numeric_conversion/pull/7 but even though I'm logged with my Github account, it appears I don't have write-access to merge this PR. I tried the wiki but seems to have way too much information. Can you simplify the steps needed, these days, to fix a bug on a library? specially if someone else already created a PR as in this case? TIA -- Fernando Cacciola SciSoft Consulting, Founder http://www.scisoft-consulting.com
On Wed, Oct 25, 2017 at 11:03 AM, Fernando Cacciola via Boost
but even though I'm logged with my Github account, it appears I don't have write-access to merge this PR.
I'm not a fan of using the GitHub web interface to merge pull requests because this needlessly creates a "merge commit" (usually with one side of the merge having just one commit) which interferes with a linear history (I prefer a linear history except for when there are two ongoing topical branches that are merged at some point).
Can you simplify the steps needed, these days, to fix a bug on a library? specially if someone else already created a PR as in this case?
The workflow I use is as follows: * Fork the upstream repository (Press Fork in the top right of the GitHub interface) * Clone your fork locally using the command line git clone git@github.com:fcacciola/numeric_conversion.git * Add a remote for the user submitting the pull request git remote add blowaxd git@github.com:BlowXD/numeric_conversion.git * Fetch the remote repository git remote fetch blowaxd * Cherry-pick or fast-forward merge the changes into the main branch cd <local-repo-dir> git checkout master git merge --ff-only blowaxd/fix-compiling # OR git cherry-pick blowaxd/fix-compiling There are a lot of tutorials on how to use git from the command line I suggest studying them, it is an ongoing educational process. The Git workflow is very helpful for people that collaborate. Git is very powerful and quite a useful tool, I believe it has longevity. Thanks
On Wed, Oct 25, 2017 at 2:17 PM, Vinnie Falco via Boost < boost@lists.boost.org> wrote:
On Wed, Oct 25, 2017 at 11:03 AM, Fernando Cacciola via Boost
wrote: but even though I'm logged with my Github account, it appears I don't have write-access to merge this PR.
I'm not a fan of using the GitHub web interface to merge pull requests because this needlessly creates a "merge commit" (usually with one side of the merge having just one commit) which interferes with a linear history (I prefer a linear history except for when there are two ongoing topical branches that are merged at some point).
Vinnie, have you tried using the "Rebase and Merge" option in github? It eliminates the merge, but it does make a new commit ID. If you're not working on a commit pipeline, this option will make things a bit easier. - Jim
On Wed, Oct 25, 2017 at 11:26 AM, James E. King, III via Boost
Vinnie, have you tried using the "Rebase and Merge" option in github? It eliminates the merge, but it does make a new commit ID.
I've tried all of them and I don't like any of the automated means of merging pull requests. I don't merge code until I have brought it on to my machine and compiled / ran tests. Then once it is on my machine there is no need to use the GitHub interface because I can simply push it.
On Wed, Oct 25, 2017 at 2:50 PM, Vinnie Falco via Boost < boost@lists.boost.org> wrote:
On Wed, Oct 25, 2017 at 11:26 AM, James E. King, III via Boost
wrote: Vinnie, have you tried using the "Rebase and Merge" option in github? It eliminates the merge, but it does make a new commit ID.
I've tried all of them and I don't like any of the automated means of merging pull requests. I don't merge code until I have brought it on to my machine and compiled / ran tests. Then once it is on my machine there is no need to use the GitHub interface because I can simply push it.
Doesn't this defeat the purpose of using Appveyor and Travis, or do you have additional tests that take too long for CI builds to be useful? If you keep some tests to yourself, the process of vetting new code changes from outside becomes unmaintainable. One of the beautiful things about having CI based unit testing is that it enables anyone to safely work on making changes to your project without you needing to lift a finger until all the builds pass. That's efficient. - Jim
On Wed, Oct 25, 2017 at 12:12 PM, James E. King, III via Boost
Doesn't this defeat the purpose of using Appveyor and Travis, or do you have additional tests that take too long for CI builds to be useful? If you keep some tests to yourself, the process of vetting new code changes from outside becomes unmaintainable.
My motto is "Trust in God, but always run the tests locally." There are security considerations here, so I make sure that my workflow always brings external submissions through my own machine where I can inspect it with a debugger and my own two eyes. I am strongly opposed to any "farm to market" system since that could lead to being lazy.
On Wed, Oct 25, 2017 at 3:36 PM, Vinnie Falco via Boost < boost@lists.boost.org> wrote:
On Wed, Oct 25, 2017 at 12:12 PM, James E. King, III via Boost
wrote: Doesn't this defeat the purpose of using Appveyor and Travis, or do you have additional tests that take too long for CI builds to be useful? If you keep some tests to yourself, the process of vetting new code changes from outside becomes unmaintainable.
My motto is "Trust in God, but always run the tests locally." There are security considerations here, so I make sure that my workflow always brings external submissions through my own machine where I can inspect it with a debugger and my own two eyes. I am strongly opposed to any "farm to market" system since that could lead to being lazy.
Sounds like, "write once, debug everywhere". :) This development philosophy makes sense to me for a new project. It is not scalable into maintenance mode during which other folks are typically enabled. For example, if the CMT picked up a project which had no CI builds and no measurement of code coverage on the unit tests, and they don't have the secret formula that the maintainer was using to vet code changes, they have to reinvent the wheel. If however the original author sets up a robust CI environment with code coverage metrics, the CMT would be able to understand what expectations for quality submissions are at a minimum. This can be further improved with static code analysis (cppcheck, Coverity Scan) as well as -fsanitize type builds and valgrind-type builds. What I said previously is not intended as a replacement for a thorough code review. Someone should always inspect every line of code change for security, practicality, and performance related issues. If we all make as much of our baseline quality requirements as automated as possible, the maintainability of the entire codebase going into the future becomes easier. We are certainly aligned on providing quality product, no matter what the method. I think everyone would agree this is good for any project. - Jim
On Wed, Oct 25, 2017 at 12:50 PM, James E. King, III via Boost
If however the original author sets up a robust CI environment with code coverage metrics, the CMT would be able to understand what expectations for quality submissions are at a minimum. This can be further improved with ... -fsanitize type builds and valgrind-type builds.
Beast has code coverage: https://codecov.io/gh/boostorg/beast/branch/master And per-commit sanitizer builds on CI: https://travis-ci.org/vinniefalco/beast/jobs/292759959#L2812 And per-commit valgrind builds on CI: https://travis-ci.org/vinniefalco/beast/jobs/292759958#L1399 On Travis the tests are run with gdb so in the event of a failure a stacktrace is generated. Thanks
On Wed, Oct 25, 2017 at 4:36 PM, Vinnie Falco via Boost < boost@lists.boost.org> wrote:
On Wed, Oct 25, 2017 at 12:50 PM, James E. King, III via Boost
wrote: If however the original author sets up a robust CI environment with code coverage metrics, the CMT would be able to understand what expectations for quality submissions are at a minimum. This can be further improved with ... -fsanitize type builds and valgrind-type builds.
Beast has code coverage:
https://codecov.io/gh/boostorg/beast/branch/master
And per-commit sanitizer builds on CI:
https://travis-ci.org/vinniefalco/beast/jobs/292759959#L2812
And per-commit valgrind builds on CI:
https://travis-ci.org/vinniefalco/beast/jobs/292759958#L1399
On Travis the tests are run with gdb so in the event of a failure a stacktrace is generated.
Nice! It would be neat to have valgrind as a standard bjam build option, as a test wrapper. I haven't used codecov.io yet, but I would like to. I tried to use coveralls but it didn't generate any coverage for header-only libraries? Thanks, - Jim
AMDG On 10/25/2017 02:42 PM, James E. King, III via Boost wrote:
On Wed, Oct 25, 2017 at 4:36 PM, Vinnie Falco via Boost < boost@lists.boost.org> wrote:
And per-commit valgrind builds on CI:
https://travis-ci.org/vinniefalco/beast/jobs/292759958#L1399
On Travis the tests are run with gdb so in the event of a failure a stacktrace is generated.
Nice! It would be neat to have valgrind as a standard bjam build option, as a test wrapper.
There's a generic option for this: b2 testing.launcher=valgrind
I haven't used codecov.io yet, but I would like to. I tried to use coveralls but it didn't generate any coverage for header-only libraries?
In Christ, Steven Watanabe
Vinnie Falco wrote:
My motto is "Trust in God, but always run the tests locally."
What I do is click the "view command-line instructions" and apply only the "git pull" line to my "develop" branch, then run my local tests. The instructions as they appear make you create a separate local branch and merge that instead, but I find this to be of little value as I don't mind the merge commits.
but even though I'm logged with my Github account, it appears I don't have write-access to merge this PR. I'm not a fan of using the GitHub web interface to merge pull requests because this needlessly creates a "merge commit" (usually with one side of the merge having just one commit) which interferes with a
On Wed, Oct 25, 2017 at 11:03 AM, Fernando Cacciola via Boost
wrote: linear history (I prefer a linear history except for when there are two ongoing topical branches that are merged at some point). That is no longer true (and hasn't for quite a while). Nowadays the web interface allows you to select different PR merge methods, including the
On 25.10.2017 14:17, Vinnie Falco via Boost wrote: traditional merge commit, a "squash and merge", or a "rebase and merge". It sounds like what you'd prefer is the latter, to make the history linear. FWIW, Stefan -- ...ich hab' noch einen Koffer in Berlin...
On Wed, Oct 25, 2017 at 11:29 AM, Stefan Seefeld via Boost
That is no longer true (and hasn't for quite a while). Nowadays the web interface allows you to select different PR merge methods, including the traditional merge commit, a "squash and merge", or a "rebase and merge". It sounds like what you'd prefer is the latter, to make the history linear.
I do like the linear history where practical but that is not the only reason to avoid using the GitHub interface. Assembling the branch locally has an additional benefit. You can preview exactly how the branch will look after the merge. This is not possible with the GitHub interface. You also cannot sign commits with the GitHub interface or make adjustments. Everyone who has ever submitted a pull request always forgets to update CHANGELOG.md. Furthermore I have a policy in my repository that the tip of the master and develop branches that the top commit always sets an internal version number. Merging a pull request won't accomplish that.
On 25.10.2017 15:03, Vinnie Falco via Boost wrote:
On Wed, Oct 25, 2017 at 11:29 AM, Stefan Seefeld via Boost
wrote: That is no longer true (and hasn't for quite a while). Nowadays the web interface allows you to select different PR merge methods, including the traditional merge commit, a "squash and merge", or a "rebase and merge". It sounds like what you'd prefer is the latter, to make the history linear. I do like the linear history where practical but that is not the only reason to avoid using the GitHub interface.
Assembling the branch locally has an additional benefit. You can preview exactly how the branch will look after the merge. This is not possible with the GitHub interface. You also cannot sign commits with the GitHub interface or make adjustments. Everyone who has ever submitted a pull request always forgets to update CHANGELOG.md. Why would anyone still maintain a ChangeLog ? :-) (Seriously, I'm all for keeping logs such as "release notes", but they are much coarser grained and targeted at different audiences. For everything else I use commit logs.)
Furthermore I have a policy in my repository that the tip of the master and develop branches that the top commit always sets an internal version number. Merging a pull request won't accomplish that.
Again, why not just use SHAs for that ? What additional information do you expect such a strictly defined version number to carry ? (And again, for anything higher level there are tags...) Anyhow, this is likely the wrong thread to have such a discussion. But as you describe your preferred workflow, I'm curious and would like to understand your rationale for it. (Incidentally, I do have such repos, too, where the "master" branch is always considered stable, and the only commits to it are (coarse-grained) PR merges. There it might make sense to have a highlevel "change log" as well as version tag for each PR I create. In fact, I have my github CI infrastructure set up to do just that: create a new tag for each commit to master, then run tests and generate a new snapshot including online docs. That works perfectly fine, including triggers via the github web interface.) Regards, Stefan -- ...ich hab' noch einen Koffer in Berlin...
On Wed, Oct 25, 2017 at 12:16 PM, Stefan Seefeld via Boost
Again, why not just use SHAs for that ? What additional information do you expect such a strictly defined version number to carry ? (And again, for anything higher level there are tags...)
You cannot compare two SHA values to determine which one is more recent. Beast by default builds a string of the form "Boost.Beast/<version>" which it uses for the User-Agent and Server fields in HTTP messages. This makes it easier to diagnose problems with remote servers and also to implement workarounds for specific versions. And it is easier for a user to respond with "version 123" than it is for them to say "the tip of my branch has digest 1e9fcbad61dd9e6dc1bc0be1b5882c2a9a8d1b4d".
On 25 October 2017 at 19:17, Vinnie Falco via Boost
* Add a remote for the user submitting the pull request
git remote add blowaxd git@github.com:BlowXD/numeric_conversion.git
You can fetch the pull request from your own repo, see: https://help.github.com/articles/checking-out-pull-requests-locally/#modifyi... Or if you want to configure git to fetch all pull requests (including closed pull requests), do this in your repo: git config --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pr/*"
On 25 October 2017 at 20:05, Daniel James
Or if you want to configure git to fetch all pull requests (including closed pull requests), do this in your repo:
git config --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pr/*"
Sorry, that word wrapped, it should be one line.
On Wed, Oct 25, 2017 at 12:05 PM, Daniel James via Boost
You can fetch the pull request from your own repo, see:
https://help.github.com/articles/checking-out-pull-requests-locally/#modifyi...
Or if you want to configure git to fetch all pull requests (including closed pull requests), do this in your repo:
git config --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pr/*"
Very nice, I did not know this! This is a great opportunity to reiterate that learning git is a life-long process, it seems like there is always something new to be learned even if you've been using git for years.
participants (7)
-
Daniel James
-
Fernando Cacciola
-
James E. King, III
-
Peter Dimov
-
Stefan Seefeld
-
Steven Watanabe
-
Vinnie Falco