#1635 FEAT: Set Docker image building process

Thank you for your contribution to the KodaDot NFT gallery.
👇  _ Do a quick check before the merge.
PR type

[ ] Bugfix
[x] Feature
[ ] Refactoring

Before submitting Pull Request, please make sure:

[x] My contribution builds clean without any errors or warnings
[x] I've merged recent default branch -- main-nuxt and I've no conflicts
[x] I've tried respect high code quality standards
[x] I've didn't break any original functionality
[ ] I've posted screenshot of demonstrated change in this PR

Optional

[x] I've tested it at </rmrk/collection/26902bc2f7c20c546a-1FVG7>
[x] I've tested PR on mobile and everything seems works
[ ] I found edge cases

What's new?

[x] PR closes #1635
Implemented an easy to use docker setup for KodaDot.
Supports Hot Module Replacement.
Updated docs.

Had issue bounty label ?

[ ] Fill up your KSM address: Payout

Community participation

[x] Are you at KodaDot Discord?

Screenshot

[ ] My fix has changed something on UI, a screenshot is best to understand changes for others.

Updated README.md with docs on how to run.

To publish the image to docker-hub, I'll need to setup an organization repository, and will need to pair with a maintainer. Ping me whenever available.

@roiLeo Did you do docker-compose up --build first?

@roiLeo Thanks for reviewing, I think you raise some valid first time questions and it'll probably be a good idea for me to add comments highlighting why specific steps exist.

2nd test:
Here's the command I've run
docker system prune

&
docker-compose up --build

[+] Building 631.5s (12/12) FINISHED
Nuxt Client build was rly long too.
Everything work now.

@roiLeo Glad you got it working!
Depending on the hardware you are running, virtualisation will always be slower compared to running on bare metal.
Do note, that building an image is a long process and only needed whenever a new image is fetched. From next time, to run KodaDot, you just need to do:
docker-compose up

@atharva3010 when I'm switching branch and try to docker compose up I've got this error:
Error response from daemon: Conflict. The container name "/Kodadot" is already in use by container "11608dda5116e2b58329ccb5facfde7585fabcd0236a33ef1854c669fbfb3d76". You have to remove (or rename) that container to be able to reuse that name.

any idea how to fix this?

@roiLeo You don't need to run docker-compose up again when you switch branches. It's already running 😀
Hot module replacement will detect the changes and you'll automatically see the new changes applied.
In cases when a new package has been added, docker will error out and you'll have to docker-compose up --build once again.

With node:lts it at least built for me.
At least working but still can not access it

Do not use the address mentioned by docker, that is not proxied, use localhost:9090

Do not use the address mentioned by docker, that is not proxied, use localhost:9090

yup works! perfect!
so now, how do we figure out why is listening to that address? Like first-time-contributor will be looking there at logs.

@yangwao I think the first time contributors will be aware of localhost:9090 from the readme where it states where it is listening.
Regarding "why it is listening to that address", honestly, because it's dockerised and running in a virtual machine. Nuxt being nuxt doesn't detect localhost there and outputs the port with the base address on it.

