osmo-ci/1cffc0714cf1e807e7eb3f4923b...

370 lines
14 KiB
Plaintext

{
"comments": [
{
"key": {
"uuid": "fa98f980_2fc71e14",
"filename": "scripts/osmo-build.sh",
"patchSetId": 7
},
"lineNbr": 23,
"author": {
"id": 1000005
},
"writtenOn": "2017-05-19T11:24:25Z",
"side": 1,
"message": "This is an example for building \u003cinsert project name\u003e which depends on \u003ca\u003e, \u003cb\u003e, \u003cc\u003e",
"revId": "1cffc0714cf1e807e7eb3f4923bb812b7fc97ba4",
"serverId": "035e6965-6537-41bd-912c-053f3cf69326",
"unresolved": false
},
{
"key": {
"uuid": "fa98f980_4fcc6236",
"filename": "scripts/osmo-build.sh",
"patchSetId": 7
},
"lineNbr": 28,
"author": {
"id": 1000005
},
"writtenOn": "2017-05-19T11:24:25Z",
"side": 1,
"message": "More and better docs. It is absolutely crucial that anyone who may take over jenkins maintenance can easily understand this. e.g.\n\n Pass all required dependencies to a command given in $1.\n Collect the output of these calls and concatenate, separated with underscores.\n The result is an artifact file name used to store in/retrieve from the artifact store.\n\n $1 may be one of these commands:\n\n - osmo-build-dep.sh: build a source tree\n - getFoo: frobnicate zagnomodes\n - getMoo: instacube labnitudes\n\n The arguments passed to these are:\n \n - PARALLEL_MAKE as environment variable, passed to \u0027make\u0027\n - arg 1: the git repository name, gets places in a git.osmocom.org URL.\n - arg 2: optional: ...\n - arg 3: optional: ...",
"revId": "1cffc0714cf1e807e7eb3f4923bb812b7fc97ba4",
"serverId": "035e6965-6537-41bd-912c-053f3cf69326",
"unresolved": false
},
{
"key": {
"uuid": "fa98f980_ef4d16c6",
"filename": "scripts/osmo-build.sh",
"patchSetId": 7
},
"lineNbr": 43,
"author": {
"id": 1000005
},
"writtenOn": "2017-05-19T11:24:25Z",
"side": 1,
"message": "(rather put this on top like above)",
"revId": "1cffc0714cf1e807e7eb3f4923bb812b7fc97ba4",
"serverId": "035e6965-6537-41bd-912c-053f3cf69326",
"unresolved": false
},
{
"key": {
"uuid": "fa98f980_0f4b3ab1",
"filename": "scripts/osmo-build.sh",
"patchSetId": 7
},
"lineNbr": 49,
"author": {
"id": 1000005
},
"writtenOn": "2017-05-19T11:24:25Z",
"side": 1,
"message": "like what. cd foo? ./configure \u0026\u0026 make install?",
"revId": "1cffc0714cf1e807e7eb3f4923bb812b7fc97ba4",
"serverId": "035e6965-6537-41bd-912c-053f3cf69326",
"unresolved": false
},
{
"key": {
"uuid": "fa98f980_920e7133",
"filename": "scripts/osmo-build.sh",
"patchSetId": 7
},
"lineNbr": 49,
"author": {
"id": 1000111
},
"writtenOn": "2017-05-19T13:30:33Z",
"side": 1,
"message": "yes. Maybe a short real example of such script with comments will be more descriptive? I\u0027ll try to more descriptive.",
"parentUuid": "fa98f980_0f4b3ab1",
"revId": "1cffc0714cf1e807e7eb3f4923bb812b7fc97ba4",
"serverId": "035e6965-6537-41bd-912c-053f3cf69326",
"unresolved": false
},
{
"key": {
"uuid": "fa98f980_6fd126cd",
"filename": "scripts/osmo-build.sh",
"patchSetId": 7
},
"lineNbr": 55,
"author": {
"id": 1000005
},
"writtenOn": "2017-05-19T11:24:25Z",
"side": 1,
"message": "let\u0027s have what this script needs right at the top",
"revId": "1cffc0714cf1e807e7eb3f4923bb812b7fc97ba4",
"serverId": "035e6965-6537-41bd-912c-053f3cf69326",
"unresolved": false
},
{
"key": {
"uuid": "fa98f980_8fd64ac4",
"filename": "scripts/osmo-build.sh",
"patchSetId": 7
},
"lineNbr": 82,
"author": {
"id": 1000005
},
"writtenOn": "2017-05-19T11:24:25Z",
"side": 1,
"message": "comment: \"jenkins should check out the git tree of the project to be built in the workspace root.\" (this probably near the top of this file) and here \"obtain the project name from the git clone found in the workspace root\"",
"revId": "1cffc0714cf1e807e7eb3f4923bb812b7fc97ba4",
"serverId": "035e6965-6537-41bd-912c-053f3cf69326",
"unresolved": false
},
{
"key": {
"uuid": "fa98f980_afda2ee7",
"filename": "scripts/osmo-build.sh",
"patchSetId": 7
},
"lineNbr": 86,
"author": {
"id": 1000005
},
"writtenOn": "2017-05-19T11:24:25Z",
"side": 1,
"message": "what does this do?",
"revId": "1cffc0714cf1e807e7eb3f4923bb812b7fc97ba4",
"serverId": "035e6965-6537-41bd-912c-053f3cf69326",
"unresolved": false
},
{
"key": {
"uuid": "fa98f980_ef2ef6a4",
"filename": "scripts/osmo-build.sh",
"patchSetId": 7
},
"lineNbr": 86,
"author": {
"id": 1000111
},
"writtenOn": "2017-05-19T13:30:33Z",
"side": 1,
"message": "It replaces \u0027/\u0027 with \u0027#\u0027 to avoid slashes in the artifact filename. Will add comment.",
"parentUuid": "fa98f980_afda2ee7",
"revId": "1cffc0714cf1e807e7eb3f4923bb812b7fc97ba4",
"serverId": "035e6965-6537-41bd-912c-053f3cf69326",
"unresolved": false
},
{
"key": {
"uuid": "fa98f980_cd95ba89",
"filename": "scripts/osmo-build.sh",
"patchSetId": 7
},
"lineNbr": 86,
"author": {
"id": 1000005
},
"writtenOn": "2017-05-23T11:54:30Z",
"side": 1,
"message": "Ah, this is a bash-ism that I don\u0027t know. My personal preference would be to stay with /bin/sh bounds ... fine then.\n\nAren\u0027t \u0027#\u0027 in file names rather unusual, given that they are comment delimiters? how about underscores, double-underscores or maybe a comma?",
"parentUuid": "fa98f980_ef2ef6a4",
"revId": "1cffc0714cf1e807e7eb3f4923bb812b7fc97ba4",
"serverId": "035e6965-6537-41bd-912c-053f3cf69326",
"unresolved": false
},
{
"key": {
"uuid": "fa98f980_cfd772be",
"filename": "scripts/osmo-build.sh",
"patchSetId": 7
},
"lineNbr": 130,
"author": {
"id": 1000005
},
"writtenOn": "2017-05-19T11:24:25Z",
"side": 1,
"message": "locally? remotely?",
"revId": "1cffc0714cf1e807e7eb3f4923bb812b7fc97ba4",
"serverId": "035e6965-6537-41bd-912c-053f3cf69326",
"unresolved": false
},
{
"key": {
"uuid": "fa98f980_0f2c1aab",
"filename": "scripts/osmo-build.sh",
"patchSetId": 7
},
"lineNbr": 130,
"author": {
"id": 1000111
},
"writtenOn": "2017-05-19T13:30:33Z",
"side": 1,
"message": "remotely - getBranchAndRevRemotely() \u003d\u003e git ls-remote ......\n\nlocally - getBranchAndRevLocally() \u003d\u003e git rev-parse HEAD\n\nThanks, I\u0027ll document it and change the names to get_artifact_name_by_remote_repos and get_artifact_name_by_local_repos to be more descriptive.",
"parentUuid": "fa98f980_cfd772be",
"revId": "1cffc0714cf1e807e7eb3f4923bb812b7fc97ba4",
"serverId": "035e6965-6537-41bd-912c-053f3cf69326",
"unresolved": false
},
{
"key": {
"uuid": "fa98f980_efe436ae",
"filename": "scripts/osmo-build.sh",
"patchSetId": 7
},
"lineNbr": 163,
"author": {
"id": 1000005
},
"writtenOn": "2017-05-19T11:24:25Z",
"side": 1,
"message": "you\u0027re lacking the root reason: we want to atomically move an artifact into place avoiding half-written files.",
"revId": "1cffc0714cf1e807e7eb3f4923bb812b7fc97ba4",
"serverId": "035e6965-6537-41bd-912c-053f3cf69326",
"unresolved": false
},
{
"key": {
"uuid": "fa98f980_2f18fe83",
"filename": "scripts/osmo-build.sh",
"patchSetId": 7
},
"lineNbr": 163,
"author": {
"id": 1000111
},
"writtenOn": "2017-05-19T13:30:33Z",
"side": 1,
"message": "True, thanks! Will be added/documented.",
"parentUuid": "fa98f980_efe436ae",
"revId": "1cffc0714cf1e807e7eb3f4923bb812b7fc97ba4",
"serverId": "035e6965-6537-41bd-912c-053f3cf69326",
"unresolved": false
},
{
"key": {
"uuid": "fa98f980_0fe25a9f",
"filename": "scripts/osmo-build.sh",
"patchSetId": 7
},
"lineNbr": 171,
"author": {
"id": 1000005
},
"writtenOn": "2017-05-19T11:24:25Z",
"side": 1,
"message": "hmm, we might still have a GC problem here. If another job tries to use this artifact and this job is removing it? -- that depends on whether we retrieve the artifact \"atomically\"...",
"revId": "1cffc0714cf1e807e7eb3f4923bb812b7fc97ba4",
"serverId": "035e6965-6537-41bd-912c-053f3cf69326",
"unresolved": false
},
{
"key": {
"uuid": "fa98f980_3226a5bb",
"filename": "scripts/osmo-build.sh",
"patchSetId": 7
},
"lineNbr": 171,
"author": {
"id": 1000111
},
"writtenOn": "2017-05-19T13:30:33Z",
"side": 1,
"message": "True, I somehow relied on the assumption that job B, which has been triggered directly after job A (concurrent) will archive its artifact after building all deps, thus giving job A enough time to fetch the artifact. (Of course a change in one of the dependencies have been introduced between triggering job A and B.) \n\nThanks, for your feedback!",
"parentUuid": "fa98f980_0fe25a9f",
"revId": "1cffc0714cf1e807e7eb3f4923bb812b7fc97ba4",
"serverId": "035e6965-6537-41bd-912c-053f3cf69326",
"unresolved": false
},
{
"key": {
"uuid": "fa98f980_ed927e9e",
"filename": "scripts/osmo-build.sh",
"patchSetId": 7
},
"lineNbr": 171,
"author": {
"id": 1000005
},
"writtenOn": "2017-05-23T11:54:30Z",
"side": 1,
"message": "there\u0027s also the parallel matrix builds? do they each have a separate artifact store? If they share, builds of the same matrix may GC away artifacts the other has just built, or something in that line.",
"parentUuid": "fa98f980_3226a5bb",
"revId": "1cffc0714cf1e807e7eb3f4923bb812b7fc97ba4",
"serverId": "035e6965-6537-41bd-912c-053f3cf69326",
"unresolved": false
},
{
"key": {
"uuid": "fa98f980_6fe8467d",
"filename": "scripts/osmo-build.sh",
"patchSetId": 7
},
"lineNbr": 187,
"author": {
"id": 1000005
},
"writtenOn": "2017-05-19T11:24:25Z",
"side": 1,
"message": "add comment:\n\n # extract the artifact directly from the artifact store.\n # If another job run were to remove the artifact while we\u0027re doing this,\n # we trust that \u0027tar\u0027 will keep the file open and thus we are allowed \n # to read to the end before the file is discarded by the OS.\n\nAnd about the GC problem above: the most waterproof way of avoiding is to probe whether the artifact exists *by* doing a copy/untar. If it succeeds, we have it. If not, rebuild. In case we first query and decide, then copy, some other job run may have removed in the meantime?\n\nHow likely is this to happen? What would it take? concurrent jenkins job builds of different versions of the same repos? (so far we have concurrent builds disabled mostly for cosmetic reasons)",
"revId": "1cffc0714cf1e807e7eb3f4923bb812b7fc97ba4",
"serverId": "035e6965-6537-41bd-912c-053f3cf69326",
"unresolved": false
},
{
"key": {
"uuid": "fa98f980_522b2982",
"filename": "scripts/osmo-build.sh",
"patchSetId": 7
},
"lineNbr": 187,
"author": {
"id": 1000111
},
"writtenOn": "2017-05-19T13:30:33Z",
"side": 1,
"message": "\u003e\u003e And about the GC problem above: the most waterproof \n\u003e\u003e way of avoiding is to probe whether the artifact \n\u003e\u003e exists *by* doing a copy/untar. If it succeeds, \n\u003e\u003e we have it. If not, rebuild.\n\nThanks for your input. Script will be changed to do so!\n\n\n\n\u003e\u003e How likely is this to happen? What would it take? \n\u003e\u003e concurrent jenkins job builds of different versions of \n\u003e\u003e the same repos? (so far we have concurrent builds \n\u003e\u003e disabled mostly for cosmetic reasons)\n\nYes, it would take concurrent jenkins jobs of the same repo with different versions of one of its dependencies (e.g. change has been introduced to libosmocore). Furthermore the following \"race condition\" must be won:\n\n t_buildDeps \u003c t_fetchDeps (+ t_triggerDelay)\n\nIn other words the time it takes to build all dependencies is the delay between the indication that an artifact is outdated and its deletion.",
"parentUuid": "fa98f980_6fe8467d",
"revId": "1cffc0714cf1e807e7eb3f4923bb812b7fc97ba4",
"serverId": "035e6965-6537-41bd-912c-053f3cf69326",
"unresolved": false
},
{
"key": {
"uuid": "fa98f980_2d8d667c",
"filename": "scripts/osmo-build.sh",
"patchSetId": 7
},
"lineNbr": 187,
"author": {
"id": 1000005
},
"writtenOn": "2017-05-23T11:54:30Z",
"side": 1,
"message": "let\u0027s try to keep the algorithm completely timing-free, i.e. do not rely on x amount of time having passed. Atomicity should suffice, right?",
"parentUuid": "fa98f980_522b2982",
"revId": "1cffc0714cf1e807e7eb3f4923bb812b7fc97ba4",
"serverId": "035e6965-6537-41bd-912c-053f3cf69326",
"unresolved": false
},
{
"key": {
"uuid": "fa98f980_4ff38273",
"filename": "scripts/osmo-build.sh",
"patchSetId": 7
},
"lineNbr": 193,
"author": {
"id": 1000005
},
"writtenOn": "2017-05-19T11:24:25Z",
"side": 1,
"message": "rename to \u0027logArtifactHashes\u0027",
"revId": "1cffc0714cf1e807e7eb3f4923bb812b7fc97ba4",
"serverId": "035e6965-6537-41bd-912c-053f3cf69326",
"unresolved": false
}
]
}