text:
feat(dockerbuilder): add logic to build dockerfile builds

build fucntion supports dockerfile builder.
was able to launch the POD but because of readiness probe unable to start the container, which is not related to build logic and should be fixed from workflow end.
will Open an issue in workflow.

$ kubectl get pods --namespace=zigzag-traverse
NAME                           READY     STATUS    RESTARTS   AGE
zigzag-traverse-v2-cmd-hzoya   0/1       Running   1          1m

DEBUG scale zigzag-traverse_v2.cmd, img zigzag-traverse:git-be3be457d1466c5cf6000496179875ab6dd22bdd, params {'num': 1, 'envs': {}, 'aname': 'zigzag-traverse', 'version': 'v2', 'healthcheck': {'path': '/', 'port': 8080, 'timeout': 1, 'delay': 10}, 'memory': {}, 'app_type': 'cmd', 'cpu': {}, 'tags': {}, 'build_type': 'dockerfile'}, cmd ""
DEBUG create zigzag-traverse_v2.cmd, img zigzag-traverse:git-be3be457d1466c5cf6000496179875ab6dd22bdd, params {'num': 1, 'envs': {}, 'aname': 'zigzag-traverse', 'build_type': 'dockerfile', 'version': 'v2', 'healthcheck': {'path': '/', 'port': 8080, 'timeout': 1, 'delay': 10}, 'app_type': 'cmd', 'cpu': {}, 'tags': {}, 'memory': {}}, cmd ""

Unfortunately I'm not that comfortable with how dockerbuilder works to say whether this code is good or not so I'll defer to someone else who may be more tuned into dockerbuilder's foundation. If we had unit tests, this would be easier to review ;)

@bacongobbler agreed RE tests. They should have been added long ago, but the current builder is the result of an almost 1-1 transliteration from a shell script, which obviously didn't have any. I've created https://github.com/deis/builder/issues/132 to track the (obvious) task of adding unit tests and refactoring to enable them as necessary.

Fixes #50

We are creating builder Pods with git short sha and generating build hook with git full sha which will not build apps properly. Fixed it

@smothiki I changed it from short to long sha in https://github.com/deis/builder/pull/131/files#diff-91e10a0836e513c85626cee1d2899e5dR236. What's changed since then?

@smothiki left 2 more comments

LGTM. Tested both slug and docker builds. Slug builds work as normal and docker build output is listed below:
ENG000656:example-dockerfile-http aaronschlesinger$ git push deis master
Counting objects: 47, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (37/37), done.
Writing objects: 100% (47/47), 7.09 KiB | 0 bytes/s, done.
Total 47 (delta 7), reused 0 (delta 0)
Running in debug mode
Running git hook
read [0000000000000000000000000000000000000000,2e2054e75d83e91466fa71e0dc38c4c036240e48,refs/heads/master]
Workflow request /v2/hooks/push (body elided)
Workflow request POST /v2/hooks/config
{"receive_user":"arschles","receive_repo":"dft"}
got the following config back for app dft: {Owner:arschles App:dft Values:map[] Memory:map[] CPU:map[] Tags:map[] UUID:236c464c-f276-4885-ba10-c66fc259a7d7 Created:2016-02-02 00:31:12 +0000 UTC Updated:2016-02-02 00:31:12 +0000 UTC}
running [git archive --format=tar.gz --output=dft.tar.gz 2e2054e7] in directory /home/git/dft.git
running [tar -xzf dft.tar.gz -C /home/git/dft.git/build/tmp310100696/] in directory /home/git/dft.git
create bucket error: BucketAlreadyExists: The requested bucket name is not available.
remote: status code: 409, request id: ZPGQP2VFJJADOXVK
Uploading tar to http://10.171.252.129:9000/git/home/dft:git-2e2054e7/tar
-----> Starting build... but first, coffee!
Starting pod dockerbuild-dft-2e2054e7-7d8fe53a
Pod spec: {
  "metadata": {
    "name": "dockerbuild-dft-2e2054e7-7d8fe53a",
    "namespace": "deis",
    "creationTimestamp": null,
    "labels": {
      "heritage": "deis",
      "version": "2.0.0-beta"
    }
  },
  "spec": {
    "volumes": [
      {
        "name": "minio-user",
        "secret": {
          "secretName": "minio-user"
        }
      },
      {
        "name": "docker-socket",
        "hostPath": {
          "path": "/var/run/docker.sock"
        }
      }
    ],
    "containers": [
      {
        "name": "deis-dockerbuilder",
        "image": "smothiki/dockerbuilder:v1.8",
        "env": [
          {
            "name": "DEBUG",
            "value": "1"
          },
          {
            "name": "ACCESS_KEY_FILE",
            "value": "/var/run/secrets/object/store/access_key"
          },
          {
            "name": "ACCESS_SECRET_FILE",
            "value": "/var/run/secrets/object/store/access_secret"
          },
          {
            "name": "TAR_URL",
            "value": "http://10.171.252.129:9000/git/home/dft:git-2e2054e7/tar"
          },
          {
            "name": "IMG_NAME",
            "value": "dft:git-2e2054e7"
          }
        ],
        "resources": {},
        "volumeMounts": [
          {
            "name": "minio-user",
            "readOnly": true,
            "mountPath": "/var/run/secrets/object/store"
          },
          {
            "name": "docker-socket",
            "mountPath": "/var/run/docker.sock"
          }
        ],
        "imagePullPolicy": "Always"
      }
    ],
    "restartPolicy": "Never",
    "serviceAccountName": ""
  },
  "status": {}
}