➜  nft-gallery git:(#1635) docker-compose up
WARNING: Found orphan containers (Kodadot) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Building frontend
[+] Building 72.1s (11/12)
 => [internal] load build definition from Dockerfile                                                              0.0s
 => => transferring dockerfile: 246B                                                                              0.0s
 => [internal] load .dockerignore                                                                                0.0s
 => => transferring context: 81B                                                                                0.0s
 => [internal] load metadata for docker.io/library/node:16.13.1-alpine3.14                                        2.3s
 => [auth] library/node:pull token for registry-1.docker.io                                                       0.0s
 => [internal] load build context                                                                                3.2s
 => => transferring context: 95.82MB                                                                              3.1s
 => [1/7] FROM docker.io/library/node:16.13.1-alpine3.14@sha256:a9b9cb880fa429b0bea899cd3b1bc081ab7277cc97e6d2dc  4.8s
 => => resolve docker.io/library/node:16.13.1-alpine3.14@sha256:a9b9cb880fa429b0bea899cd3b1bc081ab7277cc97e6d2dc  0.0s
 => => sha256:a9b9cb880fa429b0bea899cd3b1bc081ab7277cc97e6d2dcd84bd9753b2027e1 1.43kB / 1.43kB                    0.0s
 => => sha256:9801e92cc0764e0c53621116fb59c2588acafc220c00bd061eaee4e56d9da62e 1.16kB / 1.16kB                    0.0s
 => => sha256:8074a83d0ba920a4f47c82a57c32f90755335c78bf2c9d58cbb92b5d45b50ca9 6.55kB / 6.55kB                    0.0s
 => => sha256:9e51fd6710e5c813ca2d0ab03b2eb8f30e94f171a415275d6bf252a544f1ceb9 34.86MB / 34.86MB                  3.6s
 => => sha256:0b62c400df730add9d8c51843344107d05864a342452c6524cd0f5d67bd97976 2.41MB / 2.41MB                    1.4s
 => => sha256:5433f4536c226bb579aedeff3fd5d82defe2e010abd58a7c61a79d1eaf66174e 450B / 450B                        1.4s
 => => extracting sha256:9e51fd6710e5c813ca2d0ab03b2eb8f30e94f171a415275d6bf252a544f1ceb9                         0.9s
 => => extracting sha256:0b62c400df730add9d8c51843344107d05864a342452c6524cd0f5d67bd97976                         0.1s
 => => extracting sha256:5433f4536c226bb579aedeff3fd5d82defe2e010abd58a7c61a79d1eaf66174e                         0.0s
 => [2/7] WORKDIR /app                                                                                0.1s
 => [3/7] COPY package.json .                                                                                0.0s
 => [4/7] COPY yarn.lock .                                                                                0.0s
 => [5/7] RUN apk add --no-cache git                                                                              2.2s
 => ERROR [6/7] RUN yarn install                                                                                62.6s
------
 > [6/7] RUN yarn install:
#11 0.228 yarn install v1.22.15
#11 0.300 [1/5] Validating package.json...
#11 0.302 [2/5] Resolving packages...
#11 0.925 [3/5] Fetching packages...
#11 41.31 info<EMAIL_ADDRESS>The platform "linux" is incompatible with this module.
#11 41.31 info<EMAIL_ADDRESS>is an optional dependency and failed compatibility check. Excluding it from installation.
#11 41.32 info<EMAIL_ADDRESS>The platform "linux" is incompatible with this module.
#11 41.32 info<EMAIL_ADDRESS>is an optional dependency and failed compatibility check. Excluding it from installation.
#11 41.33 [4/5] Linking dependencies...
#11 41.33 warning " ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>#11 41.33 warning "@nuxtjs/apollo ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>|| ^4.0.0-0".
#11 41.33 warning "@nuxtjs/apollo > vue-cli-plugin-apollo ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>|| ^0.12.0 || ^0.13.0 || ^14.0.0".
#11 41.33 warning "@nuxtjs/apollo > vue-cli-plugin-apollo > apollo > apollo-language-server ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>|| ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0".
#11 41.34 warning "@nuxtjs/apollo > vue-cli-plugin-apollo > apollo > apollo-language-server > @apollographql/graphql-language-service-interface ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>|| ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0".
#11 41.34 warning "@nuxtjs/apollo > vue-cli-plugin-apollo > apollo > apollo-language-server > @apollographql/graphql-language-service-interface ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>|| ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0".
#11 41.34 warning "@nuxtjs/apollo > vue-cli-plugin-apollo > apollo > apollo-language-server > @apollographql/graphql-language-service-interface ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>|| ^0.13.0 || ^14.0.0".
#11 41.34 warning " ><EMAIL_ADDRESS>has unmet peer dependency "@polkadot/api@*".
#11 41.34 warning " ><EMAIL_ADDRESS>has unmet peer dependency "@polkadot/util@*".
#11 41.34 warning " ><EMAIL_ADDRESS>has unmet peer dependency "@polkadot/util-crypto@*".
#11 41.34 warning " ><EMAIL_ADDRESS>has unmet peer dependency "@polkadot/api@*".
#11 41.34 warning " ><EMAIL_ADDRESS>has unmet peer dependency "@polkadot/keyring@*".
#11 41.34 warning " ><EMAIL_ADDRESS>has unmet peer dependency "@polkadot/ui-settings@*".
#11 41.34 warning " ><EMAIL_ADDRESS>has unmet peer dependency "@polkadot/util@*".
#11 41.34 warning "@polkadot/ui-keyring ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>#11 41.34 warning "@polkadot/ui-keyring ><EMAIL_ADDRESS>has unmet peer dependency "@polkadot/networks@*".
#11 41.34 warning " ><EMAIL_ADDRESS>has unmet peer dependency "@polkadot/util@*".
#11 41.34 warning " ><EMAIL_ADDRESS>has unmet peer dependency "@polkadot/util-crypto@*".
#11 41.34 warning " ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>|| ^5.0.0".
#11 41.34 warning "nuxt ><EMAIL_ADDRESS>has unmet peer dependency "consola@*".
#11 41.34 warning " ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>#11 41.34 warning " ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>#11 41.34 warning "@nuxt/types ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>|| ^5.0.0".
#11 41.34 warning "@nuxt/typescript-build ><EMAIL_ADDRESS>has unmet peer dependency "webpack@>= 4".
#11 41.34 warning "@nuxt/typescript-build ><EMAIL_ADDRESS>has unmet peer dependency "webpack@*".
#11 41.34 warning " ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>#11 41.34 warning " ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>|| ^5.0.0".
#11 59.44 [5/5] Building fresh packages...
#11 60.99 error /app/node_modules/utf-8-validate: Command failed.
#11 60.99 Exit code: 1
#11 60.99 Command: node-gyp-build
#11 60.99 Arguments:
#11 60.99 Directory: /app/node_modules/utf-8-validate
#11 60.99 Output:
#11 60.99 gyp info it worked if it ends with ok
#11 60.99 gyp info using<EMAIL_ADDRESS>#11 60.99 gyp info using<EMAIL_ADDRESS>| linux | arm64
#11 60.99 gyp ERR! find Python
#11 60.99 gyp ERR! find Python Python is not set from command line or npm configuration
#11 60.99 gyp ERR! find Python Python is not set from environment variable PYTHON
#11 60.99 gyp ERR! find Python checking if "python3" can be used
#11 60.99 gyp ERR! find Python - "python3" is not in PATH or produced an error
#11 60.99 gyp ERR! find Python checking if "python" can be used
#11 60.99 gyp ERR! find Python - "python" is not in PATH or produced an error
#11 60.99 gyp ERR! find Python
#11 60.99 gyp ERR! find Python **********************************************************
#11 60.99 gyp ERR! find Python You need to install the latest version of Python.
#11 60.99 gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
#11 60.99 gyp ERR! find Python you can try one of the following options:
#11 60.99 gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
#11 60.99 gyp ERR! find Python   (accepted by both node-gyp and npm)
#11 60.99 gyp ERR! find Python - Set the environment variable PYTHON
#11 60.99 gyp ERR! find Python - Set the npm configuration variable python:
#11 60.99 gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
#11 60.99 gyp ERR! find Python For more information consult the documentation at:
#11 60.99 gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
#11 60.99 gyp ERR! find Python **********************************************************
#11 60.99 gyp ERR! find Python
#11 60.99 gyp ERR! configure error
#11 60.99 gyp ERR! stack Error: Could not find any Python installation to use
#11 60.99 gyp ERR! stack     at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:330:47)
#11 60.99 gyp ERR! stack     at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:159:21)
#11 60.99 gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:202:16)
#11 60.99 gyp ERR! stack     at PythonFinder.execFileCallback (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:294:16)
#11 60.99 gyp ERR! stack     at exithandler (node:child_process:404:5)
#11 60.99 gyp ERR! stack     at ChildProcess.errorhandler (node:child_process:416:5)
#11 60.99 gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
#11 60.99 gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
#11 60.99 gyp ERR! stack     at onErrorNT (node:internal/child_process:477:16)
#11 60.99 gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:83:21)
#11 60.99 gyp ERR! System Linux 5.10.47-linuxkit
#11 60.99 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
#11 60.99 gyp ERR! cwd /app/node_modules/utf-8-validate
#11 60.99 gyp ERR! node -v v16.13.1
#11 60.99 gyp ERR! node-gyp -v v8.3.0
#11 60.99 gyp ERR! not ok
#11 60.99 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
#11 61.15 warning Error running install script for optional dependency: "/app/node_modules/node-hid: Command failed.
#11 61.15 Exit code: 1
#11 61.15 Command: prebuild-install --runtime napi || node-gyp rebuild
#11 61.15 Arguments:
#11 61.15 Directory: /app/node_modules/node-hid
#11 61.15 Output:
#11 61.15 prebuild-install WARN install No prebuilt binaries found (target=3 runtime=napi arch=arm64 libc=musl platform=linux)
#11 61.15 gyp info it worked if it ends with ok
#11 61.15 gyp info using<EMAIL_ADDRESS>#11 61.15 gyp info using<EMAIL_ADDRESS>| linux | arm64
#11 61.15 gyp ERR! find Python
#11 61.15 gyp ERR! find Python Python is not set from command line or npm configuration
#11 61.15 gyp ERR! find Python Python is not set from environment variable PYTHON
#11 61.15 gyp ERR! find Python checking if \"python3\" can be used
#11 61.15 gyp ERR! find Python - \"python3\" is not in PATH or produced an error
#11 61.15 gyp ERR! find Python checking if \"python\" can be used
#11 61.15 gyp ERR! find Python - \"python\" is not in PATH or produced an error
#11 61.15 gyp ERR! find Python
#11 61.15 gyp ERR! find Python **********************************************************
#11 61.15 gyp ERR! find Python You need to install the latest version of Python.
#11 61.15 gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
#11 61.15 gyp ERR! find Python you can try one of the following options:
#11 61.15 gyp ERR! find Python - Use the switch --python=\"/path/to/pythonexecutable\"
#11 61.15 gyp ERR! find Python   (accepted by both node-gyp and npm)
#11 61.15 gyp ERR! find Python - Set the environment variable PYTHON
#11 61.15 gyp ERR! find Python - Set the npm configuration variable python:
#11 61.15 gyp ERR! find Python   npm config set python \"/path/to/pythonexecutable\"
#11 61.15 gyp ERR! find Python For more information consult the documentation at:
#11 61.15 gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
#11 61.15 gyp ERR! find Python **********************************************************
#11 61.15 gyp ERR! find Python
#11 61.15 gyp ERR! configure error
#11 61.15 gyp ERR! stack Error: Could not find any Python installation to use
#11 61.15 gyp ERR! stack     at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:330:47)
#11 61.15 gyp ERR! stack     at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:159:21)
#11 61.15 gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:202:16)
#11 61.15 gyp ERR! stack     at PythonFinder.execFileCallback (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:294:16)
#11 61.15 gyp ERR! stack     at exithandler (node:child_process:404:5)
#11 61.15 gyp ERR! stack     at ChildProcess.errorhandler (node:child_process:416:5)
#11 61.15 gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
#11 61.15 gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
#11 61.15 gyp ERR! stack     at onErrorNT (node:internal/child_process:477:16)
#11 61.15 gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:83:21)
#11 61.15 gyp ERR! System Linux 5.10.47-linuxkit
#11 61.15 gyp ERR! command \"/usr/local/bin/node\" \"/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
#11 61.15 gyp ERR! cwd /app/node_modules/node-hid
#11 61.15 gyp ERR! node -v v16.13.1
#11 61.15 gyp ERR! node-gyp -v v8.3.0
#11 61.15 gyp ERR! not ok"
#11 61.15 info This module is OPTIONAL, you can safely ignore this error
#11 61.82 info This module is OPTIONAL, you can safely ignore this error
#11 61.82 warning Error running install script for optional dependency: "/app/node_modules/usb-detection: Command failed.
#11 61.82 Exit code: 1
#11 61.82 Command: prebuild-install || node-gyp rebuild
#11 61.82 Arguments:
#11 61.82 Directory: /app/node_modules/usb-detection
#11 61.82 Output:
#11 61.82 prebuild-install WARN install No prebuilt binaries found (target=16.13.1 runtime=node arch=arm64 libc=musl platform=linux)
#11 61.82 gyp info it worked if it ends with ok
#11 61.82 gyp info using<EMAIL_ADDRESS>#11 61.82 gyp info using<EMAIL_ADDRESS>| linux | arm64
#11 61.82 gyp ERR! find Python
#11 61.82 gyp ERR! find Python Python is not set from command line or npm configuration
#11 61.82 gyp ERR! find Python Python is not set from environment variable PYTHON
#11 61.82 gyp ERR! find Python checking if \"python3\" can be used
#11 61.82 gyp ERR! find Python - \"python3\" is not in PATH or produced an error
#11 61.82 gyp ERR! find Python checking if \"python\" can be used
#11 61.82 gyp ERR! find Python - \"python\" is not in PATH or produced an error
#11 61.82 gyp ERR! find Python
#11 61.82 gyp ERR! find Python **********************************************************
#11 61.82 gyp ERR! find Python You need to install the latest version of Python.
#11 61.82 gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
#11 61.82 gyp ERR! find Python you can try one of the following options:
#11 61.82 gyp ERR! find Python - Use the switch --python=\"/path/to/pythonexecutable\"
#11 61.82 gyp ERR! find Python   (accepted by both node-gyp and npm)
#11 61.82 gyp ERR! find Python - Set the environment variable PYTHON
#11 61.82 gyp ERR! find Python - Set the npm configuration variable python:
#11 61.82 gyp ERR! find Python   npm config set python \"/path/to/pythonexecutable\"
#11 61.82 gyp ERR! find Python For more information consult the documentation at:
#11 61.82 gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
#11 61.82 gyp ERR! find Python **********************************************************
#11 61.82 gyp ERR! find Python
#11 61.82 gyp ERR! configure error
#11 61.82 gyp ERR! stack Error: Could not find any Python installation to use
#11 61.82 gyp ERR! stack     at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:330:47)
#11 61.82 gyp ERR! stack     at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:159:21)
#11 61.82 gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:202:16)
#11 61.82 gyp ERR! stack     at PythonFinder.execFileCallback (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:294:16)
#11 61.82 gyp ERR! stack     at exithandler (node:child_process:404:5)
#11 61.82 gyp ERR! stack     at ChildProcess.errorhandler (node:child_process:416:5)
#11 61.82 gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
#11 61.82 gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
#11 61.82 gyp ERR! stack     at onErrorNT (node:internal/child_process:477:16)
#11 61.82 gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:83:21)
#11 61.82 gyp ERR! System Linux 5.10.47-linuxkit
#11 61.82 gyp ERR! command \"/usr/local/bin/node\" \"/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
#11 61.82 gyp ERR! cwd /app/node_modules/usb-detection
#11 61.82 gyp ERR! node -v v16.13.1
#11 61.82 gyp ERR! node-gyp -v v8.3.0
#11 61.82 gyp ERR! not ok"
------
executor failed running [/bin/sh -c yarn install]: exit code: 1
ERROR: Service 'frontend' failed to build : Build failed

>>> /wip/nft-gallery   #1635  docker compose up --build                                                                  ✔  10163  11:45:36
[+] Building 8.1s (12/12) FINISHED
 => [internal] load build definition from Dockerfile                                                                                0.0s
 => => transferring dockerfile: 241B                                                                                0.0s
 => [internal] load .dockerignore                                                                                0.0s
 => => transferring context: 81B                                                                                0.0s
 => [internal] load metadata for docker.io/library/node:16.13.1-alpine3.14                                                                                0.7s
 => [1/7] FROM docker.io/library/node:16.13.1-alpine3.14@sha256:a9b9cb880fa429b0bea899cd3b1bc081ab7277cc97e6d2dcd84bd9753b2027e1                                             0.0s
 => [internal] load build context                                                                                7.1s
 => => transferring context: 106.73MB                                                                                7.1s
 => CACHED [2/7] WORKDIR /app                                                                                0.0s
 => CACHED [3/7] COPY package.json .                                                                                0.0s
 => CACHED [4/7] COPY yarn.lock .                                                                                0.0s
 => CACHED [5/7] RUN apk add --no-cache git                                                                                0.0s
 => CACHED [6/7] RUN yarn install                                                                                0.0s
 => CACHED [7/7] COPY . .                                                                                0.0s
 => exporting to image                                                                                0.1s
 => => exporting layers                                                                                0.0s
 => => writing image sha256:387f8584d66e2694aed5aeb0968ef900fa8083574705fb837c88fba870585f67                                                                                0.0s
 => => naming to docker.io/library/nft-gallery_frontend                                                                                0.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
[+] Running 2/2
 ⠿ Network nft-gallery_default  Created                                                                                0.1s
 ⠿ Container Kodadot            Created                                                                                0.5s
Attaching to Kodadot
Kodadot  | yarn run v1.22.15
Kodadot  | $ nuxt
Kodadot  | /bin/sh: nuxt: not found
Kodadot  | error Command failed with exit code 127.
Kodadot  | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Kodadot exited with code 127

Okay, pushed some more changes.

sudo is no longer required, being logged into docker is important to download images from dockerhub.
Set node to lts as alpine build was causing issues on some machines due to not bundling git and python by default.

Perfect! @atharva3010 let's add the KSM address so we can merge it! ;)

@yangwao done!

Perfect, I’ve sent the payout https://kusama.subscan.io/extrinsic/0x7deb276dc5964b973dda2926a3d52f236fc39346830b9232e3f0192111e91237
Let’s grab another issue and get rewarded!
https://github.com/kodadot/nft-gallery/issues/


Add missing types and version features

Fixes #239.
cc @sdroege @EPashkin

Looks good to me, but you also added some new functions that we didn't have before and the commit message does not mention that :) You didn't add all new functions though, only some (and there are also many from 1.12 that we are still missing IIRC).

I added all 1.14 and 1.16 functions/constants. I can add the 1.12 stuff as well. I'll do it in another PR though. I'll merge this one for the moment.

I can add the 1.12 stuff as well. I'll do it in another PR though. I'll merge this one for the moment.

Sure, not urgent. If someone needs it someone will ask for it :)

