{"thread":{"id":"41672","subject":"Ability to remember last known good build","startedAt":"2016-03-11T17:51:33Z","lastAt":"2016-03-11T22:08:38Z","messageCount":5,"participants":["Pedroso, Osiris","Junio C Hamano","Stefan Beller","Randall S. Becker"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"280625","messageId":"CEDF59214E9E6A4CB418120F4FD7A0056E86A214@US-MBX2.ingrnet.com","threadId":"41672","inReplyTo":null,"subject":"Ability to remember last known good build","fromName":"Pedroso, Osiris","fromEmail":"osiris.pedroso@intergraph.com","sentAt":"2016-03-11T17:51:33Z","receivedAt":"2016-03-11T17:51:33Z","isPatch":false,"sender":{"key":"osiris.pedroso@intergraph.com","avatar":null},"body":"I participate in an open source project that any pull merge is accepted, no matter what.\n\nThis makes for lots of broken builds, even though we do have Travis-CI enabled on the project, because people will merge a request before even the build is complete.\n\nTherefore, I would like to remember the id of the commit of the last successful build. This would be updated by the Travis-CI script itself upon a successful build.\n\nI imagine best option would be to merge master to a certain branch named \"Last_known_Linux_build\" or \"Last_known_Windows_build\" or even \"Last_known_build_all_tests_passing\".\n\nI am new to git, but some other experienced co-volunteers tell me that it may not be possible due to authentication issues.\n\nAny better way of accomplishing this?\n\nAppreciate any comments,\nOsiris Pedroso\n"},{"id":"280626","messageId":"xmqq60wsc2gh.fsf@gitster.mtv.corp.google.com","threadId":"41672","inReplyTo":"CEDF59214E9E6A4CB418120F4FD7A0056E86A214@US-MBX2.ingrnet.com","subject":"Re: Ability to remember last known good build","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-03-11T18:08:14Z","receivedAt":"2016-03-11T18:08:14Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Pedroso, Osiris\" <osiris.pedroso@intergraph.com> writes:\n\n> I participate in an open source project that any pull merge is accepted, no matter what.\n>\n> This makes for lots of broken builds, even though we do have Travis-CI enabled on the project, because people will merge a request before even the build is complete.\n>\n> Therefore, I would like to remember the id of the commit of the last successful build. This would be updated by the Travis-CI script itself upon a successful build.\n>\n> I imagine best option would be to merge master to a certain branch named \"Last_known_Linux_build\" or \"Last_known_Windows_build\" or even \"Last_known_build_all_tests_passing\".\n>\n> I am new to git, but some other experienced co-volunteers tell me that it may not be possible due to authentication issues.\n>\n> Any better way of accomplishing this?\n\n\"test && git branch -f last-good\"?\n"},{"id":"280628","messageId":"CAGZ79kZS7vnw5EskQHty9Cathv6FdE3L8wLstFwaWpMFHamSEw@mail.gmail.com","threadId":"41672","inReplyTo":"xmqq60wsc2gh.fsf@gitster.mtv.corp.google.com","subject":"Re: Ability to remember last known good build","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2016-03-11T18:17:40Z","receivedAt":"2016-03-11T18:17:40Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Fri, Mar 11, 2016 at 10:08 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> \"Pedroso, Osiris\" <osiris.pedroso@intergraph.com> writes:\n>\n>> I participate in an open source project that any pull merge is accepted, no matter what.\n>>\n>> This makes for lots of broken builds, even though we do have Travis-CI enabled on the project, because people will merge a request before even the build is complete.\n>>\n>> Therefore, I would like to remember the id of the commit of the last successful build. This would be updated by the Travis-CI script itself upon a successful build.\n>>\n>> I imagine best option would be to merge master to a certain branch named \"Last_known_Linux_build\" or \"Last_known_Windows_build\" or even \"Last_known_build_all_tests_passing\".\n>>\n>> I am new to git, but some other experienced co-volunteers tell me that it may not be possible due to authentication issues.\n>>\n>> Any better way of accomplishing this?\n>\n> \"test && git branch -f last-good\"?\n\nTravis-CI enabled, tells me they're using Github and are distributed,\nso one contributor would want to know the last known good state of\na remote, that others push to, without testing all commits locally.\n\nSo maybe the question is better rephrased as: \"How do we keep track of\nthe last good state using the distributed nature of Git?\"\n\nI would rather ask the more fundamental question of the workflow\nof having everything merged despite tests failing. Also accepting\npull requests no matter what, sounds suspicious to me. (Can I sneak\nin security issues or delete all files and it still is pulled?)\n\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"280635","messageId":"00be01d17bcf$3022d190$906874b0$@nexbridge.com","threadId":"41672","inReplyTo":"xmqq60wsc2gh.fsf@gitster.mtv.corp.google.com","subject":"RE: Ability to remember last known good build","fromName":"Randall S. Becker","fromEmail":"rsbecker@nexbridge.com","sentAt":"2016-03-11T19:49:50Z","receivedAt":"2016-03-11T19:49:50Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On March 11, 2016 1:08 PM Junio C Hamano wrote:\n> \"Pedroso, Osiris\" <osiris.pedroso@intergraph.com> writes:\n> \n> > I participate in an open source project that any pull merge is accepted,\nno\n> matter what.\n> >\n> > This makes for lots of broken builds, even though we do have Travis-CI\n> enabled on the project, because people will merge a request before even\nthe\n> build is complete.\n> >\n> > Therefore, I would like to remember the id of the commit of the last\n> successful build. This would be updated by the Travis-CI script itself\nupon a\n> successful build.\n> >\n> > I imagine best option would be to merge master to a certain branch named\n> \"Last_known_Linux_build\" or \"Last_known_Windows_build\" or even\n> \"Last_known_build_all_tests_passing\".\n> >\n> > I am new to git, but some other experienced co-volunteers tell me that\nit\n> may not be possible due to authentication issues.\n> >\n> > Any better way of accomplishing this?\n> \n> \"test && git branch -f last-good\"?\n\nI think semantically a last-good tag might be another option, unless you are\napplying build fixes to a last-good topic branch. You also have the option\nof adding content to the tag describing the build reason, engine used, etc.\nSee git tag --help. I have used that in a Jenkins environment putting the\ntag move in the step following a build (failure does not execute the step so\nthe last-good build tag stays where it is).\n\nCheers,\nRandall\n\n-- Brief whoami: NonStop&UNIX developer since approximately\nUNIX(421664400)/NonStop(211288444200000000)\n-- In my real life, I talk too much.\n"},{"id":"280638","messageId":"xmqqio0sacrd.fsf@gitster.mtv.corp.google.com","threadId":"41672","inReplyTo":"CAGZ79kZS7vnw5EskQHty9Cathv6FdE3L8wLstFwaWpMFHamSEw@mail.gmail.com","subject":"Re: Ability to remember last known good build","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-03-11T22:08:38Z","receivedAt":"2016-03-11T22:08:38Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stefan Beller <sbeller@google.com> writes:\n\n>>> Any better way of accomplishing this?\n>>\n>> \"test && git branch -f last-good\"?\n>\n> Travis-CI enabled, tells me they're using Github and are distributed,\n> so one contributor would want to know the last known good state of\n> a remote, that others push to, without testing all commits locally.\n>\n> So maybe the question is better rephrased as: \"How do we keep track of\n> the last good state using the distributed nature of Git?\"\n\nI think Travis integration with GitHub lets the commits tested to be\nannotated in the test status, so scanning the history from the tip\nto find the latest one with the \"good\" test result would be how you\nwould find \"the last passing one\" if your workflow relies on the\nTravis-GitHub combination.\n\nI am not sure about \"using the distributed nature\" part.  That\ndepends on the way how the result of the Travis testing is reflected\non the GitHub side.  If it is done by adding a note or something\nthat can natively exported over \"git fetch\", that would be one way\nto do so.\n"}]}