+ MC_PREFIX='mc --quiet -C /app/mc_config'
+ [[ -z http://10.171.252.129:9000/git/home/dft:git-2e2054e7/tar ]]
+ [[ -e /var/run/secrets/object/store/access-key-id ]]
+ [[ -e /var/run/secrets/object/store/access-secret-key ]]
++ cat /var/run/secrets/object/store/access-key-id
+ keyID=8TZRY2JRWMPT6UMXR6I5
++ cat /var/run/secrets/object/store/access-secret-key
+ secretKey=gbstrOvotMMcg2sMfGUhA5a6Et/EI5ALtIHsobYk
++ awk -F/ '{print $3}'
++ echo http://10.171.252.129:9000/git/home/dft:git-2e2054e7/tar
+ domain=10.171.252.129:9000
+ mc --quiet -C /app/mc_config config host add http://10.171.252.129:9000 8TZRY2JRWMPT6UMXR6I5 gbstrOvotMMcg2sMfGUhA5a6Et/EI5ALtIHsobYk
+ mc --quiet -C /app/mc_config cp http://10.171.252.129:9000/git/home/dft:git-2e2054e7/tar /tmp/slug.tgz
+ tar -xzf /tmp/slug.tgz -C /app/
+ unset TAR_URL
+ python /deploy.py 10.171.249.123:5000/dft:git-2e2054e7
remote: ":"Step 0 : FROM alpine:3.1\n"}

remote: ":"Pulling from library/alpine","id":"3.1"}

{"status":"Already exists","progressDetail":{},"id":"cbc72f123e08"}
remote: ":"Digest: sha256:bc912e8bc3cccf2982bee29dd18d9d138b642c9dc0dec4141dfb459fc687865a"}

remote: ":"Status: Downloaded newer image for alpine:3.1"}

remote: ":" ---\u003e cbc72f123e08\n"}

remote: ":"Step 1 : RUN apk add -U \tbash \tnginx \t\u0026\u0026 rm -rf /var/cache/apk*\n"}

remote: ":" ---\u003e Running in 70ccfef19e57\n"}

remote: ":"fetch http://dl-4.alpinelinux.org/alpine/v3.1/main/x86_64/APKINDEX.tar.gz\n"}

remote: ":"(1/6) Installing ncurses-terminfo-base (5.9-r3)\n"}

remote: ":"(2/6) Installing ncurses-libs (5.9-r3)\n"}

remote: ":"(3/6) Installing readline (6.3-r3)\n"}

remote: ":"(4/6) Installing bash (4.3.30-r0)\n"}

remote: ":"(5/6) Installing pcre (8.36-r2)\n"}

remote: ":"(6/6) Installing nginx (1.6.2-r1)\n"}

remote: ":"Executing nginx-1.6.2-r1.pre-install\n"}

remote: ":"Executing busybox-1.22.1-r15.trigger\n"}

remote: ":"OK: 8 MiB in 21 packages\n"}

remote: ":" ---\u003e 2fac989b1254\n"}

remote: ":"Removing intermediate container 70ccfef19e57\n"}

remote: ":"Step 2 : RUN ln -sf /dev/stdout /var/log/nginx/access.log\n"}

remote: ":" ---\u003e Running in 143fac2c3a41\n"}

remote: ":" ---\u003e e56b2f35a096\n"}

remote: ":"Removing intermediate container 143fac2c3a41\n"}

remote: ":"Step 3 : RUN ln -sf /dev/stderr /var/log/nginx/error.log\n"}

remote: ":" ---\u003e Running in f45bda2d0e6a\n"}

remote: ":" ---\u003e 0dfb7b4b2e55\n"}

remote: ":"Removing intermediate container f45bda2d0e6a\n"}

remote: ":"Step 4 : ENV POWERED_BY Deis\n"}

remote: ":" ---\u003e Running in f0b3e836b5a3\n"}

remote: ":" ---\u003e d13b273779ae\n"}

remote: ":"Removing intermediate container f0b3e836b5a3\n"}

remote: ":"Step 5 : COPY rootfs /\n"}

remote: ":" ---\u003e 89b1ea252b7e\n"}

remote: ":"Removing intermediate container ae0679253998\n"}

remote: ":"Step 6 : CMD /bin/boot\n"}

remote: ":" ---\u003e Running in 7a4306a49802\n"}

remote: ":" ---\u003e af9a770dc432\n"}

remote: ":"Removing intermediate container 7a4306a49802\n"}

remote: ":"Step 7 : EXPOSE 80\n"}

remote: ":" ---\u003e Running in 2a1b1250a891\n"}

remote: ":" ---\u003e b4ad38953d82\n"}

remote: ":"Removing intermediate container 2a1b1250a891\n"}

remote: ":"Successfully built b4ad38953d82\n"}

remote: ":"The push refers to a repository [10.171.249.123:5000/dft] (len: 1)"}

{"status":"Buffering to Disk","progressDetail":{},"id":"b4ad38953d82"}
{"status":"Pushing","progressDetail":{"current":1,"total":32},"progress":"[=\u003e                                                 ]      1 B/32 B","id":"b4ad38953d82"}
{"status":"Pushing","progressDetail":{"current":32,"total":32},"progress":"[==================================================\u003e]     32 B/32 B","id":"b4ad38953d82"}
{"status":"Pushing","progressDetail":{"current":32,"total":32},"progress":"[==================================================\u003e]     32 B/32 B","id":"b4ad38953d82"}
{"status":"Pushing","progressDetail":{"current":32,"total":32},"progress":"[==================================================\u003e]     32 B/32 B","id":"b4ad38953d82"}
{"status":"Image successfully pushed","progressDetail":{},"id":"b4ad38953d82"}
{"status":"Buffering to Disk","progressDetail":{},"id":"af9a770dc432"}
{"status":"Pushing","progressDetail":{"current":1,"total":32},"progress":"[=\u003e                                                 ]      1 B/32 B","id":"af9a770dc432"}
{"status":"Pushing","progressDetail":{"current":32,"total":32},"progress":"[==================================================\u003e]     32 B/32 B","id":"af9a770dc432"}
{"status":"Pushing","progressDetail":{"current":32,"total":32},"progress":"[==================================================\u003e]     32 B/32 B","id":"af9a770dc432"}
{"status":"Pushing","progressDetail":{"current":32,"total":32},"progress":"[==================================================\u003e]     32 B/32 B","id":"af9a770dc432"}
{"status":"Image successfully pushed","progressDetail":{},"id":"af9a770dc432"}
{"status":"Buffering to Disk","progressDetail":{},"id":"89b1ea252b7e"}
{"status":"Pushing","progressDetail":{"current":493,"total":493},"progress":"[==================================================\u003e]    493 B/493 B","id":"89b1ea252b7e"}
{"status":"Pushing","progressDetail":{"current":493,"total":493},"progress":"[==================================================\u003e]    493 B/493 B","id":"89b1ea252b7e"}
{"status":"Pushing","progressDetail":{"current":493,"total":493},"progress":"[==================================================\u003e]    493 B/493 B","id":"89b1ea252b7e"}
{"status":"Image successfully pushed","progressDetail":{},"id":"89b1ea252b7e"}
{"status":"Buffering to Disk","progressDetail":{},"id":"d13b273779ae"}
{"status":"Pushing","progressDetail":{"current":1,"total":32},"progress":"[=\u003e                                                 ]      1 B/32 B","id":"d13b273779ae"}
{"status":"Pushing","progressDetail":{"current":32,"total":32},"progress":"[==================================================\u003e]     32 B/32 B","id":"d13b273779ae"}
{"status":"Pushing","progressDetail":{"current":32,"total":32},"progress":"[==================================================\u003e]     32 B/32 B","id":"d13b273779ae"}
{"status":"Pushing","progressDetail":{"current":32,"total":32},"progress":"[==================================================\u003e]     32 B/32 B","id":"d13b273779ae"}
{"status":"Image successfully pushed","progressDetail":{},"id":"d13b273779ae"}
{"status":"Buffering to Disk","progressDetail":{},"id":"0dfb7b4b2e55"}
{"status":"Pushing","progressDetail":{"current":172,"total":172},"progress":"[==================================================\u003e]    172 B/172 B","id":"0dfb7b4b2e55"}
{"status":"Pushing","progressDetail":{"current":172,"total":172},"progress":"[==================================================\u003e]    172 B/172 B","id":"0dfb7b4b2e55"}
{"status":"Pushing","progressDetail":{"current":172,"total":172},"progress":"[==================================================\u003e]    172 B/172 B","id":"0dfb7b4b2e55"}
{"status":"Image successfully pushed","progressDetail":{},"id":"0dfb7b4b2e55"}
{"status":"Buffering to Disk","progressDetail":{},"id":"e56b2f35a096"}
{"status":"Pushing","progressDetail":{"current":173,"total":173},"progress":"[==================================================\u003e]    173 B/173 B","id":"e56b2f35a096"}
{"status":"Pushing","progressDetail":{"current":173,"total":173},"progress":"[==================================================\u003e]    173 B/173 B","id":"e56b2f35a096"}
{"status":"Pushing","progressDetail":{"current":173,"total":173},"progress":"[==================================================\u003e]    173 B/173 B","id":"e56b2f35a096"}
{"status":"Image successfully pushed","progressDetail":{},"id":"e56b2f35a096"}
{"status":"Buffering to Disk","progressDetail":{},"id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":32769,"total":1213683},"progress":"[=\u003e                                                 ] 32.77 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":65537,"total":1213683},"progress":"[==\u003e                                                ] 65.54 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":98305,"total":1213683},"progress":"[====\u003e                                              ] 98.31 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":131073,"total":1213683},"progress":"[=====\u003e                                             ] 131.1 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":163841,"total":1213683},"progress":"[======\u003e                                            ] 163.8 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":196609,"total":1213683},"progress":"[========\u003e                                          ] 196.6 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":229377,"total":1213683},"progress":"[=========\u003e                                         ] 229.4 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":262145,"total":1213683},"progress":"[==========\u003e                                        ] 262.1 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":294913,"total":1213683},"progress":"[============\u003e                                      ] 294.9 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":327681,"total":1213683},"progress":"[=============\u003e                                     ] 327.7 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":360449,"total":1213683},"progress":"[==============\u003e                                    ] 360.4 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":393217,"total":1213683},"progress":"[================\u003e                                  ] 393.2 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":425985,"total":1213683},"progress":"[=================\u003e                                 ]   426 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":458753,"total":1213683},"progress":"[==================\u003e                                ] 458.8 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":491521,"total":1213683},"progress":"[====================\u003e                              ] 491.5 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":524289,"total":1213683},"progress":"[=====================\u003e                             ] 524.3 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":557057,"total":1213683},"progress":"[======================\u003e                            ] 557.1 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":589825,"total":1213683},"progress":"[========================\u003e                          ] 589.8 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":622593,"total":1213683},"progress":"[=========================\u003e                         ] 622.6 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":655361,"total":1213683},"progress":"[==========================\u003e                        ] 655.4 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":688129,"total":1213683},"progress":"[============================\u003e                      ] 688.1 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":720897,"total":1213683},"progress":"[=============================\u003e                     ] 720.9 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":753665,"total":1213683},"progress":"[===============================\u003e                   ] 753.7 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":786433,"total":1213683},"progress":"[================================\u003e                  ] 786.4 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":819201,"total":1213683},"progress":"[=================================\u003e                 ] 819.2 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":851969,"total":1213683},"progress":"[===================================\u003e               ]   852 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":884737,"total":1213683},"progress":"[====================================\u003e              ] 884.7 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":917505,"total":1213683},"progress":"[=====================================\u003e             ] 917.5 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":950273,"total":1213683},"progress":"[=======================================\u003e           ] 950.3 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":983041,"total":1213683},"progress":"[========================================\u003e          ]   983 kB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":1015809,"total":1213683},"progress":"[=========================================\u003e         ] 1.016 MB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":1048577,"total":1213683},"progress":"[===========================================\u003e       ] 1.049 MB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":1081345,"total":1213683},"progress":"[============================================\u003e      ] 1.081 MB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":1114113,"total":1213683},"progress":"[=============================================\u003e     ] 1.114 MB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":1146881,"total":1213683},"progress":"[===============================================\u003e   ] 1.147 MB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":1179649,"total":1213683},"progress":"[================================================\u003e  ]  1.18 MB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":1212417,"total":1213683},"progress":"[=================================================\u003e ] 1.212 MB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":1213683,"total":1213683},"progress":"[==================================================\u003e] 1.214 MB/1.214 MB","id":"2fac989b1254"}
{"status":"Pushing","progressDetail":{"current":1213683,"total":1213683},"progress":"[==================================================\u003e] 1.214 MB/1.214 MB","id":"2fac989b1254"}
{"status":"Image successfully pushed","progressDetail":{},"id":"2fac989b1254"}
{"status":"Buffering to Disk","progressDetail":{},"id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":32769,"total":2240145},"progress":"[\u003e                                                  ] 32.77 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":65537,"total":2240145},"progress":"[=\u003e                                                 ] 65.54 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":98305,"total":2240145},"progress":"[==\u003e                                                ] 98.31 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":131073,"total":2240145},"progress":"[==\u003e                                                ] 131.1 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":163841,"total":2240145},"progress":"[===\u003e                                               ] 163.8 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":196609,"total":2240145},"progress":"[====\u003e                                              ] 196.6 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":229377,"total":2240145},"progress":"[=====\u003e                                             ] 229.4 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":262145,"total":2240145},"progress":"[=====\u003e                                             ] 262.1 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":294913,"total":2240145},"progress":"[======\u003e                                            ] 294.9 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":327681,"total":2240145},"progress":"[=======\u003e                                           ] 327.7 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":360449,"total":2240145},"progress":"[========\u003e                                          ] 360.4 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":393217,"total":2240145},"progress":"[========\u003e                                          ] 393.2 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":425985,"total":2240145},"progress":"[=========\u003e                                         ]   426 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":458753,"total":2240145},"progress":"[==========\u003e                                        ] 458.8 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":491521,"total":2240145},"progress":"[==========\u003e                                        ] 491.5 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":524289,"total":2240145},"progress":"[===========\u003e                                       ] 524.3 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":557057,"total":2240145},"progress":"[============\u003e                                      ] 557.1 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":589825,"total":2240145},"progress":"[=============\u003e                                     ] 589.8 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":622593,"total":2240145},"progress":"[=============\u003e                                     ] 622.6 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":655361,"total":2240145},"progress":"[==============\u003e                                    ] 655.4 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":688129,"total":2240145},"progress":"[===============\u003e                                   ] 688.1 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":720897,"total":2240145},"progress":"[================\u003e                                  ] 720.9 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":753665,"total":2240145},"progress":"[================\u003e                                  ] 753.7 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":786433,"total":2240145},"progress":"[=================\u003e                                 ] 786.4 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":819201,"total":2240145},"progress":"[==================\u003e                                ] 819.2 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":851969,"total":2240145},"progress":"[===================\u003e                               ]   852 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":884737,"total":2240145},"progress":"[===================\u003e                               ] 884.7 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":917505,"total":2240145},"progress":"[====================\u003e                              ] 917.5 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":950273,"total":2240145},"progress":"[=====================\u003e                             ] 950.3 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":983041,"total":2240145},"progress":"[=====================\u003e                             ]   983 kB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1015809,"total":2240145},"progress":"[======================\u003e                            ] 1.016 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1048577,"total":2240145},"progress":"[=======================\u003e                           ] 1.049 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1081345,"total":2240145},"progress":"[========================\u003e                          ] 1.081 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1114113,"total":2240145},"progress":"[========================\u003e                          ] 1.114 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1146881,"total":2240145},"progress":"[=========================\u003e                         ] 1.147 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1179649,"total":2240145},"progress":"[==========================\u003e                        ]  1.18 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1212417,"total":2240145},"progress":"[===========================\u003e                       ] 1.212 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1245185,"total":2240145},"progress":"[===========================\u003e                       ] 1.245 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1277953,"total":2240145},"progress":"[============================\u003e                      ] 1.278 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1310721,"total":2240145},"progress":"[=============================\u003e                     ] 1.311 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1343489,"total":2240145},"progress":"[=============================\u003e                     ] 1.343 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1376257,"total":2240145},"progress":"[==============================\u003e                    ] 1.376 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1409025,"total":2240145},"progress":"[===============================\u003e                   ] 1.409 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1441793,"total":2240145},"progress":"[================================\u003e                  ] 1.442 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1474561,"total":2240145},"progress":"[================================\u003e                  ] 1.475 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1507329,"total":2240145},"progress":"[=================================\u003e                 ] 1.507 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1540097,"total":2240145},"progress":"[==================================\u003e                ]  1.54 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1572865,"total":2240145},"progress":"[===================================\u003e               ] 1.573 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1605633,"total":2240145},"progress":"[===================================\u003e               ] 1.606 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1638401,"total":2240145},"progress":"[====================================\u003e              ] 1.638 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1671169,"total":2240145},"progress":"[=====================================\u003e             ] 1.671 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1703937,"total":2240145},"progress":"[======================================\u003e            ] 1.704 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1736705,"total":2240145},"progress":"[======================================\u003e            ] 1.737 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1769473,"total":2240145},"progress":"[=======================================\u003e           ] 1.769 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1802241,"total":2240145},"progress":"[========================================\u003e          ] 1.802 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1835009,"total":2240145},"progress":"[========================================\u003e          ] 1.835 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1867777,"total":2240145},"progress":"[=========================================\u003e         ] 1.868 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1900545,"total":2240145},"progress":"[==========================================\u003e        ] 1.901 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1933313,"total":2240145},"progress":"[===========================================\u003e       ] 1.933 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1966081,"total":2240145},"progress":"[===========================================\u003e       ] 1.966 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":1998849,"total":2240145},"progress":"[============================================\u003e      ] 1.999 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":2031617,"total":2240145},"progress":"[=============================================\u003e     ] 2.032 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":2064385,"total":2240145},"progress":"[==============================================\u003e    ] 2.064 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":2097153,"total":2240145},"progress":"[==============================================\u003e    ] 2.097 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":2129921,"total":2240145},"progress":"[===============================================\u003e   ]  2.13 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":2162689,"total":2240145},"progress":"[================================================\u003e  ] 2.163 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":2195457,"total":2240145},"progress":"[=================================================\u003e ] 2.195 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":2228225,"total":2240145},"progress":"[=================================================\u003e ] 2.228 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":2240145,"total":2240145},"progress":"[==================================================\u003e]  2.24 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Pushing","progressDetail":{"current":2240145,"total":2240145},"progress":"[==================================================\u003e]  2.24 MB/2.24 MB","id":"cbc72f123e08"}
{"status":"Image successfully pushed","progressDetail":{},"id":"cbc72f123e08"}
remote: ":"git-2e2054e7: digest: sha256:895412fec8c4c11f24a1f219647b96bc447550aa036eeb2b8663c216a563b2e9 size: 12266"}