Too late, already implementing everything missing.


Is Docker the only built-in way to build chaincode?

Hi everyone!
First of all, thanks for the awesome work you put in here! :clap:
We're using the built-in way of installing the chaincode since v1.4.3 where the peer builds and deploys the chaincode container via CORE_VM_ENDPOINT env variable.
We're migrating now to K8s 1.23+ and preparing for the deprecation of Docker (now it's using containerd with runc as the default runtime). This is now getting a real hard-stuck brick wall for us, so I wanted to ask:

Is there a light, easy and set-this-env-var way to make this possible?
If not 1), can we utilize the external builder support in HLF v2+ to make it work with containerd and if yes, does anyone have some guidelines or similar scripts?
If not 1) or 2), any other smarter solution that doesn't involve chaincode-as-a-service and deploying external containers manually?

Thanks for your time!

@mbwhite  @jkneubuh

Hello @penumbra23  - thanks for you comments!

I don't think that there is a lightweight way to achieve this. The peer, by default is, going to try and contact the docker daemon to build and start processes.

Only by running docker-in-docker or something similar does the Peer orchestrating the images work  in K8S.

For the external builder support. This does allow great flexibility in how the containers are built when requested to do so via the peer.  The down side is that this has be custom written. Not aware of many people that have done this, one, maybe two.

For running in K8S, as shown in the test-network-k8s in fabric-samples the preferred route is to run the chaincode-as-a-service.

We've made a number of improvements to make this process easier - and if there are other things we can do we'd be interested to hear. Is it the deploying the containers for the chaincode that is the sticking point?

@mbwhite Thanks for your response!
As far as the external builder support goes, can it actually be set up so that it allows another container runtime to be built in OR is Docker the only way the peer builds the chaincode containers?
Regarding dind, I already managed to create a peer pod with a dind sidecar and it works (at least on the first glance, need to do more testing).
The problem for us is that we migrated to K8s 1.23 and to containerd as the runtime, but our Hyperledger infrastructure uses the built-in chaincode builder (CORE_VM_ENDPOINT must be set to Docker daemon socket).

@penumbra23
for the builtin support the Peer only knows about talking to the docker daemon; so for K8S you can easily disable that and use the external builder approach. Here the peer calls out to a (configured) set of binaries that take on the responsibility of building and deploying the chaincode. In whatever manner they wish - the peer really doesn't care how it's done, so long the chaincode is started.  With any external builder approach, the peer doesn't do anything with docker or any other container runtime.
Fabric 2.4 comes with a set of pre-built external chaincode binaries to support Chaincode-as-a-service 'out of the box'.

Okay, that seems like the way-to-go for us too.
@mbwhite Thanks for the info! Helped a lot!

Hi @penumbra23
Something to be aware of in this area is that the core.vm.endpoint attribute must be removed from your peer core.yaml configuration file.  If this attribute is present (even if null) the peer will attempt to connect to a local Docker daemon.

Thanks @jkneubuh for the info, didn't know about that since it wasn't in my core.yaml file 😄

Whoops!
vm.endpoint  (mapping to CORE_VM_ENDPOINT in the peer env)

Tips for bevel users:

build custom peer image with vm.endpoint commented out in /etc/hyperledger/fabric/core.yaml
remove CORE_VM_ENDPOINT: unix:///host/var/run/docker.sock in platforms/hyperledger-fabric/charts/peernode/templates/configmap.yaml


Add auto api configuration for application level service discovery

What this PR does:
#131 This PR implement LoadApplications for Zookeeper. It will automatically retrieve services' information from the metadata center and add API configuration in pixiu.

Codecov Report

:exclamation: No coverage uploaded for pull request base (feature/auto-api-config@7dcd364). Click here to learn what that means.
The diff coverage is n/a.

@@                    Coverage Diff                     @@
##             feature/auto-api-config     #220   +/-   ##
==========================================================
  Coverage                           ?   38.42%
==========================================================
  Files                              ?       43
  Lines                              ?     2699
  Branches                           ?        0
==========================================================
  Hits                               ?     1037
  Misses                             ?     1543
  Partials                           ?      119

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7dcd364...f692939. Read the comment docs.


chore: use rustls-tls

It removes the openssl dependency which is generally a pain to manage

Totally lost this on my radar @odyslam ! Yes I agree, rustls-tls is generally better


Something is wrong with our GCD method || test

Something is wrong with the GCD function! Not all of the tests are passing. Could use someone to take a look into it and see if it is the test itself that is broken, or if the function could use a refactor.
Acceptance Criteria:

Running yarn test gcd results in tests passing.
You have written a skeleton method for someone else to work on.
You have written tests surrounding your skeleton method.
Running yarn lint does not print any errors to the console!

Please include the skeleton of a new method + an accompanying test for someone else to work on at the time of creating a pull request! A pull request will most likely be denied if it does not contain a skeleton method for someone else to work on! For more information, please read the Contributing Guide.
Thank you so much for your contribution!

@BlakeGuilloud I am taking this up

Thanks @hariaakash !!

Closed! Thanks @hariaakash !!


No response body (Null) in the docs

OK
Here's what I investigated

PHP 7.1
"dingo/api": "1.0.*@dev",
"mpociot/laravel-apidoc-generator": "^2.0",
a fresh project with only few "users" REST routes with api.auth middleware
JWT token is VALID!

when calling command like this
php artisan api:generate --router="dingo" --routePrefix="v1" --actAsUserId=1 --header="Authorization : Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjEsImlzcyI6Imh0dHA6Ly9pbXVzaWZ5LmxhcmEubG9jL2FwaS9hdXRoZW50aWNhdGUiLCJpYXQiOjE0OTczNzEzNDYsImV4cCI6MTQ5NzM3NDk0NiwibmJmIjoxNDk3MzcxMzQ2LCJqdGkiOiJKeWlITWhvODZLcHVOZE1kIn0.mTNK1HO8b39QOrRBWlKfP5xxhLA2s_7RGgNiO4vD1so"
I got 'Null' on every response example in the docs...
I went to /Mpociot/ApiDoc/Generators/DingoGenerator.php method processRoute line 24 and dumped the exception here like this
try {
    $response = $this->getRouteResponse($route, $bindings, $headers);
} catch (Exception $e) {
    dump($e);
}

