Issue973

Title Configure the Github repository
Priority feature Status resolved
Superseder Nosy List florian, jendrik, malte, silvan, thomas
Assigned To Keywords infrastructure
Optional summary
* ~~set up autolink references~~
* ~~possibly set up git.fast-downward.org as the main URL of the Github repo~~

Created on 2020-07-01.12:00:56 by florian, last changed by silvan.

Summary
* set up autolink references
* possibly set up git.fast-downward.org as the main URL of the Github repo
Messages
msg10164 (view) Author: silvan Date: 2021-03-04.14:26:59
issue977 will be part of issue954, closing this issue.
msg9558 (view) Author: florian Date: 2020-07-09.14:27:38
It might be good to document the changes we did on the Github settings. There is already part of that documentation on our wiki:
http://www.fast-downward.org/ForDevelopers/Git#Github_Configuration
But maybe that belongs more to the rest of our infrastructure documentation:
https://wiki.dmi.unibas.ch/doku.php?id=fbi:ai:infrastructure-documentation
msg9541 (view) Author: jendrik Date: 2020-07-08.13:34:25
Autolink references are set up.
msg9442 (view) Author: florian Date: 2020-07-03.15:05:19
We discussed the options of using git.fast-downward.org as a custom URL and decided against it.
msg9380 (view) Author: malte Date: 2020-07-01.12:49:19
All that follows are some thoughts that I want to write down before they are gone, but there may be a need for further discussion here.


Again regarding the hook: one supposedly simple way to design this with a local check is to have some way of extracting the supposed branch name from the commit message, then check that the information is consistent.

I think the commit messages will have to be the primary source of information. in a typical incoming set, we will have no branches involved because we generally only push branches to the github repository once they are integrated, at which point they are gone from git's perspective. The commit message is the only trace that remains. As a general design, I think we can treat the commit message as a source of metadata for hg-style branch information, and then the hooks need to check that the information is internally consistent and that it is consistent with any open branches that exist (including main).

For example, if the extracted branch name is issue111 and the commit belongs to an open branch (whatever "belongs to" means, but as a first approximation: there is an open branch such that ancestors(branch) \setminus ancestors(main) includes this commit, which is easy to express in git), then this branch should also be named issue111.

A commit on main should always have a main commit as its first parent. If it has a second parent, it should belong to an issueXYZ branch.

A commit on an issue branch can either have just one main parent (then it starts this branch), or a single parent on the same branch, or two parents: the first on the branch, the second on main (= the case where we merge back from main). Merging back from main is something many people consider icky. Perhaps we want to disallow it some time in the future (so this would require rebasing before merging to main in the future).

We have to decide whether we want to check that branch names follow our naming conventions.

I would also like to introduce and enforce an "at most two parents" rule (no octomerges). I think it makes tooling etc. much simpler. I think we already discussed this at some point, but it's not yet discussed on the wiki.

Perhaps this discussion does not belong to this issue. I guess this issue is about implementing the spec for github, not discussing it. I would like our wiki page to be precise enough that it can serve as a complete spec for the hook.
msg9376 (view) Author: malte Date: 2020-07-01.12:36:28
Regarding the hook to enforce the conventions:

I think this should check not just the commit message but also the branching rules, for example that commits on main have another commit on main as their first parent, as we discussed. Unlike the pre-commit hooks, these hooks have to be able to check many commits at once with quite limited information, so I think they will need to look at the ancestry structure anyway in order to figure out which commit we associate with which branch (which we kind-of need to be able to check the commit message).

I would suggest also checking the existing repository if it follows these rules. This can help us debug our rules (i.e., do they make sense, do they cover all cases, do we need exceptions) and debug the hook that tests the rules. Also if there is something messed up in the history that we would like to fix, now is a good chance to clean it up. (Although that should always involve a cost-benefit analysis.)

This should be coordinated with the user-side pre-commit hooks that we have discussed (issue968). These should agree on what the rules are that we want to enforce.
msg9375 (view) Author: florian Date: 2020-07-01.12:24:27
Link to the workflow description: http://www.fast-downward.org/ForDevelopers/Git

Another comment of Guillem moved from the task board about the push hooks:

Just for the record, one way of doing this could be a combination of Github’s “protected branches” + “status checks” - although I’m not sure that that would work for individual commits rather than full Pull Requests.

https://help.github.com/en/github/administering-a-repository/about-protected-branches

https://help.github.com/en/github/administering-a-repository/about-required-status-checks
msg9371 (view) Author: florian Date: 2020-07-01.12:00:55
Copied from Guillem's comment on the sprint board about autolink references:

A quick test repo: https://github.com/aibasel/test-repo/commits/master

Autolink reference config can be seen here: https://github.com/aibasel/test-repo/settings/key_links

Interestingly, you can set it up so that more than one type of refs are recognized and appropriate links are created. This is what the [CPython](https://github.com/python/cpython/commits/master) repo seems to do with links to (a) issues in their self-hosted issue tracker, and (b) pull requests in their Github repo.
History
Date User Action Args
2021-03-04 14:27:00silvansetstatus: chatting -> resolved
nosy: + silvan
messages: + msg10164
summary: TODO: * ~~set up autolink references~~ * issue977 set up a server-side push hook to enforce the naming convention for commits * ~~possibly set up git.fast-downward.org as the main URL of the Github repo~~ -> * ~~set up autolink references~~ * ~~possibly set up git.fast-downward.org as the main URL of the Github repo~~
2020-07-09 14:27:38floriansetmessages: + msg9558
2020-07-09 14:20:11patfersetsummary: TODO: * ~~set up autolink references~~ * set up a server-side push hook to enforce the naming convention for commits * ~~possibly set up git.fast-downward.org as the main URL of the Github repo~~ -> TODO: * ~~set up autolink references~~ * issue977 set up a server-side push hook to enforce the naming convention for commits * ~~possibly set up git.fast-downward.org as the main URL of the Github repo~~
2020-07-08 13:34:25jendriksetmessages: + msg9541
summary: TODO: * set up autolink references * set up a server-side push hook to enforce the naming convention for commits * ~~possibly set up git.fast-downward.org as the main URL of the Github repo~~ -> TODO: * ~~set up autolink references~~ * set up a server-side push hook to enforce the naming convention for commits * ~~possibly set up git.fast-downward.org as the main URL of the Github repo~~
2020-07-08 13:32:11thomassetnosy: + thomas
2020-07-03 15:05:19floriansetmessages: + msg9442
summary: TODO: * set up autolink references * set up a server-side push hook to enforce the naming convention for commits * possibly set up git.fast-downward.org as the main URL of the Github repo -> TODO: * set up autolink references * set up a server-side push hook to enforce the naming convention for commits * ~~possibly set up git.fast-downward.org as the main URL of the Github repo~~
2020-07-02 17:23:54floriansetpriority: meta -> feature
keyword: + infrastructure
2020-07-01 12:49:19maltesetmessages: + msg9380
2020-07-01 12:36:28maltesetmessages: + msg9376
2020-07-01 12:24:27floriansetstatus: unread -> chatting
messages: + msg9375
2020-07-01 12:00:56floriancreate