size of logs streamed 28209
-----> Build complete.
-----> Launching app.
-----> Launching...
Workflow request POST /v2/hooks/build
{"sha":"2e2054e7","receive_user":"arschles","receive_repo":"dft","image":"dft","procfile":{},"dockerfile":"true"}

-----> Done, dft:v2 deployed to Deis

-----> Use 'deis open' to view this application in your browser

-----> To learn more, use 'deis help' or visit http://deis.io

running [git gc] in directory /home/git/dft.git
To ssh://git@deis.104.197.73.56.xip.io:2222/dft.git
 * [new branch]      master -> master
ENG000656:example-dockerfile-http aaronschlesinger$ kd describe svc deis-router
Name:			deis-router
Namespace:		deis
Labels:			heritage=deis
Selector:		app=deis-router
Type:			LoadBalancer
IP:			10.171.250.117
LoadBalancer Ingress:	104.197.73.56
Port:			http	80/TCP
NodePort:		http	32038/TCP
Endpoints:		10.168.1.234:80
Port:			https	443/TCP
NodePort:		https	30200/TCP
Endpoints:		10.168.1.234:443
Port:			builder	2222/TCP
NodePort:		builder	32440/TCP
Endpoints:		10.168.1.234:2222
Port:			healthz	9090/TCP
NodePort:		healthz	31875/TCP
Endpoints:		10.168.1.234:9090
Session Affinity:	None
Events:
  FirstSeen	LastSeen	Count	From			SubobjectPath	Reason			Message
  ─────────	────────	─────	────			─────────────	──────			───────
  24m		24m		1	{service-controller }			CreatingLoadBalancer	Creating load balancer
  23m		23m		1	{service-controller }			CreatedLoadBalancer	Created load balancer

ENG000656:example-dockerfile-http aaronschlesinger$ curl dft.104.197.73.56.xip.io
Powered by Deis

I'm not wild about standardizing on short SHAs, since there is a much higher danger of collisions. Is there a reason why we picked those?