And gues what?!
I get Exception on EVERY call !!!
Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException {#2074
  -statusCode: 401
  -headers: array:1 [
    "WWW-Authenticate" => null
  ]
  #message: "Failed to authenticate because of bad credentials or an invalid authorization header."

That's why there's no response example on any route at all
If someone interested I attached stack_trace.txt here
Please someone tell how to fix or bypass this

And if I remove the middleware api doc response examples become something like this
{
    "exception": null,
    "headers": {},
    "original": {
        "id": 1,
        "email"<EMAIL_ADDRESS>        "name": "Barney Ledner",
        "birthday": "1980-11-05 00:00:00",
        "country": "Switzerland",
        "city": "Lake Tryciaport",
        "website": "hilpert.biz",
        "created_at": "2017-06-13 13:06:22",
        "updated_at": "2017-06-13 13:06:22"
    }
}

Instead of being transformed to
{
    "data": {
        "name": "Norberto Schmitt",
        "email"<EMAIL_ADDRESS>        "created": "2017-06-06"
    }
}

For example, I have a controller method
/**
     * List
     *
     * @transformercollection \App\Transformers\UserTransformer
     *
     * @response {
     *  data: [],
     * }
     * @return \Dingo\Api\Http\Response
     */
    public function index()
    {
        $users = User::paginate();

        return $this->response->paginator($users, new UserTransformer);
    }

api:generate command ignores all phpDoc notaions @transformercollection, @transformer, @response....

I think I responded to you earlier about the JWT header thing.... use the latest development build instead of version 2.0 to get access to this fix
As of writing, the Dingo generator doesn't recognise the @response doc block... I've forked the project and implemented it (but only for 1.7 since I'm stuck with Laravel 5.2 at the moment...). You could try and checkout my DingoGenerator.php file (but note that you will need to manually implement the changes to the file in this commit). No guarantees it will work for you as I haven't tested it thoroughly yet.

and what about transformers?
what about @transformer doc block?
any thoughts?

Here's my composer.json

and here's my /vendor/mpociot/laravel-apidoc-generator/src/Mpociot/ApiDoc/Generators/DingoGenerator.php

I managed to get responses from my routes using --header= option
But they are raw... and I need them transformed

And second thing is that some routes need special conditions to return right values (like auth routes)
and in that cases @response doc block comes handy...
but it doesn't work

So in conclusion...
If I use this package, I DON"T receive:

POST methods responses
customizing POST methods responses
transforming GET methods responses

So i'm not getting HALF of functionality it should be providing...
It appears bearly useful in real projects...
Sad but true

Ah yeah, the DingoGenerator seems to get little love compared to it's LaravelGenerator brother. I've been hacking away at the code recently so I've learned a lot about it.
All the doc block handling (@response and @transformer) is not included for Dingo routes at the moment. My personal fork for 1.7.0 works for @response (no testing of @transformer yet) but I've yet to port it over to the master branch and do a PR.
The code does not create POST/PUT/PATCH/DELETE method responses because it doesn't to deal with the hassle, which is why it uses @response. Unfortunately it doesn't work for Dingo atm.
As a quick hack (and also a test to see if my changes works for the master branch).... could you make the following code changes (back-up first, or at least know how to revert the changes):
Replace function processRoute() in file /vendor/mpociot/laravel-apidoc-generator/src/Mpociot/ApiDoc/Generators/DingoGenerator.php with:
    public function processRoute($route, $bindings = [], $headers = [], $withResponse = true)
    {
        $content = '';

        $routeAction = $route->getAction();
        $routeGroup = $this->getRouteGroup($routeAction['uses']);
        $routeDescription = $this->getRouteDescription($routeAction['uses']);
        $showresponse = null;

        if ($withResponse) {
            $response = null;
            $docblockResponse = $this->getDocblockResponse($routeDescription['tags']);
            if ($docblockResponse) {
                // we have a response from the docblock ( @response )
                $response = json_decode($docblockResponse->getContent());
                $showresponse = true;
            }
            if (! $response) {
                $transformerResponse = $this->getTransformerResponse($routeDescription['tags']);
                if ($transformerResponse) {
                    // we have a transformer response from the docblock ( @transformer || @transformercollection )
                    $response = json_decode($transformerResponse->getContent());
                    $showresponse = true;
                }
            }
            if (! $response) {
                try {
                    $response = $this->getRouteResponse($route, $bindings, $headers);
                    if (is_object($response)) {
                        $response = json_encode(json_decode($response->getContent(), JSON_PRETTY_PRINT));
                    }
                } catch (Exception $e) {
                }
            }
            $content = $response;
        }

        return $this->getParameters([
            'id' => md5($route->uri().':'.implode($route->getMethods())),
            'resource' => $routeGroup,
            'title' => $routeDescription['short'],
            'description' => $routeDescription['long'],
            'methods' => $route->getMethods(),
            'uri' => $route->uri(),
            'parameters' => [],
            'response' => $content,
            'showresponse' => $showresponse,
        ], $routeAction, $bindings);
    }

Add this completely new function anywhere in /vendor/mpociot/laravel-apidoc-generator/src/Mpociot/ApiDoc/Generators/DingoGenerator.php (THIS IS THE @transformer PARSER FUNCTION!)
    /**
     * Get a response from the transformer tags.
     *
     * @param array $tags
     *
     * @return mixed
     */
    protected function getTransformerResponse($tags)
    {
        try {
            $transFormerTags = array_filter($tags, function ($tag) {
                if (! ($tag instanceof Tag)) {
                    return false;
                }

                return \in_array(\strtolower($tag->getName()), ['transformer', 'transformercollection']);
            });
            if (empty($transFormerTags)) {
                // we didn't have any of the tags so goodbye
                return false;
            }

            $modelTag = array_first(array_filter($tags, function ($tag) {
                if (! ($tag instanceof Tag)) {
                    return false;
                }

                return \in_array(\strtolower($tag->getName()), ['transformermodel']);
            }));
            $tag = \array_first($transFormerTags);
            $transformer = $tag->getContent();
            if (! \class_exists($transformer)) {
                // if we can't find the transformer we can't generate a response
                return;
            }
            $demoData = [];

            $reflection = new ReflectionClass($transformer);
            $method = $reflection->getMethod('transform');
            $parameter = \array_first($method->getParameters());
            $type = null;
            if ($modelTag) {
                $type = $modelTag->getContent();
            }
            if (version_compare(PHP_VERSION, '7.0.0') >= 0 && \is_null($type)) {
                // we can only get the type with reflection for PHP 7
                if ($parameter->hasType() &&
                ! $parameter->getType()->isBuiltin() &&
                \class_exists((string) $parameter->getType())) {
                    //we have a type
                    $type = (string) $parameter->getType();
                }
            }
            if ($type) {
                // we have a class so we try to create an instance
                $demoData = new $type;
                try {
                    // try a factory
                    $demoData = \factory($type)->make();
                } catch (\Exception $e) {
                    if ($demoData instanceof \Illuminate\Database\Eloquent\Model) {
                        // we can't use a factory but can try to get one from the database
                        try {
                            // check if we can find one
                            $newDemoData = $type::first();
                            if ($newDemoData) {
                                $demoData = $newDemoData;
                            }
                        } catch (\Exception $e) {
                            // do nothing
                        }
                    }
                }
            }

            $fractal = new Manager();
            $resource = [];
            if ($tag->getName() == 'transformer') {
                // just one
                $resource = new Item($demoData, new $transformer);
            }
            if ($tag->getName() == 'transformercollection') {
                // a collection
                $resource = new Collection([$demoData, $demoData], new $transformer);
            }

            return \response($fractal->createData($resource)->toJson());
        } catch (\Exception $e) {
            // it isn't possible to parse the transformer
            return;
        }
    }

NOTE: This might mess things up so make sure you know how to revert or reinstall!
BTW, does the API end-points output correctly elsewhere (i.e. in a RESTful client like Postman)?

Almost forgot... you need to include this at the top of the DingoGenerator file...
use League\Fractal\Manager;
use League\Fractal\Resource\Item;
use Mpociot\Reflection\DocBlock\Tag;
use League\Fractal\Resource\Collection;

Also, do a print out of the $headers variable in processRoutes() while sending the auth token.... this is to see if the token is correctly being added (I had trouble in 1.7.0 as the --header option mangled my token)

Right now the problem with token solved
I managed to get responses from auth protected routes
I'll try your functions a bit later and will tell the result
Here's response at Postman

Works fine, transformers get applied

Hey mate, just so I can work these changes into my fork (and hopefully a PR) can you tell me your results?

will tell you results soon (~21-06-17)

Headers are fine
But I didn't manage to make it work...
Also u forgot use ReflectionClass; on the top

It might be my Transformer
class UserTransformer extends TransformerAbstract
{
    public function transform(User $user)
    {
        return [
            'id'       => $user->id,
            'name'     => ucwords($user->name),
            'email'    => $user->email,
            'birthday' => $user->birthday->toDateString(),
            'country'  => ucwords($user->country),
            'city'     => ucwords($user->city),
            'website'  => $user->website,
            'created'  => $user->created_at->toDateString(),
        ];
    }
}

Here's why

Your function somehow not fetching ID and timestamps of the model....
Any thoughts?

Thought it needs improving it gives expected results

Good job!

Also as an improvement
in case of multiple entities in the response
it would be nice to cut it up to 2 elems

My bad...
If you use @transformercollection it realy generates 2-piece response
But it cuts of the meta data...
It not so crusial and i believe is a subject for further improvements

If it helps
If I dump data here
                               $demoData = $newDemoData;
                            }
                        } catch (\Exception $e) {
                            // do nothing
                        }
                    }
                }
            }
dump($demoData);
            $fractal = new Manager();
            $resource = [];
            if ($tag->getName() == 'transformer') {
                // just one
                $resource = new Item($demoData, new $transformer);
            }

in the getTransformerResponse function
I get this
App\Models\Track {#1838
  #guarded: array:1 [
    0 => "id"
  ]
  #fillable: array:2 [
    0 => "name"
    1 => "url"
  ]
  #hidden: []
  #dates: []
  #casts: []
  #connection: null
  #table: null
  #primaryKey: "id"
  #keyType: "int"
  +incrementing: true
  #with: []
  #withCount: []
  #perPage: 15
  +exists: false
  +wasRecentlyCreated: false
  #attributes: array:3 [
    "name" => "Sint voluptatum est sed excepturi."
    "url" => "tracks/test.mp3"
    "user_id" => 10
  ]
  #original: []
  #dateFormat: null
  #appends: []
  #events: []
  #observables: []
  #relations: []
  #touches: []
  +timestamps: true
  #visible: []
}

I believe the reason is here
 // try a factory
$demoData = \factory($type)->make();

make() method won't create real DB record so there's no ID and timestamps

I haven't really tested the @transformer code (I just straight up copy-pasted it from LaravelGenerator.php and my project's API is a bit ancient and doesn't use transformers yet) so this is good to know.
Looking at the getTransformerResponse() function it tries to use the factory method to generate demo data, but if that fails it will try to grab real data from a database.
The other option is to edit your Transformer so that it doesn't call toDateString() if the data is null, like:
'created'  => (($user->created_at) ? $user->created_at->toDateString() : $user->created_at),
As for the missing 'meta' field... I'm not sure so I will have to look around.

If I comment  this section
  // try {
                //     // try a factory
                //     $demoData = \factory($type)->make();
                // } catch (\Exception $e) {

It works!

We're half way down the way with Dingo Generator))
@response still not working
This is what i have

And this is what i get

@almightynassar any thought how to make @response work?

Can you turn the data entry into a string, like:
@response {
    "data": [],
}

If that doesn't work, can you try without the @transformer \App\Transformers\TrackTransformer line in the doc block? Or maybe switch them around?
Also do a data dump of the $docblockResponse variable after it is set in processRoute().

@almightynassar doin it with fresh migration and seeding every time

But nothing changes....

dump of the $docblockResponse