standard git is 8 char long in shortened, I think we are 7(??) and only (that I'm aware off) the Linux Kernel has had to up the 8 char limit to avoid collisions due to rapid activity, but that was somewhat recently.

We have been using short sha's since deis v1. The new changes in builder are  using are using short sha and some times long. To avoid confusion I just changed everything back to short sha.
@helgi we are using 8.

Are there places where short SHAs are used to compare across two applications? If not, then I don't really care. But it would be a potential security issue if we were compared on a SHA and matched a different app.

Nope we are not comparing sha between applications.

In that case, I'll mark this LGTM and you can merge.

Thanks

authors: arschles bacongobbler helgi smothiki technosophos

repo: deis/builder


text:
fix(procfile): validate the proctypes during build itself

fixes part of https://github.com/deis/workflow-cli/issues/247

Current coverage is 87.79% (diff: 100%)

Merging #1105 into master will increase coverage by 0.02%

@@             master      #1105   diff @@
==========================================
  Files            42         42
  Lines          3632       3639     +7
  Methods           0          0
  Messages          0          0
  Branches        620        623     +3
==========================================
+ Hits           3188       3195     +7
  Misses          292        292
  Partials        152        152

Powered by Codecov. Last update 4ede878...53e118e

source: gharchive/pull-request

authors: codecov-io kmala

repo: deis/controller

license: MIT

license_type: permissive

license_source: github-api


text:
bug(builder): etcd watch error

After one node upgrade I saw this in the deis-builder logs:
Sep 10 23:42:18 nodo-1 sh[5288]: [error] Etcd error setting host/port: Tried and failed 2 cluster connections: Put http://192.168.2.200:4001/v2/keys/deis/builder/host: dial tcp 192.168.2.200:4001: i/o timeout
Sep 10 23:48:27 nodo-1 sh[5288]: [error] Etcd Watch failed: EOF
Sep 10 23:53:27 nodo-1 sh[5288]: [error] Etcd Watch failed: EOF
Sep 10 23:58:27 nodo-1 sh[5288]: [error] Etcd Watch failed: EOF
Sep 11 00:03:27 nodo-1 sh[5288]: [error] Etcd Watch failed: EOF
Sep 11 00:08:27 nodo-1 sh[5288]: [error] Etcd Watch failed: EOF
Sep 11 00:13:28 nodo-1 sh[5288]: [error] Etcd Watch failed: EOF
Sep 11 00:18:28 nodo-1 sh[5288]: [error] Etcd Watch failed: EOF
Sep 11 00:23:28 nodo-1 sh[5288]: [error] Etcd Watch failed: EOF
Sep 11 00:28:28 nodo-1 sh[5288]: [error] Etcd Watch failed: EOF
Sep 11 00:33:28 nodo-1 sh[5288]: [error] Etcd Watch failed: EOF
Sep 11 00:38:28 nodo-1 sh[5288]: [error] Etcd Watch failed: EOF
Sep 11 00:43:28 nodo-1 sh[5288]: [error] Etcd Watch failed: EOF
Sep 11 00:48:28 nodo-1 sh[5288]: [error] Etcd Watch failed: EOF
Sep 11 00:53:28 nodo-1 sh[5288]: [error] Etcd Watch failed: EOF
Sep 11 00:58:28 nodo-1 sh[5288]: [error] Etcd Watch failed: EOF

It was required a manual restart to solve the issue.

Closing. Not reproducible in v1.12.1

source: gharchive/issue

repo: deis/deis


text:
doc(README.md): update the readme to reflect beta status

Ref deis/deis#4962
cc/ @krancour @mboersma @slack

my LGTM still stands, though I'll defer to @krancour since he had some input on this PR

:ship:

thanks @krancour !

authors: arschles bacongobbler krancour

repo: deis/router


text:
Method host_numbers in fritzhosts.py always returns 16

Hi,
like you already noticed the method host_numbers in fritzhosts.py always returns 16.
I investigated the code and it is indeed a fritzbox API error.
So there are three possibilities

Check if there are other ways to check the number of hosts within the official API
Substitute the for loop with a 'while True' loop and query the fritzbox and break as soon as we receive an empty message
Parse the raw HTML page (may not work on every model)

Option 2 would be a good workaround but option 1 would be the best

Hi,
About this matter, I already asked the guy who wrote fritzconnection,
and he responded, that this is a problem of the frizbox, and there is
currently no way to get the correct number of hosts. One simply has to
wait and hope that an update from AVM solves this. (I don't have IOS6
maybe this new one solves it. I can not test, since I don't have a
supported box.)
Suggestion 2. should be easy to implement.
Suggestion 3. I have no Idear. Sound possible but like a lot of work and
cumbersome.
On 12/9/2015 9:12 PM, Caius Cioran wrote:

Hi,
like you already noticed the method host_numbers in fritzhosts.py
always returns 16.
I investigated the code and it is indeed a fritzbox API error.
So there are three possibilities

Check if there are other ways to check the number of hosts within
the official API
Substitute the for loop with a 'while True' loop and query the
fritzbox and break as soon as we receive an empty message
Parse the raw HTML page (may not work on every model)

Option 2 would be a good workaround but option 1 would be the best
—
Reply to this email directly or view it on GitHub
https://github.com/deisi/fritzconnection/issues/1.

authors: caiuspb deisi

repo: deisi/fritzconnection

license: mit

license_source: bigquery


text:
Containerd configuration shim format problem

I moved the built containerd-shim-spin-v1 to /usr/local/bin/.
Then I try to modify the configuration file of containerd, the content is roughly as follows：
[metrics]
  address = ""
  grpc_histogram = false

[plugins.cri.containerd.runtimes.spin]
  runtime_type = "io.containerd.spin.v1"

[plugins]

  [plugins."io.containerd.gc.v1.scheduler"]
    deletion_threshold = 0
    mutation_threshold = 100
    pause_threshold = 0.02
    schedule_delay = "0s"
    startup_delay = "100ms"

  [plugins."io.containerd.grpc.v1.cri"]

But I encountered an error when I finally started containerd, the information is as follows：
# containerd
containerd: failed to load TOML from /etc/containerd/config.toml: invalid plugin key URI "cri" expect io.containerd.x.vx

how do i solve this problem？

Could you please try putting the section
[plugins.cri.containerd.runtimes.spin]
  runtime_type = "io.containerd.spin.v1"

under the [plugins] section?

@Mossaka thanks for your advice.
I will try it according to what you said.

@Mossaka I still got the same error.
~/containerd-1.7.2# containerd
containerd: failed to load TOML from /etc/containerd/config.toml: invalid plugin key URI "cri" expect io.containerd.x.vx

Below is my configuration：

[metrics]
  address = ""
  grpc_histogram = false

[plugins]

  [plugins.cri.containerd.runtimes.spin]
    runtime_type = "io.containerd.spin.v1"

  [plugins."io.containerd.gc.v1.scheduler"]
    deletion_threshold = 0
    mutation_threshold = 100
    pause_threshold = 0.02
    schedule_delay = "0s"
    startup_delay = "100ms"

But I found a solution：
    [plugins."io.containerd.grpc.v1.cri".containerd]
      default_runtime_name = "runc"
      disable_snapshot_annotations = true
      discard_unpacked_layers = false
      ignore_rdt_not_enabled_errors = false
      no_pivot = false
      snapshotter = "overlayfs"

      # The following is the configuration I added for spin
      [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.spin]
         runtime_type = "io.containerd.spin.v1"

To my surprise, I successfully created the Deployment

Can I try to fix the docs?

Sure, go ahead!

authors: Mossaka dierbei

repo: deislabs/containerd-wasm-shims


text:
Incorrect wagi version for 0.6.1

The source downloaded for version 0.6.1 https://github.com/deislabs/wagi/releases/download/v0.6.1/wagi-v0.6.1-linux-amd64.tar.gz shows the wagi version as 0.5.0
sam@sam-VirtualBox:~/wagi$ wget https://github.com/deislabs/wagi/releases/download/v0.6.1/wagi-v0.6.1-linux-amd64.tar.gz
--2022-02-02 09:35:21--  https://github.com/deislabs/wagi/releases/download/v0.6.1/wagi-v0.6.1-linux-amd64.tar.gz
Resolving github.com (github.com)... 140.82.113.3
Connecting to github.com (github.com)|140.82.113.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/302774423/fbd4fca9-1841-4028-b926-fbb6a3c60b00?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220202%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220202T173522Z&X-Amz-Expires=300&X-Amz-Signature=e57d18cddefdeacaeeb8458acfea11ac520a7c51f29d1b34959a22d488b1a1da&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=302774423&response-content-disposition=attachment%3B%20filename%3Dwagi-v0.6.1-linux-amd64.tar.gz&response-content-type=application%2Foctet-stream [following]
--2022-02-02 09:35:22--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/302774423/fbd4fca9-1841-4028-b926-fbb6a3c60b00?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220202%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220202T173522Z&X-Amz-Expires=300&X-Amz-Signature=e57d18cddefdeacaeeb8458acfea11ac520a7c51f29d1b34959a22d488b1a1da&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=302774423&response-content-disposition=attachment%3B%20filename%3Dwagi-v0.6.1-linux-amd64.tar.gz&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.109.133, 185.199.108.133, 185.199.111.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9963840 (9.5M) [application/octet-stream]
Saving to: ‘wagi-v0.6.1-linux-amd64.tar.gz’

wagi-v0.6.1-linux-amd64.tar.gz    100%[==========================================================>]   9.50M  7.34MB/s
sam@sam-VirtualBox:~/wagi$ tar -xvzf wagi-v0.6.1-linux-amd64.tar.gz
README.md
LICENSE.txt
wagi

sam@sam-VirtualBox:~/wagi$ chmod 755 wagi
sam@sam-VirtualBox:~/wagi$ ./wagi  --version
WAGI Server 0.5.0

I managed to make the same mistake again. 🤦  I will fix and re-issue a 0.6.2.

Thanks again, @bourneagain. I appreciate your pointing this out right away before it got even more embarrassing.
Release 0.6.2 has been cut, fixing the versioning hopefully in ALL of the right places this time.

authors: bourneagain technosophos

repo: deislabs/wagi


text:
Fixed google auth to use first email of emails

Google returns multiple email adresses in an account. The client only recognizes one. Now updated it to pick the first of the returned emailadresses.

Thank you!


text:
Issue with activity being recreated when receiving file upload result

At a small number of users I noticed that the system has to recreate the activity before delivering the result through onActivityResult(...). This means that also a new AdvancedWebView will be created, which won't have the same mFileUploadCallbacks as the original one. Is there a way to persist these, that the WebView could receive them even if it gets recreated?

Thanks for pointing this out!
You can always persist such instances by storing the reference in your Application class that will only be destroyed if your whole app/process will be destroyed.
Apart from that, it might be sufficient to make the two members mFileUploadCallbackFirst and mFileUploadCallbackSecond static in AdvancedWebView. Could you try this?
If you can reproduce the behaviour of the Activity being destroyed before the result is delivered, you could test this -- and if it works, we'll adopt the change here.
The only downside would be that you won't be able to have pending results in two Activity instances at the same time. Say you call startActivityForResult(...) in one Activity which opens another app. Then you pause this app and open a new Activity in your app. There, you call startActivityForResult(...) again. Now you're waiting for two pending results but you will never be able to receive the first one because the second Activity has now overwritten the callback.
But I don't think this will happen, usually.

Good idea with the static variables. I can't think of a use-case, where there could be two different pending upload callbacks (at least in my app), so I'll make this change in our product. I'll come back within a month when I can verify if this solution worked.

Thanks, that would be great!
If it worked, we'll definitely adopt the fix here :)

Update: I deployed the fix (making the callbacks static), and issued an application update 2 weeks ago. We didn't have crashes since then with this issue, so indeed it is a viable solution.
I also had to make the onActivityResult(...) method static, because it accesses static variables.

Thank you so much!
Good to hear that it worked. A few questions are still open, however. Could you help?

When the AdvancedWebView is re-created because the containing Activity is re-created, is the file upload callback useful anymore? The WebViewwill go back to the start page, not the last page you were on and neither the last state and position you were in, right? Where will the selected file go to?
Making onActivityResult(...) static shouldn't be necessary, as non-static methods can access static fields just fine. Only the other way round doesn't work.
Did you collect crash data with the Google Play Developer Console (where users report just 5% of crashes or less) or did you use a dedicated crash reporting service such as ACRA, Crashlytics etc. (where almost all crashes end up being reported)? If you use the first option, the crashes may still occur but just have been missed, right?

I'm not really sure. We used restoring the instance state of the WebView in the application though, so the page would not be reset in this case. However it does still count for a page refresh. I don't know how the upload callbacks treat a page refresh like this.
Right, now I remember why I made them static: the WebView was inside a fragment, and when the activity recreated itself, the fragment view was not done yet. So I could not get a reference to the WebView, instead I made the method static, since it only accesses static fields.
I collected the data using Crashlytics. The crash occurred 23 times in total, over the course of approx. 2 weeks. I just checked, and the crash didn't reoccur since March 31. The number of users also increased since.

Sorry for the late answer :)

Okay, thanks for the clarification :)
Last thing (Promise!), could you somehow look up that old exception again? It would be useful to know what type of exception this was or in which lines it was caused. Of course, you can leave out all the lines from the stack trace that affect your private code.
Assuming the Activity (and thus the WebView) is re-created, a NullPointerException is the most likely candidate for a crash. However, in onActivityResult(...), every variable is checked explicitly, so it's not clear how an exception could be thrown there.
Thank you :)

Yes it was a NullPointerException because the WebView reference got nulled while the activity was re-created.
The stack trace was (replaced package name):
java.lang.RuntimeException: Unable to resume activity {com.example.app/com.example.app.MainActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1000, result=-1, data=Intent { dat=content://media/external/images/media/527997 typ=image/jpeg (has extras) }} to activity {com.example.app/com.example.app.MainActivity}: java.lang.NullPointerException
       at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2812)
       at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2851)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2234)
       at android.app.ActivityThread.access$600(ActivityThread.java:139)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1261)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:154)
       at android.app.ActivityThread.main(ActivityThread.java:4944)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:511)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
       at dalvik.system.NativeStart.main(NativeStart.java)
Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1000, result=-1, data=Intent { dat=content://media/external/images/media/527997 typ=image/jpeg (has extras) }} to activity {com.example.app/com.example.app.MainActivity}: java.lang.NullPointerException
       at android.app.ActivityThread.deliverResults(ActivityThread.java:3387)
       at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2793)
       at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2851)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2234)
       at android.app.ActivityThread.access$600(ActivityThread.java:139)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1261)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:154)
       at android.app.ActivityThread.main(ActivityThread.java:4944)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:511)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
       at dalvik.system.NativeStart.main(NativeStart.java)
Caused by: java.lang.NullPointerException
       at com.example.app.WebAppFragment.deliverResult(WebAppFragment.java:57)
       at com.example.app.MainActivity.onActivityResult(MainActivity.java:121)
       at android.app.Activity.dispatchActivityResult(Activity.java:4740)
       at android.app.ActivityThread.deliverResults(ActivityThread.java:3383)
       at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2793)
       at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2851)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2234)
       at android.app.ActivityThread.access$600(ActivityThread.java:139)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1261)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:154)
       at android.app.ActivityThread.main(ActivityThread.java:4944)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:511)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
       at dalvik.system.NativeStart.main(NativeStart.java)

Thank you!
Well, from these two lines, it seems the issue was in your own code. Could that actually be the case?
Caused by: java.lang.NullPointerException
       at com.example.app.WebAppFragment.deliverResult(WebAppFragment.java:57)
       at com.example.app.MainActivity.onActivityResult(MainActivity.java:121)

The two classes MainActivity and WebAppFragment are two of your own components extending Activity and Fragment, right?
So MainActivity.java:121 probably calls WebAppFragment. And in WebAppFragment.java:57, what is there, or rather, was there (at the time of the error)? Any chance you can look this up?
Because from that code, it seems that your own class WebAppFragment has a NullPointerException in method deliverResult(...) and more specifically on line 57.
The AdvancedWebView.java class is not mentioned anywhere, it seems.

authors: dzolnai mwaclawek

repo: delight-im/Android-AdvancedWebView


text:
Revert "feature: pin binaries to create proto buffer go code"

@cdelimitrou Apologies, I pushed the previous PR #294 without some code which is causing build errors. I will fix the this later and make a new PR to properly provide the feature.
Until then, perhaps we can revert the PR in order to not block the builds?

Just reverted, thanks.

authors: Red-GV cdelimitrou

repo: delimitrou/DeathStarBench


text:
[FEATURE]: Update Sidecar versions for CSI drivers

Update latest sidecar versions for CSI drivers .
external-provisioner :  k8s.gcr.io/sig-storage/csi-provisioner:v3.1.0
external-attacher    : k8s.gcr.io/sig-storage/csi-attacher:v3.4.0
external-resizer     : k8s.gcr.io/sig-storage/csi-resizer:v1.4.0
external-snapshotter : k8s.gcr.io/sig-storage/csi-snapshotter:v5.0.1
node-driver-registrar: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.5.0

All drivers has updated their sidecar versions, closing the issue

authors: boyamurthy shanmydell

repo: dell/csm


text:
Update README.md

Correct Platform Support Matrix for Omnia Release 1.0
Issues Resolved by this Pull Request
Fixes #548
Description of the Solution
Platform support matrix for Omnia 1.0 release is wrong.
Suggested Reviewers
@lwilson, @j0hnl

@all-contributors please add @sujit-jadhav for documentation

authors: lwilson sujit-jadhav

repo: dellhpc/omnia


text:
java.lang.NoClassDefFoundError: org/apache/spark/sql/execution/command/LeafRunnableCommand

This problem occurs when running native demo on my MAC
import pyspark
from delta import *

builder = (
    pyspark.sql.SparkSession.builder.appName("MyApp")
    .config("spark.sql.extensions", "io.delta.sql.DeltaSparkSessionExtension")
    .config(
        "spark.sql.catalog.spark_catalog",
        "org.apache.spark.sql.delta.catalog.DeltaCatalog",
    )
)

spark = configure_spark_with_delta_pip(builder).getOrCreate()

def create_table():
	data = spark.range(0, 5)
	data.write.format("delta").save("/tmp/delta-table-demo")

def read_table():
    df = spark.read.format("delta").load("/tmp/delta-table-demo")
    df.show()

if __name__ == "__main__":
	create_table()
	read_table()

    raise Py4JJavaError(
py4j.protocol.Py4JJavaError: An error occurred while calling o31.range.
: java.lang.NoClassDefFoundError: org/apache/spark/sql/execution/command/LeafRunnableCommand
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	at io.delta.sql.DeltaSparkSessionExtension.$anonfun$apply$5(DeltaSparkSessionExtension.scala:88)
	at org.apache.spark.sql.SparkSessionExtensions.$anonfun$buildPostHocResolutionRules$1(SparkSessionExtensions.scala:158)
	at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:238)
	at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62)
	at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55)
	at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49)
	at scala.collection.TraversableLike.map(TraversableLike.scala:238)
	at scala.collection.TraversableLike.map$(TraversableLike.scala:231)
	at scala.collection.AbstractTraversable.map(Traversable.scala:108)
	at org.apache.spark.sql.SparkSessionExtensions.buildPostHocResolutionRules(SparkSessionExtensions.scala:158)
	at org.apache.spark.sql.internal.BaseSessionStateBuilder.customPostHocResolutionRules(BaseSessionStateBuilder.scala:210)
	at org.apache.spark.sql.internal.BaseSessionStateBuilder$$anon$1.<init>(BaseSessionStateBuilder.scala:182)
	at org.apache.spark.sql.internal.BaseSessionStateBuilder.analyzer(BaseSessionStateBuilder.scala:167)
	at org.apache.spark.sql.internal.BaseSessionStateBuilder.$anonfun$build$2(BaseSessionStateBuilder.scala:342)
	at org.apache.spark.sql.internal.SessionState.analyzer$lzycompute(SessionState.scala:84)
	at org.apache.spark.sql.internal.SessionState.analyzer(SessionState.scala:84)
	at org.apache.spark.sql.execution.QueryExecution.$anonfun$analyzed$1(QueryExecution.scala:73)
	at org.apache.spark.sql.catalyst.QueryPlanningTracker.measurePhase(QueryPlanningTracker.scala:111)
	at org.apache.spark.sql.execution.QueryExecution.$anonfun$executePhase$1(QueryExecution.scala:143)
	at org.apache.spark.sql.SparkSession.withActive(SparkSession.scala:775)
	at org.apache.spark.sql.execution.QueryExecution.executePhase(QueryExecution.scala:143)
	at org.apache.spark.sql.execution.QueryExecution.analyzed$lzycompute(QueryExecution.scala:73)
	at org.apache.spark.sql.execution.QueryExecution.analyzed(QueryExecution.scala:71)
	at org.apache.spark.sql.execution.QueryExecution.assertAnalyzed(QueryExecution.scala:63)
	at org.apache.spark.sql.Dataset.<init>(Dataset.scala:210)
	at org.apache.spark.sql.Dataset.<init>(Dataset.scala:216)
	at org.apache.spark.sql.SparkSession.range(SparkSession.scala:550)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
	at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
	at py4j.Gateway.invoke(Gateway.java:282)
	at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
	at py4j.commands.CallCommand.execute(CallCommand.java:79)
	at py4j.GatewayConnection.run(GatewayConnection.java:238)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.apache.spark.sql.execution.command.LeafRunnableCommand
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	... 49 more

upgrade spark to 3.2.x fix it

repo: delta-io/delta


text:
Properly dispose request objects

Add missing dispose call. UnityWebRequest object must be disposed after request is completed, otherwise UploadHandler will keep its payload in memory forever and cause memory leak.

why are u not using the using statement?

@ariko-spaceplay you right.

Hi Artem,
Quick question, is URP better for mobile than the standard pipeline?
I just didn't find a conclusive answer to that.
What are the differences between the two rendering pipelines in terms of
CPU performance, RAM consumption and visuals?
Best, Arik.
On Tue, Jun 28, 2022 at 7:32 PM Artem Sokolov @.***>
wrote:

@ariko-spaceplay https://github.com/ariko-spaceplay you right.
—
Reply to this email directly, view it on GitHub
https://github.com/deltaDNA/unity-sdk/pull/20#issuecomment-1168953674,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AW4P4TCUHWT3ANZSXYLEKELVRMSIBANCNFSM5HFZNIDA
.
You are receiving this because you were mentioned.Message ID:
@.***>

authors: ariko-spaceplay vape

repo: deltaDNA/unity-sdk


text:
Packs Format Update

Status
In Progress
Related Issues
fixes: link to the issue
Description
Some minor fixes to the Packs Format/Content Packs Structure doc including:

Add/Remove inline code blocks when needed.
Add titles to .pack-ignore and .secrets-ignore codeblocks.
Fix typo in Pack metadata fields table.
Add links to approved categories, tags and use cases.

Screenshots
Paste here any images that will help the reviewer

@kgal-pan Is this correct?  marketplaces    | List | List of marketplaces in which the pack can be found (XSOAR XSIAM). |
i thought the names are marketplacev2 and XSOAR.

@kgal-pan Is this correct? marketplaces | List | List of marketplaces in which the pack can be found (XSOAR XSIAM). | i thought the names are marketplacev2 and XSOAR.

I made the change in https://github.com/demisto/content-docs/pull/1527/commits/b4ce07d7aa30d486741d451a41c362baf88cb5a1.

authors: kgal-pan tschanfeld

repo: demisto/content-docs


text:
🛑 Libreddit is down