Hmm well your dump shows that the doc block is being read... it is just not using it when it comes time to generating the output. The content and original fields hold the data we want.
$docblockResponse is supposed to be transferred to the $response variable (and then the $content variable is set with $response and converted into it's PRETTY_PRINT form). So even though $docblockResponse is set, it is getting overridden by one of the later if-else blocks. In fact, the Example Response section only shows if $showResponse is set to true... which should only happen if a value for $response is set, and it looks like $showResponse isn't being set at all.
Can you do a dump of $content and $showResponse before it get's returned?

Sure, but tomorrow
Ср, 21 черв. 2017 18:39 користувач Almighty Nassar<EMAIL_ADDRESS>пише:

Hmm well your dump shows that the doc block is being read... it is just
not using it when it comes time to generating the output. The content and
original fields hold the data we want.
$docblockResponse is supposed to be transferred to the $response variable
(and then the $content variable is set with $response and converted into
it's PRETTY_PRINT form). So even though $docblockResponse is set, it is
getting overridden by one of the later if-else blocks. In fact, the Example
Response section only shows if $showResponse is set to true... which should
only happen if a value for $response is set, and it looks like
$showResponse isn't being set at all.
Can you do a dump of $content and $showResponse before it get's returned?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/mpociot/laravel-apidoc-generator/issues/201#issuecomment-310119176,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFBBDLXEsNmAjwTueb7biI4vrb38pMjrks5sGTkpgaJpZM4N41Jc
.

also I dumped ready $parsedRoutes and it has right values

So it's up to Markdown generation... I keep investigating...

here I dumpred from writeMarkdown method of
/vendor/mpociot/laravel-apidoc-generator/src/Mpociot/ApiDoc/Commands/GenerateDocumentation.php
where it parsed routes

and it ALSO has that right response

then $parsedRouteOutput ALSO has it

I've found one issue
The response (somehow?) should be json parse two times to be an array (not a string)
In vendor/mpociot/laravel-apidoc-generator/src/Mpociot/ApiDoc/Generators/DingoGenerator.php
processRoute method I did this
 if ($withResponse) {
            $response = null;
            $docblockResponse = $this->getDocblockResponse($routeDescription['tags']);

            if ($docblockResponse) {
                // we have a response from the docblock ( @response )
                $response = json_decode(json_decode($docblockResponse->getContent()));
                $showresponse = true;
            }
....

notice json_decode(json_decode($docblockResponse->getContent()));
after that the response parsed to array finaly
BUT it still not showing in the docs... :sob:

Here's full dump of that parsed route
array:10 [
  "id" => "74bbc2252045e93d6e5e7ad8920c058c"
  "resource" => "Tracks"
  "title" => """
    Create\n
    Show the form for creating a new resource.
    """
  "description" => ""
  "methods" => array:1 [
    0 => "POST"
  ]
  "uri" => "/api/tracks"
  "parameters" => array:1 [
    "name" => array:5 [
      "required" => false
      "type" => "string"
      "default" => ""
      "value" => "distinctio"
      "description" => array:2 [
        0 => "Minimum: `2`"
        1 => "Maximum: `255`"
      ]
    ]
  ]
  "response" => {#1114
    +"data": {#1113
      +"id": 12
      +"name": "New Track"
      +"user_id": 5
      +"url": "http://imusify.lara.loc/storage/tracks/q1mu1b7N6DHAF608zURcGnljcQ00ju6wi17QgDyd.bin"
      +"created": "2017-06-20"
    }
  }
  "showresponse" => true
  "output" => """
    <!-- START_74bbc2252045e93d6e5e7ad8920c058c -->\n
    ## Create\n
    Show the form for creating a new resource.\n
    \n
    > Example request:\n
    \n
    ```bash\n
    curl -X POST "http://imusify.lara.loc//api/tracks" \\n
    -H "Accept: application/json" \\n
        -d "name"="distinctio" \\n
    \n
    ```\n
    \n
    ```javascript\n
    var settings = {\n
        "async": true,\n
        "crossDomain": true,\n
        "url": "http://imusify.lara.loc//api/tracks",\n
        "method": "POST",\n
        "data": {\n
            "name": "distinctio"\n
    },\n
        "headers": {\n
            "accept": "application/json"\n
        }\n
    }\n
    \n
    $.ajax(settings).done(function (response) {\n
        console.log(response);\n
    });\n
    ```\n
    \n
    \n
    ### HTTP Request\n
    `POST /api/tracks`\n
    \n
    #### Parameters\n
    \n
    Parameter | Type | Status | Description\n
    --------- | ------- | ------- | ------- | -----------\n
        name | string |  optional  | Minimum: `2` Maximum: `255`\n
    \n
    <!-- END_74bbc2252045e93d6e5e7ad8920c058c -->\n
    """
]

Just letting you know I'm still looking into this. Got caught up in some other projects.

It probably isn't related to your issue, but the DB::beginTransaction(); code I told you about in issue #204  for seems to error out on me. After a few route calls I start getting PDOExceptions and null values for the rest of my routes.
But this shouldn't be an issue for you since you are getting valid responses, just that the responses are not being added into the Blade template.
In the routes.blade.php partial, on around line 44 do a dump of $parsedRoute['response'] (something like <p>Route Response: {{$parsedRoute['response']}}</p> and see if it is still null there.

The other thing you need to output is $parsedRoute['showresponse']. If that is not set to true for POST|PUT|DELETE then the example response will not show up.

@almightynassar I don't know how to dump info from blade files. Do you know how?

@almightynassar I believe my changes to package tpl files won't take effect

The template files are stored in /vendor/mpociot/laravel-apidoc-generator/src/resources/views/partials/route.blade.php
You don't really need to dump the data, just display it
Sometimes the public/docs location doesn't get rebuilt, so you may have to delete the docs directory just so it correctly re-generates everything.

Well I tried... couple times, different ways... nothing...
Data seems to be in place but never printed in the template
And any changes I do with the blade files don't take effect
That's why I was asking
Пн, 26 черв. 2017 23:02 користувач Almighty Nassar<EMAIL_ADDRESS>пише:

The template files are stored in
/vendor/mpociot/laravel-apidoc-generator/src/resources/views/partials/route.blade.php
You don't really need to dump the data, just display it
Sometimes the public/docs location doesn't get rebuilt, so you may have to
delete the docs directory just so it correctly re-generates everything.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/mpociot/laravel-apidoc-generator/issues/201#issuecomment-311166009,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFBBDAfBtS8vZ1sQer2N10crxG0HRffEks5sIA5CgaJpZM4N41Jc
.

It's an annoying thing about Documentarian.... it seems to cache the files somewhere and only use the updated blade templates when it feels like. I hated it so much so that I added some code into my fork to turn off the part where it tries to intelligently "compare and update" the documentation.
The parts you want to comment out are in the GenerateDocumentation.php. Basically you need to look out for and comment out the following (my fork is heavily modified so let me know if things don't match up):

Anywhere that has $compareMarkdown

file_put_contents($compareFile, $compareMarkdown);

The whole if (file_exists($targetFile) && file_exists($compareFile)) { block

Delete any compare.md or similar file in public/docs and Documentarian should recreate everything from the base template (at least it does it for me).

Ok, I've bundled all of my custom changes to forked version of 1.7.0 and merged them into my fork of the master branch. This should include pretty much everything we talked about in this thread. Most importantly these changes have worked for me but I have yet to test them in a Laravel 5.4 environment.
I've put this out so you can do a compare of your edits with what I have. If you want to directly use my code in your project (and you are using composer), just add the following before your "require" entries into your composer.json
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/almightynassar/laravel-apidoc-generator"
        }
    ],

You should be able to keep your current "mpociot/laravel-apidoc-generator": "^2.0" or dev-master entry, but if it does not automatically use my branch just use "mpociot/laravel-apidoc-generator": "2.0.1"

@almightynassar sorry, was really busy
Experimented with templates but here what I found...
I published all necessary files while installing the package and among those were also blade templates for docs at resources/views/vendor/apidoc! :roll_eyes:
Than I commented out this IF section @if(in_array('GET',$parsedRoute['methods'])) and voila!
It works!

So theres no need to cut down all stuff related to $compareMarkdown ))

Thanks A LOT @almightynassar for your work!
hope @mpociot sees this thread and will accept your corrections

Sweet! I thought the publish feature only created the language files so I didn't bother with it (in hindsight I should have known better :smile: ). Glad it is finally working for you.

@c00p3r I can't find the directory resources/views/vendor/apidoc you told on comment. Can you show me where it is

@dinhquyf0

@dinhquyf0
you need to do this

It doesn't said clearly in the docs
But it actualy publishes two folders...
Source:
 $this->publishes([
           __DIR__.'/../../resources/lang' => $this->resource_path('lang/vendor/apidoc'),
            __DIR__.'/../../resources/views' => $this->resource_path('views/vendor/apidoc'),
]);


Translation Offered

Hi, I can translate from English to Arabic and vice versa. I was searching in the repo but didn't find anything related to the "translation" thing-y. Any recommendations from where to start?

This page says that vscode translations are provided via marketplace extensions.
You can check out how to create a language pack here.

Hi @loox37, thank you for your willingness to help! Right now we don't have support for right to left languages, here is the issue tracking it: https://github.com/Microsoft/vscode/issues/11770
Once that is added we would appreciate your help in translating. Here is the guide to contributing: https://github.com/Microsoft/Localization/wiki/Visual-Studio-Code-Community-Localization-Project

Damnit... I was looking forward to contribute in something :/
On Wed, Oct 3, 2018, 9:06 PM Rachel Macfarlane<EMAIL_ADDRESS>wrote:

Closed #59843 https://github.com/Microsoft/vscode/issues/59843.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode/issues/59843#event-1882615249, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AZlNubqGRetnS_o1CKvXMZMwDzf2ZUPmks5uhPyXgaJpZM4XElmO
.


High Memory Demand

There may be a memory leak in the thread as memory usage progressively increases until the program killed by the kernel.
Problem should come from af51e1ca6 and the following commits.

Hotfix: https://github.com/fsgmhoward/shadowsocks-py-mu/commit/841b172f2daa3f0263b9cc35132a5209bbb89473

Update: 841b172 only partially fixed the problem, and memory leak still occur (though not that serious compared to previous version). Further investigation required.

I have found that on several occasions, there is a burst in memory for 6 hours, which may relate to memory leak, while in most times, the memory demand is normal.

hi
has been fixed？

I found  memory leak when using udp(
Someone fixes it

@d4boy Merged
Further test in actual run required.

Tested for a week, no memory leaks
You can now close this issue

Confirmed. No memory leak observed.


Supporting Photo Continuity

Thanks for submitting a PR! Please read these instructions carefully:

[ ] Explain the motivation for making this change.
[ ] Provide a test plan demonstrating that the code is solid.
[ ] Match the code formatting of the rest of the codebase.
[ ] Target the master branch, NOT a "stable" branch.

Motivation (required)
now, when we take a photo, the app must be turnback, and when we want to take another photo, must click the button again。
after, we can take photo continuity.

add a param for an

Test Plan (required)

when the require release
i can test this require always

If you have added code that should be tested, add tests.

Did you intend to create a PR from master to fix-example?
The fix-example branch is stale and will be deleted soon.


fix(#748): mlflow creates new logging file for each logging operation

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

Current dependencies on/for this PR:

main

PR #740

PR #749   👈

This stack of pull requests is managed by Graphite.


Proof-of-concept mypy daemon support

References https://github.com/dense-analysis/ale/issues/1557

Thanks for taking a stab at this!

Your comment above may be referencing this (I don't quite follow the verbiage), but I'm noticing that if the first check you do with dmypy is on a single file like it is by default here, then you're going to get a bunch of unfollowed imports (this is especially obvious with --follow-imports=error). For me personally I think I'd prefer to have dmypy simply run on the entire project every time I do a change, since it's basically no performance cost and changes in one file can cause type errors elsewhere. For this I use dmypy run <options here> .. Maybe this should be a configurable option in this plugin.

You're right, this misses errors by only running mypy on the source file and ignoring e.g. user-defined types in the project.
Perhaps we should abandon this approach, and  go with an entirely separate linter as mentioned in the attached issue, which runs dmypy over the entire source tree.


Misleading error when attempting to evaluate extension pq file

I've found myself editing a connector's .pq file, then clicking "Evaluate current file" without first switching to the test .pq file.
When I do this, evaluation dies with an error complaining that an "export ... was exported multiple times" (for example, see the below). This is confusing as my code doesn't attempt to share two section members with the same name--so what I've written in my code doesn't align with the complaint received back.
Could this error message be revised to something more descriptive of the user-facing problem? Maybe some succinct variation of: "Sorry, you can't directly evaluate an extension file. Did you mean to instead evaluate a test file?"
[5:25:21 PM]	[Info]	RunTestBattery result [
    {
        "ActivityId": "e5441ead-91f0-46b3-802a-5b821e8570a0",
        "DataSourceAnalysis": [],
        "Details": "The export BenTest.Something was exported multiple times.",
        "EndTime": "2022-09-23T21:25:20.9928973+00:00",
        "Method": "BenTest.Something",
        "Name": "BenTest.pq",
        "StartTime": "2022-09-23T21:25:19.7544025+00:00",
        "Output": null,
        "RowCount": 0,
        "Status": "Failed",
        "TraceFileLocation": null,
        "Type": "PQTest.RunTest"
    }
]

I was puzzled by this error for so many hours!
Ben is absolutely right, I almost gave up on developing custom connector because of this error.
If I wouldn't find his comment I would be completely lost!

@wgrusznis I"m sorry, am i missing something ?
Are you suggesting that the error can be ignored ?

I'm suggesting to have a good read to the @bgribaudo comment.
As a total beginner to the SDK you will start to write a code then you will want to check if it even compiles and you find "Evaluate current file" and you will use it.
You will get an error "The export xxx was exported multiple times" and you will try for hours why this is happening.
Then you find hopefully bgribaudo comment on git and you realize you should switch to the test.PQ and only then run evaluate current file.
If you don't find this comment on git, most likely you already gave up on idea of developing custom connector.

Sorry where os the test .pq file?


Jeff/v2

Might need help to deploy this

I cannot deploy v2 due to an issue with git commit parsing.

~/CrisisTrends/node_modules/gift/lib/commit.js:145
      ref1 = /^.+? (.*) (\d+) .*$/.exec(line), m = ref1[0], actor = ref1[1], epoch = ref1[2];
                                                       ^

TypeError: Cannot read property '0' of null
    at Function.module.exports.Commit.actor (~/CrisisTrends/node_modules/gift/lib/commit.js:145:56)
    at Function.module.exports.Commit.parse_commits ~/CrisisTrends/node_modules/gift/lib/commit.js:111:21)
    at ~/CrisisTrends/node_modules/gift/lib/commit.js:71:39
    at ChildProcess.exithandler (child_process.js:189:7)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:920:16)
    at Socket.<anonymous> (internal/child_process.js:351:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:497:12)

Issue is the gulp-gh-pages module is using an outdated gift module
https://github.com/shinnn/gulp-gh-pages/issues/116

https://github.com/shinnn/gulp-gh-pages/pull/117
Watching the fix for gulp-gh-pages


Make a few edits to the CFN and CDK vs. pages

Quick summary:

Uses less in-the-weeds language early on in the doc
Fixes a few missing words
Adds a note about CFN hooks
Irons out a few little bumps in the prose

Thanks George!


Batch Actions for Updating Users

I have been receiving the following error when I try to update a batch of user's role to another type of role.  See the full trace below. I am not using Devise, but I do have a current_user method.
NameError in Admin::UsersController#batch_action

undefined local variable or method `current_admin_user' for #<Admin::UsersController:0x007f367a0b1d20> Did you mean? current_user

active_admin_role (0.1.0) lib/active_admin_role/active_admin/dsl.rb:11:in `block (2 levels) in role_changeable'
activeadmin (1.1.0) lib/active_admin/batch_actions/controller.rb:12:in `instance_exec'
activeadmin (1.1.0) lib/active_admin/batch_actions/controller.rb:12:in `batch_action'
actionpack (5.1.4) lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
actionpack (5.1.4) lib/abstract_controller/base.rb:186:in `process_action'
actionpack (5.1.4) lib/action_controller/metal/rendering.rb:30:in `process_action'
actionpack (5.1.4) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (5.1.4) lib/active_support/callbacks.rb:131:in `run_callbacks'
actionpack (5.1.4) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (5.1.4) lib/action_controller/metal/rescue.rb:20:in `process_action'
actionpack (5.1.4) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
activesupport (5.1.4) lib/active_support/notifications.rb:166:in `block in instrument'
activesupport (5.1.4) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
activesupport (5.1.4) lib/active_support/notifications.rb:166:in `instrument'
actionpack (5.1.4) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (5.1.4) lib/action_controller/metal/params_wrapper.rb:252:in `process_action'
activerecord (5.1.4) lib/active_record/railties/controller_runtime.rb:22:in `process_action'
actionpack (5.1.4) lib/abstract_controller/base.rb:124:in `process'
actionview (5.1.4) lib/action_view/rendering.rb:30:in `process'
actionpack (5.1.4) lib/action_controller/metal.rb:189:in `dispatch'
actionpack (5.1.4) lib/action_controller/metal.rb:253:in `dispatch'
actionpack (5.1.4) lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
actionpack (5.1.4) lib/action_dispatch/routing/route_set.rb:31:in `serve'
actionpack (5.1.4) lib/action_dispatch/journey/router.rb:50:in `block in serve'
actionpack (5.1.4) lib/action_dispatch/journey/router.rb:33:in `each'
actionpack (5.1.4) lib/action_dispatch/journey/router.rb:33:in `serve'
actionpack (5.1.4) lib/action_dispatch/routing/route_set.rb:834:in `call'
rack (2.0.3) lib/rack/etag.rb:25:in `call'
rack (2.0.3) lib/rack/conditional_get.rb:38:in `call'
rack (2.0.3) lib/rack/head.rb:12:in `call'
rack (2.0.3) lib/rack/session/abstract/id.rb:232:in `context'
rack (2.0.3) lib/rack/session/abstract/id.rb:226:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/cookies.rb:613:in `call'
activerecord (5.1.4) lib/active_record/migration.rb:556:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/callbacks.rb:26:in `block in call'
activesupport (5.1.4) lib/active_support/callbacks.rb:97:in `run_callbacks'
actionpack (5.1.4) lib/action_dispatch/middleware/callbacks.rb:24:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call'
web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app'
web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call'
web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch'
web-console (3.5.1) lib/web_console/middleware.rb:18:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app'
railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call'
activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged'
activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged'
railties (5.1.4) lib/rails/rack/logger.rb:24:in `call'
sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call'
rack (2.0.3) lib/rack/method_override.rb:22:in `call'
rack (2.0.3) lib/rack/runtime.rb:22:in `call'
activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call'
rack (2.0.3) lib/rack/sendfile.rb:111:in `call'
railties (5.1.4) lib/rails/engine.rb:522:in `call'
puma (3.10.0) lib/puma/configuration.rb:225:in `call'
puma (3.10.0) lib/puma/server.rb:605:in `handle_request'
puma (3.10.0) lib/puma/server.rb:437:in `process_client'
puma (3.10.0) lib/puma/server.rb:301:in `block in run'
puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread'
Request

Parameters:

{"utf8"=>"✓",
 "authenticity_token"=>"7ILEa/AoYVfkg9Czu3nmyfdljZ+qg00huRV8AQ9+pVjg1A/o/rR9VFQXGQih1aeLErTnJTNHH4tfNeM/IL+Zcg==",
 "batch_action"=>"assign_as_super_admin",
 "collection_selection_toggle_all"=>"on",
 "collection_selection"=>["2", "1"]}

@lgm1213 Hi. Thanks for your reporting. I created a patch for this issue, and released v0.1.1. Please update your installing this library, and configure current_user_method_name in config/initializers/active_admin_role.rb:
ActiveAdminRole.configure do |config|
  config.current_user_method_name = "current_user" # Add this line
end

If you face a new problem, please feel free to report in this repo's Issues. Thanks.


DataLink occasionally fails when containing points at the poles

When unpickling an object that contains a DataLink, the presence of a point with lon=0, lat=90 apparently makes the DataLinkCallback drop it and hence the DataLink fails with Exception: DataLink source data length must match target data length, found source length of 19 and target length of 20.
Also note that the data bizarrely enough are still present in the object for which the DataLink fails:
d2 = g.data[('Scatter', 'I')].data
d1 = g.data[('Overlay', 'I')].data[('Points', 'I')].data

both still containg the point at lon=0, lat=90.
I am not at all sure I've understood that that's what's going on but the problem seems to appear only after pickling/unpickling, not with the original layout.
import holoviews as hv
import numpy as np
hv.extension('bokeh')
import geoviews as gv
import pandas as pd
import cartopy.crs as ccrs
from holoviews.plotting.links import DataLink
from holoviews.core.io import Pickler, Unpickler

df = pd.DataFrame(np.random.rand(20,4)+88, columns=['lon', 'lat', 'x', 'y'])
# these two lines make it fail:
df.loc[1, 'lon'] = 0
df.loc[1, 'lat'] = 90

# fails:
a = gv.Points(df, ['lon', 'lat']).opts(projection=ccrs.NorthPolarStereo(), tools=['box_select'], padding=.1)
b = hv.Scatter(df, 'x', 'y')
DataLink(a,b)
l=gv.feature.land*a+b
l

Pickler.save(l, 'nb_temp/test')
g = Unpickler.load('nb_temp/test.hvz')
hv.render(g)

Instead of dropping points we could just replace them with nans.


Should I use IEmailSender?

The documentation for Microsoft.AspNetCore.Identity.UI.Services.IEmailSender reads "This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases."
This docs page tells me to implement the interface. Is this really needed? Does the Identity Framework actually use the implementation of IEmailSender? The default implementation does nothing.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: fe1bea60-d173-f6d2-3559-b147699e295a
Version Independent ID: 98e7aacb-2a01-d581-9b03-bfef2893163e
Content: Account confirmation and password recovery in ASP.NET Core
Content Source: aspnetcore/security/authentication/accconfirm.md
Product: aspnet-core
Technology: aspnetcore-security
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

Yes, it uses it.

Could you please elaborate? What for is it used? I removed my custom implementation of IEmailSender and still everything works as expected. Thanks!


owasp maven plugin 5.0.0-M1 ignores outputDirectory option

After upgrading to the latest version of the maven plugin, the outputDirectory  option is being ignored.
The plugin configuration I used can be found at https://gist.github.com/PBarri/c9d63b21ce8293f0edcab6d2e81dc4c6
The reports are being shown at the default project build directory, instead of the configured directory.

After digging out in the code, the problem might be at the function defined in https://github.com/jeremylong/DependencyCheck/blob/v5.0.0-M1/maven/src/main/java/org/owasp/dependencycheck/maven/BaseDependencyCheckMojo.java#L786 , which seems to ignore the setting defined in the outputDirectory parameter

I don't know what I was thinking when I removed that code - sorry.  This will be fixed in the next release.


Please also support iojs

The same code pass on node but error in iojs:

[SyntaxError:node_modules/fly-babel/index.js:2
return this.filter("babel", (src, opts) => {
^^
Unexpected token =>]

@rwu823 :+1:
It's coming in 0.1.1 with a more consistent support for other binaries as well :)

0.1.1 is out.
@rwu823 Let me know if you are still getting the same problem.

Hi @bucaran
I got some npm install  problems for 0.1.1, but 0.1.0 is fine. any ideas?
$ npm install -g fly

><EMAIL_ADDRESS>install /usr/local/lib/node_modules/fly/node_modules/chokidar/node_modules/fsevents
> node-gyp rebuild

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node
npm ERR! Darwin 14.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "fly"
npm ERR! node v0.12.5
npm ERR! npm  v2.11.2
npm ERR! path /usr/local/lib/node_modules/fly/bin/index
npm ERR! code ENOENT
npm ERR! errno -2

npm ERR! enoent ENOENT, chmod '/usr/local/lib/node_modules/fly/bin/index'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

This could be a problem with your python version. chokidar, uses fsevents, a native extension, hence node-gyp (node's favorite native extension build tool written in python) trying to compile that, though looking I am not completely sure.

@rwu823 Got it. Fixes soon in 0.1.2.

(Y) Nice, waiting for release

One problem was in package.json, it is now bin/index.js not bin/index.
But there is another problem with the plugins in the examples/ directory.

This should be fixed and working OK now. Please let me know if you have any other issues.
@rwu823


Update the protobuf-java dependency

Purpose
This is to fix the outdated protobuf dependency which causes the security vulnerability
https://github.com/ballerina-platform/ballerina-library/issues/7013

Closed this pr as the module has been deprecated now


AMBARI-25418 Cannot select any configuration in logsearch configuration editor (santal)

What changes were proposed in this pull request?
In the logsearch configuration editor it is not possible add or select another configuration. It is also not possible to navigate back the service log page.
The following error appears in the dev console.
ERROR Error: Uncaught (in promise): TypeError: e.find is not a function
TypeError: e.find is not a function
at main.bundle.js:1
at Array.forEach (<anonymous>)
at t.set as selection (main.bundle.js:1)
at t.writeValue (main.bundle.js:1)
at t._next (main.bundle.js:1)
at t.__tryOrSetError (vendor.bundle.js:999)
at t.next (vendor.bundle.js:999)
at t._next (vendor.bundle.js:999)
at t.next (vendor.bundle.js:999)
at t._emitFinal (vendor.bundle.js:999)
at l (polyfills.bundle.js:43)
at polyfills.bundle.js:43
at e.invokeTask (polyfills.bundle.js:36)
at Object.onInvokeTask (vendor.bundle.js:443)
at e.invokeTask (polyfills.bundle.js:36)
at t.runTask (polyfills.bundle.js:36)
at r (polyfills.bundle.js:36)
at o.invokeTask as invoke (polyfills.bundle.js:36)
at j (polyfills.bundle.js:8)
at XMLHttpRequest._ (polyfills.bundle.js:8)

Occasionally, after refreshing the page the error didn’t appear and everything worked fine.
How was this patch tested?
The patch was manually tested by loading the configuration editor and switching between existing configurations.

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/5568/
Test FAILed.
Test FAILured.

recheck

retest this please

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/5569/
Test FAILed.
Test FAILured.

retest this please

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/5570/
Test PASSed.

@aleksandrkovalenko @hiveww can you pls review?


Question  - embedded server - query HA STATUS using Java API

OrientDB Version: 2.2.36
Java Version: 8
OS: Windows
Expected behavior
Be able to use the Java API to query cluster HA STATUS when running in embedded mode:
https://orientdb.com/docs/2.2.x/SQL-HA-Status.html
Actual behavior
Could not  find in documentation.
When executing as a query get the following exception:
com.orientechnologies.orient.core.exception.OCommandExecutionException: Cannot execute non idempotent command
Steps to reproduce
This is a question

Should be something like:
OCommandSQL command = new OCommandSQL("HA STATUS -servers -servers"); ODatabaseRecordThreadLocal.instance().get().getStorage().command(command);

Thanks! Tried and it works
(except the thread local returned null so I used this instead:
server.getSystemDatabase().openSystemDatabase().getStorage().command(command);


feat: Add preliminaru support to provided buffer rings

These provided buffer rings can be used by kernel for multishot operations to read the data directly into these buffers. No functionality changes yet, a test will be followed up with socket changes.
Also did some code clean ups on a way with echo server and ping_iouring_server (no functionality changes).

Codecov Report
Attention: 44 lines in your changes are missing coverage. Please review.

Comparison is base (9e64c47) 79.02% compared to head (b3aeb43) 78.50%.

Files
Patch %
Lines

util/fibers/uring_proactor.cc
18.51%
44 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #198      +/-   ##
==========================================
- Coverage   79.02%   78.50%   -0.52%
==========================================
  Files         100      100
  Lines        7527     7573      +46
==========================================
- Hits         5948     5945       -3
- Misses       1579     1628      +49

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Kusto Kernel New Notebook Changes

This PR enables the New Notebook from Kusto Cluster functionality and properly changes the kernel and the attach to connection based on the provider they are connected to.

Pull Request Test Coverage Report for Build 236511433

1 of 31 (3.23%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.04%) to 38.988%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/sql/workbench/contrib/notebook/browser/notebookActions.ts
0
6
0.0%

src/sql/workbench/services/notebook/browser/models/notebookModel.ts
1
25
4.0%

Totals

Change from base Build 236352209:
-0.04%

Covered Lines:
18925

Relevant Lines:
44332

💛  - Coveralls

Will be adding tests to cover the new Kernel Alias scenarios.

There's a failing test, but it should be easy to fix (assuming that the behavior is as you want it to be).


Adds a deprecation warning for drop-down-icon

This component really should have had a deprecation warning from 0.14.0 when the old ./menu/menu implementation was deprecated. This component is not used in any other components in src or docs. It also is not documented on the site. I think we should add this warning ASAP and plan for removal along with ./menu/menu in our first 0.15.0 release candidate.

Another Easter Egg :laughing: :laughing: Thanks :+1: :+1:

Good idea :+1:.

@alitaheri I think that we can merge it.

@newoga Thanks :+1: :+1:


Attempting to run, experiencing import error

I am trying to run the backend on a debian linux server with A100 GPU.
After installing all pip packages and PyAudio, I try to run and get this error
~/WhisperLive$ python run_server.py --port 9090                       --backend faster_whisper
Traceback (most recent call last):
  File "/home/lucasnegritto/WhisperLive/run_server.py", line 2, in <module>
    from whisper_live.server import TranscriptionServer
  File "/home/lucasnegritto/WhisperLive/whisper_live/server.py", line 12, in <module>
    from whisper_live.transcriber import WhisperModel
  File "/home/lucasnegritto/WhisperLive/whisper_live/transcriber.py", line 16, in <module>
    from faster_whisper.audio import decode_audio, pad_or_trim
ImportError: cannot import name 'pad_or_trim' from 'faster_whisper.audio' (/opt/conda/envs/whisper/lib/python3.12/site-packages/faster_whisper/audio.py)

I also tried docker, but it seems it halts on CUDA message:
docker run -it --gpus all -p 9090:9090 ghcr.io/collabora/whisperlive-gpu:latest

==========
== CUDA ==
==========

CUDA Version 12.2.2

Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.

This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license

A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.

perhaps a specific version of python is required for the local version? looking for any ideas on how to break past these issues, thanks

@kalradivyanshu thank you! this totally solved my problem


Fix Mummy Dedication ChoiceSet activating

Applying the Mummy Dedication to a character triggers a wall of warnings in the console regarding an ignored RuleElement and fails to trigger the ChoiceSet prompt.
Simply moving the ChoiceSet up the list of REs resolves the issue and allows the ChoiceSet to trigger.

Well that's odd.

Not related, but the predicate on the fire weakness looks incorrect?
"predicate": [
	{
		"not": "feat:sealed-poppet"
	}
]


🚀 Feature: Optionally specify LDAP filters as YAML

🔖 Feature description
Have the option to express LDAP filters used by the LDAP entity provider as YAML rather than a single string. So for example, the following LDAP provider config:
ldap:
  providers:
    - target: ldaps://ds.example.net
      bind:
        dn: uid=ldap-reader-user,ou=people,ou=example,dc=example,dc=net
        secret: ${LDAP_SECRET}
      groups:
        dn: ou=access,ou=groups,ou=example,dc=example,dc=net
        options:
          filter: (&(objectClass=group)(!(groupType=email))(|(cn=devx-users)(cn=users-preview)(cn=exlib-users-bb)))

Could be rewritten as
ldap:
  providers:
    - target: ldaps://ds.example.net
      bind:
        dn: uid=ldap-reader-user,ou=people,ou=example,dc=example,dc=net
        secret: ${LDAP_SECRET}
      groups:
        dn: ou=access,ou=groups,ou=example,dc=example,dc=net
        options:
          filter:
            and:
              - objectClass=group
              - not: {groupType: email }
              - or:
                - cn: dev-users
                - cn: users-preview
                - cn: exlib-users-bb

If the provider sees a string in its config, then it uses it as the ldap filter, otherwise, it uses the data structure to build the filter before passing it in.
🎤 Context
Organizations with very large, very mature LDAP installations may want to be very selective about which entities they ingest from their LDAP directory. As a result, the filter parameter provided by the LDAP entity provider config can very quickly become unwieldy. The snippet I've shown above is actually tame by comparison to some of the real world scenarios we've seen.
For example Let's say that we wanted to add another group to ingest to the list. If we have to first mentally parse the filter expression to figure out where to insert it, and then add our new expression hoping that we balance it correctly in the tree. It becomes exponentially more difficult as the size and complexity of the expression increases.
By contrast, adding another group name to select is trivial if the tree represented by the filter expression is reflected directly in the configuration. It's as simple as adding another name to the list.
✌ Possible Implementation
The ldapjs library already has a builder syntax for programmatically constructing filters and then serializing them into a filter string. It seems to me the simplest implementation would be if the filter parameter could take either a string or filter structure. If it's a string, that's the current behavior, and it just passes the string directly. Otherwise, if it's a record, it will use the ldapjs filter builders to construct the filter and generate the string.
👀 Have you spent some time to check if this feature request has been raised before?

[X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

[X] I have read the Code of Conduct

Are you willing to submit PR?
Yes I am willing to submit a PR!

I don't feel it's very tempting to invent a custom format for this. I'm envisioning that this query format is copy pasted across systems anyway, where it's tested out for sanity elsewhere etc.
Are these white space insensitive? If so, you could use yaml block strings.
options:
  filter: >
    &
       ( objectClass = group )
       ! ( groupType = email )
       |
          ( cn = dev-users )
          ...

Unfortunately not https://runkit.com/cowboyd/ldap-filters-are-one-line-only

Maybe we could be helpful and strip whitespace? 🤔

Incidentally, this would be another use-case for the YAML interpreter we demo'd last October. In that case, we were using it to extend the UI safely and without JavaScript, but here it would allow folks to extend their own configuration syntax without any need to change backstage itself.
$import:
  makeLdapFilter: ./config-helpers.yaml
ldap:
  providers:
    - target: ldaps://ds.example.net
      bind:
        dn: uid=ldap-reader-user,ou=people,ou=example,dc=example,dc=net
        secret: ${LDAP_SECRET}
      groups:
        dn: ou=access,ou=groups,ou=example,dc=example,dc=net
        options:
          filter:
            $makeLdapFilter:
              and:
              - objectClass=group
              - not: {groupType: email }
              - or:
                - cn: dev-users
                - cn: users-preview
                - cn: exlib-users-bb

I'm closing as this use-case is better suited for a general model for extending configuration rather than a one-off DSL just for LDAP.


Auto hide taskbar

Describe the solution you'd like
An option to autohide the taskbar for more screen space.

Duplicate of #374


Improved time to first paint

intl pollyfil should included before our main js, opening pr for testing the impact of moving js into bottom.

Deployed to: http://staging.quran.com:33176


{Compute} Update vm test with new versioned image aliases

Related command

az vm image
Description

Update vm tests with old versioned image alias because in Ignite (November) 2023, the aliases without version suffix (such as: UbuntuLTS, CentOS, Debian, Flatcar, SLES, openSUSE-Leap and RHEL) will be removed.
Related PRs:
https://github.com/Azure/azure-cli/pull/26483
https://github.com/Azure/azure-cli/pull/25930
Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.

[ ] I adhere to the Command Guidelines.

[ ] I adhere to the Error Handling Guidelines.

Compute


TFCONFIG needs to set environment:cloud to support older versions.

Older versions of TF (something like TF <=1.6) depend on the field
environment in the TF_CONFIG to determine whether job is running distributed
or not. We need to set it to environment: cloud so that it TF.estimator API
will work correctly.

Later versions of TF; e.g. TF 1.8 don't use the environment field. So
the existence of the environment field should be a null op.

Related to: #761

This change is

/assign @gaocegege
/assign @kunmingg

Coverage increased (+15.6%) to 72.26% when pulling 75f136f9b29023dd72491196260dae841c569450 on jlewi:estimator_fix into e66b23dfa6a992900ebbfcf8661acf1fc2a623d0 on kubeflow:master.

/lgtm

/approve


Feature/multi protocol

In the process of using ocelot, need to support RPC protocols other than HTTP, so refactoring request and requester middleware support multi-protocol, default support HTTP, Https, can build on this code to support other RPC protocol, can extend the request and requester two middleware on the existing code infrastructure。 @TomPallister Please suggest that this can be merged into the code base, mainly the original HTTP code refactoring, according to the schema of the route extension of other protocols

@geffzhang thanks for the contribution! :) I'll take a look at this as my next priority!

@geffzhang thanks for the PR I really appreciate the effort.
I have looked at the code and there is a problem with code coverage..when I run build.ps1 the build is failing because we don't have enough tests for the new code.
Report generation took 3.3 seconds We are not running on the build server so we won't publish the coverage report to coveralls.io Sequence Coverage: 74.20 An error occurred when executing task 'RunUnitTests'. Error: Code coverage fell below the threshold of 76.4%. You can find the code coverage report at https://coveralls.io/github/TomPallister/Ocelot
I was also thinking that maybe the design could be improved and performance. With this code we build  another middleware pipeline during the users request based on the scheme from the configuration. However we know the scheme when ocelot starts so we could set this up at runtime rather than during a user request.
If you look at ILoadBalancerHouse and how we use that you can see we set up the infrastructure when Ocelot starts and then get it out of memory when we need it which is faster than building it during the users request.
I appreciate that this is probably only milliseconds worth of difference but its still faster!
Also I've been looking at converting to .NET Core 2.0 and I'm not sure at the moment we can do things like this yet!
Anyway thanks for the PR the code looks good but can you take a look at my comments and see what you can do?

@TomPallister Your suggestion is very good, which is also I did not consider the place, I follow your guidance to refine this part of the code


it shouldn't turn ** in to Math.pow for BigInt on runtime

Description
Because of recommended default use of https://babeljs.io/docs/en/babel-plugin-transform-exponentiation-operator
in React Native, the (**) operator is converted to Math.pow and Math.pow doesn't support bigint which causes error.
I found same issues with that babel plugin in CRA issues and on babel issues
https://github.com/facebook/create-react-app/issues/10785
https://github.com/babel/babel/issues/13109
Version
0.68.2
Output of npx react-native info
System:
OS: macOS 12.2
CPU: (10) arm64 Apple M1 Max
Memory: 24.33 GB / 64.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 18.0.0 - /opt/homebrew/bin/node
Yarn: 1.22.18 - /opt/homebrew/bin/yarn
npm: 8.6.0 - /opt/homebrew/bin/npm
Watchman: 2<IP_ADDRESS> - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/lib/ruby/gems/3.0.0/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8512546
Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild
Languages:
Java: 11.0.15 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.2 => 0.68.2
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Just try to use ** operator with BigInts
i.e.
console.log(2n ** 2n);
will return TypeError: Conversion from 'BigInt' to 'number' is not allowed.
Snack, code example, screenshot, or link to a repository

I don't ask questions here, I see a bug introduced by default babel preset that is used in RN


Fix typos; improve wording

As the title says.

The failed test is probably a flaky test, since the vectors are generated randomly and therefore it is possible that vectors other than "dog" might be closer to "cat" vector. Note that adding a large number to "cat" and "dog" vectors does not necessarily make them similar in terms of cosine similarity (though, that trick may work if another metric, e.g. euclidean, is used instead).

Thanks for submitting a pull request 🚀 @tmbo will take a look at it as soon as possible ✨


Extract looper from central and reuse for json/xml_rpc

Codecov Report
Attention: Patch coverage is 76.14679% with 26 lines in your changes are missing coverage. Please review.

Project coverage is 89.58%. Comparing base (ec5d62b) to head (5169734).
Report is 47 commits behind head on devel.

Files
Patch %
Lines

hahomematic/async_support.py
69.51%
25 Missing :warning:

hahomematic/platforms/device.py
75.00%
1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #1505      +/-   ##
==========================================
- Coverage   90.42%   89.58%   -0.85%
==========================================
  Files          49       50       +1
  Lines        6037     6191     +154
==========================================
+ Hits         5459     5546      +87
- Misses        578      645      +67

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


feat(CVP-4333): add helper functions for fips operator checks

this commit adds two helper functions named get_image_labels and extract_related_images_from_bundle to avoid code duplicatioin in build-definitions tasks

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Please upload report for BASE (main@a41245d). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff            @@
##             main      #337   +/-   ##
========================================
  Coverage        ?   100.00%
========================================
  Files           ?        18
  Lines           ?       502
  Branches        ?         0
========================================
  Hits            ?       502
  Misses          ?         0
  Partials        ?         0

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

@dirgim @arewm Could you please take a look?