In b0f7a7c, Libreddit (https://lr.eka.monster) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Libreddit is back up in 58f008b after 6 minutes.

repo: demonsteru/up


text:
🛑 SearxNG is down

In 54a28f1, SearxNG (https://sx.eka.monster) was down:

HTTP code: 0
Response time: 0 ms

Resolved: SearxNG is back up in cb0cd88.


text:
HW: 07.10.2016 Custom Button

Custom Button

ok

authors: ilya-shknaj zagart


text:
bug: test rejects if the OAuth provider hasn't issued the access token fails when properly awaited

re: #201
When properly awaiting the rejects if the OAuth provider hasn't issued the access token in get_session_access_token_test.ts, the test fails. This happens because the correct conditions are met to just return the access token, and I'm not sure there is a good mechanism to actually test what it is describing

I haven't had time to look into this. A couple of thoughts:

I think we really need to start leaning on mocking and spying in testing for this module.
How is test coverage affected if this test is removed?

I don't really think coverage will be affected at all to be honest, the test already isn't exactly providing any useful results as it stands.
What would be the way to tell if the provider didn't issue the token? Would it be if a request were made to the provider with the auth token and it responds with a non 2XX status code?

I think we really need to start leaning on mocking and spying in testing for this module.

+1 on this

I don't really think coverage will be affected at all to be honest, the test already isn't exactly providing any useful results as it stands.

I'll submit a PR that does this tomorrow. I'd also be happy to review a PR submitted before then 🙂

What would be the way to tell if the provider didn't issue the token? Would it be if a request were made to the provider with the auth token and it responds with a 4XX status code or something?

IIRC, the response is checked and any error response causes an error throw. This is done within the oauth2_client module.

IIRC, the response is checked and any error response causes an error throw. This is done within the oauth2_client module.

Sounds like we need a mock then

authors: iuioiua mitchwadair


text:
HTML code showing up between markdown.

@ry, The prettier HTML code is being shown between markdown. I was also trying to make the toc but its not being rendered properly. Please guide how to solve this. Would like to work on it. Thanks.
This screenshot is from the Manual page.

this is solved


text:
Dependency caching issue

We cannot cache all our dependencies in our build step, as the following dependencies won’t be automatically cached by deno cache:
https://deno.land/x/fresh/src/runtime/main_dev.ts
https://deno.land/x/fresh/plugins/twind/main.ts
https://deno.land/x/fresh/src/runtime/main.ts
https://esm.sh/preact/debug
https://esm.sh/stable/preact/deno/debug.js
https://esm.sh/stable/preact/deno/devtools.js

Closing as this is a Deno issue not a Fresh issue. This has been resolved in Deno a while back by setting vendor: true in deno.json.

repo: denoland/fresh


text:
How to customize error 404 in an API route?

Hi.
I have been trying this:
// routes/api/_404.ts

import { UnknownPageProps } from "$fresh/server.ts";

export default function NotFoundPage({ url }: UnknownPageProps) {
  return new Response(
    JSON.stringify({
      status: 404,
      message: `404 not found: ${url.pathname}`,
    }),
    {
      headers: { "Content-Type": "application/json" },
    },
  );
}

but it returns an empty content:
% curl http://localhost:8000/api/does-not-exist
%

and if I move the _404.ts to routes/_404.ts, it returns an unexpected HTML (but notice I'm trying to return an API error, i.e it should be a JSON content, not HTML):
% curl http://localhost:8000/api/does-not-exist
<!DOCTYPE html><meta charSet="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><default></default>
%

So, how to customize error 404 in an API route?
TIA for any help!

Oh, solved just by adding a _404.ts inside routes/ with this content:
import { HandlerContext } from "$fresh/server.ts";

export const handler = ({ url }: Request, _ctx: HandlerContext): Response => {
  return new Response(
    JSON.stringify({
      status: 404,
      message: `404 not found: ${url}`,
    }),
    {
      headers: { "Content-Type": "application/json" },
    },
  );
};

Sorry for noising! 😅


text:
feat: add support for route groups

This PR adds support for route groups which allows you to use different layouts for routes in the same URL segment.
/routes
  /(marketing)
    /_layout.tsx   <-- only applies to about.tsx and career.tsx
    /about.tsx
    /career.tsx
  /(info)
    /_layout.tsx   <-- only applies to index.tsx and contact.tsx
    /index.tsx
    /contact.tsx

To be able to do this we need to keep track of the original route paths. Previously, matching _layout and _middleware was done via their URLPattern, but this doesn't work with groups anymore. With groups multiple _layout files can have the same URLPattern and it becomes ambiguous as to which file to pick.
To solve this we need to match on the original file path semantics instead of their resulting URLPattern. To do that the PR adds an additional property baseRoute to each route which is the normalised file path. When a route matches we can retrieve that (like /foo/(bar)/(bob)/about) and easily match the needed layout files.
The PR is a bit longer than I'd hoped. Most of the changes relate to changing the internal route signature from:
interface Route {
  [K in "GET" | "PATCH" ...]: ...
}

to
interface Route {
  baseRoute: string;
  methods: {
    [K in "GET" | "PATCH" ...]: ...
  }
}

Fixes #1150 .

oh no, looks like I broke some tests 🙈

Alright, ready to review now 🎉


text:
proposal: personal website link on user profile

What do you think about adding the option to link to one's personal website/blog? After adding the GitHub profile in #356, I would suggest adding this as an additional option.
My suggestion would be to place the icon right next to the GitHub logo like this:

Editing is then possible via the `/account' page as follows:

Happy to get feedback!

I prefer not to do this. The current link to the GitHub user's profile already has their website, social and other URLs.

authors: iuioiua niklasmtj

repo: denoland/saaskit


text:
fix: target es2022 for Chart.js import and upgrade to v4.3.0

I just realised that this might be the cause of our woes. Previously, the target would've been deno as islands are built server-side. Checkout "ESBuild Options" in https://esm.sh/#docs
Closes #354
Supercedes #355

CC @mbhrznr. This would be worth integrating into your fresh_charts PR.

It's fixed!


text:
English Language Corrections

Predominantly grammar corrections (mostly articles and pronouns) and some small stylistic changes in sentences that were not clear at first read.

Thanks for contributing!

repo: denysdovhan/wtfjs

license: WTFPL


text:
Next Build Event Image Margin

Description
Next Build event image is missing classes that are being applied in production.
The image is missing all the VADS margin classes in which makes it become too close to the text below.
Screenshots
https://drive.google.com/file/d/1LEItTPY0jv0hCRdl0g_vas7IkywVPIaz/view?usp=sharing
Acceptance Criteria

[ ] VADS classes added to the Event image

Need Clarification. I am seeing matching classes in the html that is inconsistent with the documented screenshot. My screenshot is below. Please re-test


text:
BUG: Socket connection not caught

Describe the bug
In the vetext forwarder lambda we break the connection to vetext after 6 seconds. The exception is not caught (we incorrectly thought it would be an http.client.HTTPException.
Expected behavior
A broken socket connection just logs the exception and the code continues.

I spent about half a day trying to understand what was going on with this. Essentially this is not throwing an exception. It appears the getrequest method is hanging. The lambda code needs to be updated to use the requests module. requests is a higher-level library for making http requests, whereas http.client is lower level. The higher level library handles the timeout issues for us (setting the timeout parameter does what you would expect). The documentation for http.client's timeout is not as clear.

Spoke with @jakehova and he's going to create a new ticket given we're not progressing on this path of fixing the http.client issues.


text:
Parse Terraform files using a library rather than regexes

It's inconvenient / error-prone that we parse Terraform files regexes...
It'd be more convenient if we could find a library we could pull in that reads .tf files and maps them to native ruby types like hashes/arrays... That would make it much easier to solve problems like https://github.com/dependabot/dependabot-core/issues/5361 because we just access the desired key by name irrespective of order rather than flip-flopping on brittle regexes like we had to do in https://github.com/dependabot/dependabot-core/pull/6537...
A quick google search turns up https://github.com/hashicorp/terraform-config-inspect.

@deivid-rodriguez mentioned:

I found https://github.com/mfcastellani/hcl-checker myself.

That'd be ideal because it's in ruby unlike https://github.com/hashicorp/terraform-config-inspect which is written in go. My only concern is this comment about how most parsers struggle with the complex HCL of Terraform files.
But now that you mention it, I realize Dependabot's needs are fairly simple--we just need to extract package versions... so the ruby library might be a viable solution after all... we'd have to try it and see I guess.

The readme for https://github.com/mfcastellani/hcl-checker says:

Only works with HCL Version 1.

Unfortunately modern Terraform uses both versions of HCL:
https://github.com/hashicorp/terraform/blob/6ad7c8ba9b92cfddacd5dc1793768fcbce402478/go.mod#L45-L46
And the open issue to add support has no traction:

https://github.com/mfcastellani/hcl-checker/issues/4

Probably not the right fit for us.

Oh sweet, even though https://github.com/hashicorp/terraform-config-inspect is a go library, it has a CLI tool that outputs JSON!

FWIW I think using the terraform-config-inspect CLI tool would also help with https://github.com/dependabot/dependabot-core/issues/4080, because that library and tool also understands .tf.json files.
However, there isn't currently any library for dependency lock files, which would honestly be the better thing to parse for providers because it includes the exact version currently selected for each provider rather than just the version constraint that was used to select it. Those files are always in HCL format (never JSON) but have a much simpler structure than the main Terraform language.

authors: apparentlymart jeffwidman

repo: dependabot/dependabot-core


text:
GoModUpdater: return updated go.mod directly

Previously Dependabot would extract the changes detected in go.mod, then use go mod edit -{drop,}require to re-apply the updated paths on to the original go.mod.
This PR asserts that since Dependabot supports go mod tidy, customers expect go.mod to be tidied. That allows us to skip this additional complexity+compute of reapplying updates by returning the tidied contents directly.
Extra care is taken to ensure Dependabot won't inject a go language version (the go directive, e.g. go 1.15), to avoid regression. AFAICT this will be added by all versions since go1.12 (released 2019/02/25). Meaning the potential for injection only affects modules that immediately upgrade to vgo when it became available, go1.11 (released 2018/08/24), and haven't updated since. Likely rare.

Woah, this is a super sweet simplification!

This PR asserts that since Dependabot supports go mod tidy, customers expect go.mod to be tidied. That allows us to skip this additional complexity+compute of reapplying updates by returning the tidied contents directly.

What happens when go mod tidy silently fails? https://github.com/dependabot/dependabot-core/blob/0811996de1fdde8ecdd70971d7142e38619b7e99/go_modules/lib/dependabot/go_modules/file_updater/go_mod_updater.rb#L130-L134

What happens when go mod tidy silently fails?

https://github.com/dependabot/dependabot-core/blob/0811996de1fdde8ecdd70971d7142e38619b7e99/go_modules/spec/dependabot/go_modules/file_updater/go_mod_updater_spec.rb#L229-L239
full files via byebug

$ rspec spec/dependabot/go_modules/file_updater/go_mod_updater_spec.rb:224
[114, 123] in /home/dependabot/dependabot-core/go_modules/lib/dependabot/go_modules/file_updater/go_mod_updater.rb
=> 119:             { go_mod: updated_go_mod, go_sum: updated_go_sum }

(byebug) puts original_go_mod
module github.com/dependabot/vgotest

go 1.15

require github.com/googleapis/gnostic v0.3.1
nil
(byebug) puts updated_go_mod
module github.com/dependabot/vgotest

go 1.15

require github.com/googleapis/gnostic v0.5.1 // indirect

authors: jurre thepwagner


text:
Can't use Guzzle in custom recipe

Deployer version:
Deployment OS: CentOS 8 Stream

I've recently updated to Deployer 7. I'm using PHP 8 and have a custom recipe that uses Guzzle, previously in Deployer 6 it would find and use the recipe and Guzzle without an issue, but in Deployer 7 throws an error that says GuzzleHttp\Client can't be found, but it should be able to be found since it's included in the project and was never removed, what's going on here?
deploy.php
<?php
namespace Deployer;

use GuzzleHttp\Client;

require 'vendor/autoload.php';
require 'recipe/common.php';
require 'deploy/recipe/fudge-npm.php';
require 'deploy/recipe/fudge-composer.php';
require 'deploy/recipe/fudge-nuxt.php';
require 'deploy/recipe/fudge-duration.php';
require 'deploy/recipe/fudge-github.php';

// Project repository
set('repository', 'git@github.com:stsonline/application-fudge.git');

// [Optional] Timeout in seconds, set to 14,400 (4 hours) for max compatibility.
set('default_timeout', 14400);

// Shared files/dirs between deploys
add('shared_files', ['.env', 'brand-theme.scss']);

// Set number of releases to keep
set('keep_releases', 3);

// Writable dirs by web server
set('allow_anonymous_stats', false);

// All brands
// See the README.md for list of friendly brand names for these hosts.
host('1my ip')
    ->set('branch', 'main')
    ->set('labels', ['stage' => 'all'])
    ->set('repository', 'git@fudge:stsonline/application-fudge')
    ->set('remote_user', 'root')
    ->set('deploy_path', '/var/www/include-forms/fudge');

// deploy
task('deploy', [
  'deploy:duration:datetime:start',
  // 'deploy:github:validate',
  'deploy:prepare',
  'deploy:release',
  'deploy:update_code',
  'npm:install',
  'composer:install',
  'deploy:shared',
  'deploy:writable',
  'nuxt:generate',
  'deploy:clear_paths',
  'deploy:symlink',
  'deploy:unlock',
  'deploy:cleanup',
  'deploy:success',
  'deploy:duration:datetime:finish'
]);

// [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');

Custom github recipe file:
<?php
/*
 * Github
 */

namespace Deployer;

use Symfony\Component\Console\Input\InputOption;

option('disable-github-checks', false, InputOption::VALUE_OPTIONAL, 'disable github checks');

desc('Validate Github release with specified tag');
task('deploy:github:validate', function () {
    $tag = input()->getOption('tag');

    // package.json version
    $package = json_decode(file_get_contents('./package.json'), true);

    // disable github checks
    $disableGithubChecks = false;
    if (input()->hasOption('disable-github-checks')) {
      $disableGithubChecks = input()->getOption('disable-github-checks');
    }

    // get the latest release from Github
    // check if we should disable checks
    if ($disableGithubChecks) {
      writeln("<comment>Github checks are disabled, this is highly discouraged</comment>");
    } else {
      $client = new \GuzzleHttp\Client();
      $res = $client->request('GET', 'https://api.github.com/repos/stsonline/application-fudge/releases', [
          'headers' => [
              // NOTE: token must not be removed from Github
              'Authorization' => 'token gdfdfgdfg',
          ]
      ]);
    }
});

For what it's worth, I get the same problem with PHP 7.4 after upgrading:
$ php -v
PHP 7.4.30 (cli) (built: Jun  9 2022 09:20:03) ( NTS )

$ composer -v
Composer version 2.4.1 2022-08-20 11:44:50

$ vendor/bin/dep
 Error  in deploy.php on line 6:

  Class 'Dotenv\Dotenv' not found

authors: danmichaelo sts-ryan-holton

repo: deployphp/deployer


text:
Error: Failed to open stream: No such file or directory when using third party recipe

Deployer version: 7.1
Deployment OS: OSX

<?php
namespace Deployer;

require_once 'recipe/symfony.php';
require_once 'recipe/setono_dotenv.php';

...

My composer.json looks like this:
{
    "license": "proprietary",
    "type": "project",
    "require": {
        "php": ">=8.1",
        "deployer/deployer": "^7.1",
        "setono/deployer-dotenv": "2.x-dev"
    },
    "prefer-stable": true,
    "config": {
        "sort-packages": true,
        "allow-plugins": {
            "dealerdirect/phpcodesniffer-composer-installer": false,
            "ergebnis/composer-normalize": true
        }
    }
}

I get this error:
➜  deployment git:(master) ✗ vendor/bin/dep deploy
 ErrorException  in deploy.php on line 10:

  require_once(recipe/setono_dotenv.php): Failed to open stream: No such file or directory

This worked in v6 and I suspect there has been some work in how the include path is used? What is way to allow me and others to create third party recipes nowadays?
Thanks for a great tool <3

This is an issue of setono/deployer-dotenv. Not deployer)

Hi, @antonmedv
Thanks for your swift response. I might be wrong, but here is a reproducer of the problem as I see it: https://github.com/loevgaard/deployer-issue-3485.
As you can see the include path differs.
As mentioned it worked in v6 of Deployer and I have tried to search through the repository for changes that could affect this, but haven't been lucky enough to find it. Maybe you could guide me in the right direction, so I can make a PR? :)

Oh, just saw this issue: https://github.com/deployphp/deployer/issues/3293. This is the same issue.

I just tried to include the recipe directly like this: require_once 'vendor/setono/deployer-dotenv/src/recipe/setono_dotenv.php';
When it ran I got this error:
➜  deployment git:(master) ✗ vendor/bin/dep deploy
task deploy:info
[staging] info deploying HEAD
task deploy:setup
task deploy:lock
task deploy:release
task deploy:update_code
task dotenv:prepare
task deploy:shared
task deploy:writable
task deploy:vendors
task dotenv:generate
task dotenv:update
[staging]  Error  in setono_dotenv.php on line 98:
[staging]
[staging]   Class "Webmozart\Assert\Assert" not found
[staging]
ERROR: Task dotenv:update failed!
task deploy:failed
task deploy:unlock

My library requires webmozart/assert as you can see here: https://github.com/Setono/deployer-dotenv/blob/2.x/composer.json#L17, so I am leaning more and more towards that something is broken in the autoloading.

It must be these lines that are the culprit: https://github.com/deployphp/deployer/blob/master/bin/dep#L50-L54.
Is there a reason for this ordering? If the ordering was:
$autoload = [
    __DIR__ . '/../../../autoload.php', // The dep located at "vendor/deployer/deployer/bin".
    __DIR__ . '/../vendor/autoload.php', // The dep located at "deployer.phar/bin" or in development.
    __DIR__ . '/../autoload.php', // The dep located at "vendor/bin".
];

it would load the correct autoloader.

Probably no reason. We can rearrange

@antonmedv: Added a PR that does just that: https://github.com/deployphp/deployer/pull/3488 :)

@antonmedv: It's impossible for me to migrate from v6 to v7 because of this issue and I guess for many others who have made their own recipe. I have tried with the PR, but it didn't build and I have no idea/knowledge about all the internals that go into actually testing it. Is it possible to pay you for fixing it? :)

Also this issue should be reopened, because it is definitely not fixed

You can use full path to the recipe:
require __DIR__ . './vendor/...';

Yes, but that would only work if the required recipes also use absolute requires. This is a pseudo solution and doesn't address the problem.

And I already tried your 'solution' here: https://github.com/deployphp/deployer/issues/3485#issuecomment-1428593813

Hi, it's an issue for me too. I have a bunch of custom recipes and it's broken since v7.x cause of the autoload changes done in v7 as mentioned @loevgaard in the comment https://github.com/deployphp/deployer/issues/3485#issuecomment-1430307650

Hi, my solution is to add in my deploy.php: require $GLOBALS['_composer_autoload_path']; after namespace declaration. As the dep binary is loading its own autoload included in its phar archive and not the one of the global composer where dep could be installed.

Summary (as per request of @antonmedv):
In v7 the autoloading inside Deployer has changed, which has the effect that third party recipes can't be loaded. A lot of fixes has been suggested, but doesn't work.

Duplicate of https://github.com/deployphp/deployer/issues/3605

For me, autoloading works as soon as i'm using dev-master. In every releases version, some autoload files get removed and thus its not working

authors: Smove antonmedv loevgaard sylvainraye


text:
FEATURE: Add native ssh implementation

Q
A

Bug fix?
No

New feature?
Yes

BC breaks?
No

Deprecations?
No

Fixed tickets
#348

This patch adds a new  'ssh_type' === 'native' to deeployer that uses local ssh and scp commands instead of php-ssh implementations.
Currently the server-options host, port, user and identity_file.private_key are supported. Since native ssh is used the settings of your ~/.ssh/config file apply to the connections.
The use of username + password is not implemented yet in favor of key-authentication.

This is a basic implementation of https://github.com/deployphp/deployer/issues/348

Cool! But please send in to 4.x branch. It will not ships with v3.

I rebased on 4.x but i my local test cases will not run with that branch (php error in recipe local). So i cannot test the complete code.

How can i restart styleCi ... the error is "We were unable to access the repo or commit to analyze it."  I am am quite sure this happened during the recent github problems.

@elfet Was this closed because of the changes in branch-naming and should be rebased and reopened or for a different reason?

@mficzel  it's renaming. Please, create new PR.

authors: elfet mficzel


text:
🛑 Derailed Home is down

In a96c82f, Derailed Home (https://derailed.one) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Derailed Home is back up in 84d1d13 after 323 days, 7 hours, 59 minutes.

repo: derailed-org/derailed-oss-status


text:
🛑 Derailed API is down

In c726887, Derailed API (https://derailed.one/api) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Derailed API is back up in 8a6079d.


text:
🛑 Derailed API is down

In 53b2656, Derailed API (https://derailed.one/api) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Derailed API is back up in d86a596.


text:
"getQueryParamValue" is case sensitive

Could getQueryParamValue ignore case sensitive?  So these will return the same result:
uri.getQueryParamValue("productId")
uri.getQueryParamValue("ProductId")
uri.getQueryParamValue("productid")
uri.getQueryParamValue("PRODUCTID")

What sort of environment are you working in that has case-insensitive URL params?

This is an issue for me as well... it's not that we have case sensitivity, it's that the library enforces it when searching, is the problem
I have code looking for uri.getQueryParamValue('iscloud')
A switch I have set in code that admins will type in bla?isCloud=true
However, if they typed what I just just wrote above, the code doesn't match it, and returns that the parameter 'iscloud' doesn't exist and returns null

@derek-watson The environment that requires case-insensitive is ANY that is called by a 3rd party. Where they know what query string provide.
jsURI currently forces them to construct their query string with EXACT casing, which is to me, just obviously wrong.

@derek-watson Would you accept pull request for this? I'm thinking adding a boolean argument will make sense.

@alFReD-NSH do you have a fork with the necessary change... I would like to go there.

@derek-watson , I made a pull request #63. I appreciate if you could have a look and tell me what you think.

In my opinion, case insensitivity should be the default. No one uses it on their file system and I cannot imagining a realistic use case for it. That this library has done it by default is a mistake.

#64
And this is pull request - sorry to compete but I have a few less calls to toLowerCase() than #63 as I store the lower case instance of the string and then the == comparison works without calling it explicitly every time

Please ignore my PR #64 - it has a bug in itself. I was over zealous in applying toLowerCase and the results returned are actually converted to all lower case as a result - which is not desirable either.
#63 looks like a good alternative

authors: PandaWood alFReD-NSH derek-watson tung-dang

repo: derek-watson/jsUri


text:
[BUG] Get Error 13 / permission denied

Hi,
after I start the .bat as admin, I get the following window:

Notice: After the traceback, there is obviously a problem with the permissions.  I thought that all permissions should work fine because I started the Batch as Admin.
Any help would be much appreciated!
Thanks for the good work!
All the best
J.

Similar issue: https://github.com/derekhe/msfs2020-google-map/issues/54


text:
Strings cut during debugging

What version of Delve are you using (dlv version)?
0.11.288

What version of Go are you using? (go version)?
1.7.3

What operating system and processor architecture are you using?
Software:

System Software Overview:
System Version: macOS 10.12 (16A323)
Kernel Version: Darwin 16.0.0
Processor: 2,4 GHz Intel Core 2 Duo

What did you do? Concatenate strings

What did you expect to see? Proper result of long string

What did you see instead? Cutting resulted string

This is my code:
package main

import (
	"os"
	"fmt"
)

func main() {
	fileName := os.Args[1]
	fmt.Println(fileName)
	cmd := fmt.Sprintf("%v%v%v", "file ", fileName, " -I")
	fmt.Println(cmd)
}

And this is screenshots of debugging process:

Similar issue was created on golang plugin repository for IDEA platforms:
https://github.com/go-lang-plugin-org/go-lang-idea-plugin/issues/2811
NOTE: Everything is fine when I send short strings.

This is by design (alternatively: the bug is in the plugin, not in delve). When clients request an expression evaluation from the server they have the option to specify the maximum length that we should read from a string.
The default for maximum string length is 64, we picked this value so that variables would fit into a small terminal window, other clients should pick a value that suits them.
By comparing the length of the Value field and the Len field it's possible to determine if the string was fully loaded or not. This is also a thing delve clients should do and signal truncated strings to the user, the default client does it.

repo: derekparker/delve


text:
Threshold / squelch for audio activation

[REQUIRED] Describe the feature you'd like:
I have a few cameras I like to monitor live. They have sound enabled but the environment has some background noise (wind, cars driving by, etc)
These are mostly very "quiet" noises but can still be annoying/distracting so I would love to have the option of an audio threshold level as of which audio would activate on the card.
So for example if there is a loud noise above a certain db-level like a scream audio would enabled, otherwise audio would be muted.
[OPTIONAL] Describe alternatives you've considered:
Tinycam app on android has this feature and it works great, however I want to implement this in home assistant as well.
https://www.tinycammonitor.com/manual/camera_audio.html
Thanks a lot for your work!
[OPTIONAL] Additional context:

Thanks for the request. I don't think it would make sense for the card to implement this. The card is not actively processing the video or audio at all. I think this is something that should happen on the Frigate backend, and when Frigate decides there is an event, the card reacts to that.
In fact, this might already work, have you played with [https://docs.frigate.video/configuration/audio_detectors/](audio detectors). The card can already react to Frigate events.

authors: dermotduffy ministryofsillywalks

repo: dermotduffy/frigate-hass-card


text:
Fix README

Description
Added table of contents to README.
Must

[ ] Tests
[x] Documentation (if applicable)

@gaokevin1 need to make sure the semantics here aligned with all other sdks.

repo: descope/node-sdk


text:
Read Only files show as being saved when they are not

Describe the bug
if a file is read only, the editor allows changes and the save buttons makes it seem like it worked, but the changes do not actually make it back into the file
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error
Actual behavior
Describe what is actually happening as a result of the repro steps

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS Version : [e.g. Win10 20H1, Win11 21H2, etc.]
App Version [e.g. 1.0.0.11]

Additional context
Add any other context about the problem here.

fixed in upcoming 1.0.0.44

repo: desjarlais/Notepad-Light


text:
Unexpected Indentifier

I am new with node.js, I don't understand what's wrong with my code. I just followed the instruction on your readme

You probably missed the first paragraph, regarding Node version requirement. You need to be on Node 8 to use async functions...

Alright! Thanks :)

authors: srbalan tinovyatkin

repo: destinationstransfers/passkit


text:
Can not set config and baseline in build.gradle.kts as these properties are val

tasks.withType<Detekt> {
    jvmTarget = "1.11"
    failFast = true
    buildUponDefaultConfig = true
    config = files("$projectDir/config/detekt.yml") // here is the issue
    baseline = file("$projectDir/config/baseline.xml") // here is the issue

    reports {
        html.enabled = true
        xml.enabled = true
        txt.enabled = true
    }
}

How to add baseline and configuration in this case?

More and more Gradle plugins switch to the Property syntax: config.set(files(...)).
Groovy based DSL can automatically transform config = files(... to this property syntax, Kotlin can't unfortunately.

Should we update our documentation then?

authors: BraisGabin NameAlex arturbosch

repo: detekt/detekt


text:
also create detektMetadataTest for MPP to analyse commonTest

Expected Behavior
code issues in commonTest are also discovered by detekt
Observed Behavior
Looks like commonTest is not analysed (only commonMain)
Steps to Reproduce

git clone https://github.com/robstoll/kbox
checkout new-MPP
there are specs in commonTest with a fake KDoc without full-stop, should be reported (as it is for jsMain and jvmMain)

Your Environment

Version of detekt used: 1.18.0
Version of Gradle used (if applicable): 7.1.1
Link to your project (if it's a public repository): https://github.com/robstoll/kbox

I've spent some time on this and I wasn't able to find an easy solution for it.
For some reason commonTest is not included in the source set that we receive from Kotlin Gradle
Plugin. Ideally it should be added to the source set of commonMain so that once we analyze it, we pass over commonTest as well. That's not the case.
I'm also unsure why this behavior is different from the "non-common" source sets. If anyone has deeper knowledge on KMP and Gradle setup please let us know 🙏

I don't know how detekt retrieves the source sets but the following:
project.afterEvaluate {
    println(the<org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension>().sourceSets.joinToString("\n"))
}

Shows commonTest:
source set commonMain
source set commonTest
source set jsMain
source set jsTest
source set jvmMain
source set jvmTest

I don't know how detekt retrieves the source sets but the following:

Detekt relies on the KotlinMultiplatformExtension (i.e. the kotlin{} block you use in your gradle file to register new targets). Namely we're interested in all the compilations from all the targets:
https://github.com/detekt/detekt/blob/fd0cb9096e9a664cad49bcfbbbe137c917d82bb9/detekt-gradle-plugin/src/main/kotlin/io/gitlab/arturbosch/detekt/internal/DetektMultiplatform.kt#L34-L38
I've added some println inside the loop and this is what we get from KGP:
Target: js - Compilation: main
Input: ./src/jsMain/kotlin ./build/externals/kbox/src
--
Target: js Compilation: test
Input: ./src/jsTest/kotlin
--
Target: jvm - Compilation: main
Input: ./src/jvmMain/kotlin ./src/jvmMain/java
--
Target: jvm - Compilation: test
Input: ./src/jvmTest/kotlin ./src/jvmTest/java
--
Target: metadata - Compilation: commonMain
--
Target: metadata - Compilation: main
Input: ./src/commonMain/kotlin

It's not sure if querying just .sourceset would resolve our problems, but it's probably worth investigating.
One things that comes on top of my mind is if we can successfully load the classpaths for those sourcesets or not. This is needed as external types are necessary to make type resolution works correctly.

The Kotlin Multiplatform Gradle Plugin has the following way of getting the common test source set:
private fun mostCommonSourceSets() = DefaultSourceSets(
        sourceSets.getByName(COMMON_MAIN_SOURCE_SET_NAME),
        sourceSets.getByName(COMMON_TEST_SOURCE_SET_NAME)
)

where COMMON_TEST_SOURCE_SET_NAME is defined as "commonTest"

Hi,
is there any news on this issue? I can't run detekt from the commonTest source folder.

Hi @cortinico,
I tried to investigate the problem and it seems that when the kotlin gradle plugin creates the metadata target, only the commonMain source set is registered, and for this reason, when the detekt plugin tries to get the source sets from each target, for the metadata one only commonMain is returned,
I've opened an issue on YouTrack for that. I hope it will be helpful 😃

authors: cortinico eygraber nicolasfara robstoll


text:
Fix [ClassOrdering] to treat extensions properties as functions.

Proposal of fixing the #3532 issue.

What's the status of this PR?

What's the status of this PR?

Please take a look at the discussion above.
https://github.com/detekt/detekt/pull/3559#pullrequestreview-612420252
I guess we should close this PR and reconsider it whenever the official Kotlin documentation gets updated in that regard. As a side note, I already closed the linked issue with the same argument.

authors: cortinico schalkms zayo


text:
🛑 OKTicket is down

In 466c206, OKTicket (https://www.okticket.es) was down:

HTTP code: 0
Response time: 0 ms

Resolved: OKTicket is back up in 981a286.

repo: dev-okticket/status


text:
Please invite me to the community

Name
CRAZY MONEY
Discord Username (if applicable)
No response
Additional Context
i MEET THE DEV Protocol Community on @github. I like the Technology and OSS and sponsorship. I want to join for the learning and networking experience.

Welcome 🎉

Welcome to the community!

authors: 1Crazymoney krishguptadev vinzvinci

repo: dev-protocol/community