Windows: make.ps1 and dockerfile for native builds

Signed-off-by: John Howard<EMAIL_ADDRESS>
Updates dockerfile.Windows to support Windows 10 Hyper-V containers
Updates dockerfile.Windows to get closer to nanoserver support (still some issues)
Introduces new hack\make.ps to go with .go-autogen.ps1

make.ps1 provides the minimum necessary to support Windows CI (and local development on Windows, with the exception of integration tests) without the use of bash (required for nanoserver support). It's no-where near as full-featured as the Linux version, but doesn't need to be.
Current it supports:

Building of binaries (with params for compiler optimisation; race; force all; verbose etc)
Unit Tests
Basic validation used by Windows CI: gofmt; pkg import; DCO

This is a 1.13 PR. The CI servers have been updated, but unless this makes it into 1.13, for the same reasons as for introducing .go-autogen.ps1 in https://github.com/docker/docker/pull/28455, CI will start failing on 1.13 builds, but succeed on master once the CI servers move forward to remove temporary workarounds.

Yes, SQLite is very relevant on Windows. (Esp for local development, saves a ton of time waiting for builds do complete). In fact I almost never build a static binary with it linked in.
PS (This PR is not ready for review!!!)

@friism @StefanScherer @johnstep  FYI.
Moving to code review. This is "good enough" for pulling back into 1.13 to ensure CI keeps running on 1.13 as we move forward on master/1.14. Essentially for the same reasons as for https://github.com/docker/docker/pull/28455. @vieux @thaJeztah
I've updated the CI servers with a temporary hack, so it should be green once complete, and have verified it is exercising this new make.ps1 file rather than using bash.

Local verification: Building the image

Running everything
PS E:\go\src\github.com\docker\docker> docker run --rm docker hack\make.ps1 -All
INFO: make.ps1 starting at 11/29/2016 22:21:53
INFO: Invoking autogen...
INFO: Building daemon...
                                                                                INFO: Building client...
INFO: Validating Developer Certificate of Origin...
Congratulations!  All commits are properly signed with the DCO!
INFO: Validating go formatting on changed files...
Congratulations!  All Go source files are properly formatted.
INFO: Validating pkg import isolation...
Congratulations!  "./pkg/..." is safely isolated from internal code.
INFO: Running unit tests...
ok      github.com/docker/docker/api    0.253s  coverage: 87.3% of statements
?       github.com/docker/docker/api/errors     [no test files]
ok      github.com/docker/docker/api/server     0.200s  coverage: 6.5% of statements
ok      github.com/docker/docker/api/server/httputils   0.111s  coverage: 18.8% of statements
ok      github.com/docker/docker/api/server/middleware  0.159s  coverage: 19.0% of statements
?       github.com/docker/docker/api/server/router      [no test files]
?       github.com/docker/docker/api/server/router/build        [no test files]
?       github.com/docker/docker/api/server/router/checkpoint   [no test files]
?       github.com/docker/docker/api/server/router/container    [no test files]
?       github.com/docker/docker/api/server/router/image        [no test files]
?       github.com/docker/docker/api/server/router/network      [no test files]
?       github.com/docker/docker/api/server/router/plugin       [no test files]
?       github.com/docker/docker/api/server/router/swarm        [no test files]
?       github.com/docker/docker/api/server/router/system       [no test files]
?       github.com/docker/docker/api/server/router/volume       [no test files]
?       github.com/docker/docker/api/types      [no test files]
?       github.com/docker/docker/api/types/backend      [no test files]
?       github.com/docker/docker/api/types/blkiodev     [no test files]
?       github.com/docker/docker/api/types/container    [no test files]
?       github.com/docker/docker/api/types/events       [no test files]
ok      github.com/docker/docker/api/types/filters      0.058s  coverage: 96.6% of statements
?       github.com/docker/docker/api/types/mount        [no test files]
?       github.com/docker/docker/api/types/network      [no test files]
ok      github.com/docker/docker/api/types/reference    0.058s  coverage: 100.0% of statements
?       github.com/docker/docker/api/types/registry     [no test files]
ok      github.com/docker/docker/api/types/strslice     0.069s  coverage: 90.0% of statements
?       github.com/docker/docker/api/types/swarm        [no test files]
ok      github.com/docker/docker/api/types/time 0.070s  coverage: 100.0% of statements
ok      github.com/docker/docker/api/types/versions     0.087s  coverage: 75.0% of statements
?       github.com/docker/docker/api/types/versions/v1p19       [no test files]
?       github.com/docker/docker/api/types/versions/v1p20       [no test files]
?       github.com/docker/docker/api/types/volume       [no test files]
?       github.com/docker/docker/autogen/winresources/docker    [no test files]
?       github.com/docker/docker/autogen/winresources/dockerd   [no test files]
ok      github.com/docker/docker/builder        0.840s  coverage: 64.6% of statements
ok      github.com/docker/docker/builder/dockerfile     0.262s  coverage: 48.5% of statements
?       github.com/docker/docker/builder/dockerfile/command     [no test files]
ok      github.com/docker/docker/builder/dockerfile/parser      0.117s  coverage: 82.8% of statements
?       github.com/docker/docker/builder/dockerfile/parser/dumper       [no test files]
ok      github.com/docker/docker/builder/dockerignore   0.062s  coverage: 91.3% of statements
?       github.com/docker/docker/cli    [no test files]
?       github.com/docker/docker/cli/command    [no test files]
ok      github.com/docker/docker/cli/command/bundlefile 0.068s  coverage: 84.6% of statements
?       github.com/docker/docker/cli/command/checkpoint [no test files]
?       github.com/docker/docker/cli/command/commands   [no test files]
ok      github.com/docker/docker/cli/command/container  0.158s  coverage: 1.8% of statements
ok      github.com/docker/docker/cli/command/formatter  0.203s  coverage: 54.4% of statements
?       github.com/docker/docker/cli/command/idresolver [no test files]
ok      github.com/docker/docker/cli/command/image      0.172s  coverage: 1.1% of statements
ok      github.com/docker/docker/cli/command/inspect    0.146s  coverage: 65.4% of statements
?       github.com/docker/docker/cli/command/network    [no test files]
?       github.com/docker/docker/cli/command/node       [no test files]
?       github.com/docker/docker/cli/command/plugin     [no test files]
?       github.com/docker/docker/cli/command/prune      [no test files]
?       github.com/docker/docker/cli/command/registry   [no test files]
?       github.com/docker/docker/cli/command/secret     [no test files]
ok      github.com/docker/docker/cli/command/service    0.326s  coverage: 40.2% of statements
?       github.com/docker/docker/cli/command/stack      [no test files]
ok      github.com/docker/docker/cli/command/swarm      0.239s  coverage: 3.1% of statements
?       github.com/docker/docker/cli/command/system     [no test files]
?       github.com/docker/docker/cli/command/task       [no test files]
?       github.com/docker/docker/cli/command/volume     [no test files]
?       github.com/docker/docker/cli/flags      [no test files]
ok      github.com/docker/docker/cliconfig      0.131s  coverage: 92.1% of statements
ok      github.com/docker/docker/cliconfig/configfile   0.088s  coverage: 20.2% of statements
ok      github.com/docker/docker/cliconfig/credentials  0.176s  coverage: 82.9% of statements
ok      github.com/docker/docker/client 0.208s  coverage: 73.1% of statements
ok      github.com/docker/docker/cmd/docker     0.251s  coverage: 32.3% of statements
                                                                                ok    github.com/docker/docker/cmd/dockerd       0.124s  coverage: 5.6% of statements
ok      github.com/docker/docker/container      0.093s  coverage: 12.9% of statements
?       github.com/docker/docker/container/stream       [no test files]
?       github.com/docker/docker/contrib/apparmor       [no test files]
?       github.com/docker/docker/contrib/docker-device-tool     [no test files]
?       github.com/docker/docker/contrib/httpserver     [no test files]
ok      github.com/docker/docker/daemon 2.249s  coverage: 7.6% of statements
?       github.com/docker/docker/daemon/cluster [no test files]
?       github.com/docker/docker/daemon/cluster/convert [no test files]
?       github.com/docker/docker/daemon/cluster/executor        [no test files]
ok      github.com/docker/docker/daemon/cluster/executor/container      0.125s  coverage: 5.1% of statements
?       github.com/docker/docker/daemon/cluster/provider        [no test files]
ok      github.com/docker/docker/daemon/events  0.193s  coverage: 53.2% of statements
?       github.com/docker/docker/daemon/events/testutils        [no test files]
?       github.com/docker/docker/daemon/exec    [no test files]
?       github.com/docker/docker/daemon/graphdriver     [no test files]
?       github.com/docker/docker/daemon/graphdriver/aufs        [no test files]
?       github.com/docker/docker/daemon/graphdriver/btrfs       [no test files]
?       github.com/docker/docker/daemon/graphdriver/devmapper   [no test files]
?       github.com/docker/docker/daemon/graphdriver/graphtest   [no test files]
?       github.com/docker/docker/daemon/graphdriver/overlay     [no test files]
?       github.com/docker/docker/daemon/graphdriver/overlay2    [no test files]
?       github.com/docker/docker/daemon/graphdriver/register    [no test files]
?       github.com/docker/docker/daemon/graphdriver/vfs [no test files]
?       github.com/docker/docker/daemon/graphdriver/windows     [no test files]
?       github.com/docker/docker/daemon/graphdriver/zfs [no test files]
ok      github.com/docker/docker/daemon/links   0.074s  coverage: 93.0% of statements
ok      github.com/docker/docker/daemon/logger  0.292s  coverage: 30.6% of statements
ok      github.com/docker/docker/daemon/logger/awslogs  0.335s  coverage: 76.5% of statements
?       github.com/docker/docker/daemon/logger/etwlogs  [no test files]
?       github.com/docker/docker/daemon/logger/fluentd  [no test files]
?       github.com/docker/docker/daemon/logger/gcplogs  [no test files]
?       github.com/docker/docker/daemon/logger/gelf     [no test files]
?       github.com/docker/docker/daemon/logger/journald [no test files]
ok      github.com/docker/docker/daemon/logger/jsonfilelog      0.093s  coverage: 17.0% of statements
?       github.com/docker/docker/daemon/logger/logentries       [no test files]
ok      github.com/docker/docker/daemon/logger/loggerutils      0.057s  coverage: 14.3% of statements
ok      github.com/docker/docker/daemon/logger/splunk   1.283s  coverage: 83.7% of statements
ok      github.com/docker/docker/daemon/logger/syslog   0.111s  coverage: 23.6% of statements
?       github.com/docker/docker/daemon/network [no test files]
ok      github.com/docker/docker/distribution   0.169s  coverage: 11.1% of statements
ok      github.com/docker/docker/distribution/metadata  6.606s  coverage: 49.0% of statements
ok      github.com/docker/docker/distribution/xfer      6.520s  coverage: 62.2% of statements
?       github.com/docker/docker/dockerversion  [no test files]
ok      github.com/docker/docker/image  1.551s  coverage: 84.9% of statements
?       github.com/docker/docker/image/tarexport        [no test files]
ok      github.com/docker/docker/image/v1       0.099s  coverage: 24.2% of statements
ok      github.com/docker/docker/layer  1.010s  coverage: 27.2% of statements
ok      github.com/docker/docker/libcontainerd  0.046s  coverage: 1.5% of statements
ok      github.com/docker/docker/migrate/v1     0.228s  coverage: 15.2% of statements
?       github.com/docker/docker/oci    [no test files]
ok      github.com/docker/docker/opts   0.068s  coverage: 63.9% of statements
ok      github.com/docker/docker/pkg/aaparser   0.064s  coverage: 47.1% of statements
ok      github.com/docker/docker/pkg/archive    1.896s  coverage: 42.6% of statements
?       github.com/docker/docker/pkg/authorization      [no test files]
ok      github.com/docker/docker/pkg/broadcaster        0.058s  coverage: 100.0% of statements
ok      github.com/docker/docker/pkg/chrootarchive      0.384s  coverage: 72.3% of statements
?       github.com/docker/docker/pkg/devicemapper       [no test files]
ok      github.com/docker/docker/pkg/directory  0.068s  coverage: 82.6% of statements
ok      github.com/docker/docker/pkg/discovery  0.082s  coverage: 58.3% of statements
ok      github.com/docker/docker/pkg/discovery/file     0.094s  coverage: 92.9% of statements
ok      github.com/docker/docker/pkg/discovery/kv       3.125s  coverage: 84.1% of statements
ok      github.com/docker/docker/pkg/discovery/memory   0.097s  coverage: 92.3% of statements
ok      github.com/docker/docker/pkg/discovery/nodes    0.109s  coverage: 93.8% of statements
ok      github.com/docker/docker/pkg/filenotify 0.032s  coverage: 42.7% of statements
ok      github.com/docker/docker/pkg/fileutils  0.076s  coverage: 83.6% of statements
ok      github.com/docker/docker/pkg/gitutils   2.226s  coverage: 66.7% of statements
ok      github.com/docker/docker/pkg/graphdb    1.144s  coverage: 42.4% of statements
ok      github.com/docker/docker/pkg/homedir    0.047s  coverage: 63.6% of statements
ok      github.com/docker/docker/pkg/httputils  10.086s coverage: 98.4% of statements
?       github.com/docker/docker/pkg/idtools    [no test files]
ok      github.com/docker/docker/pkg/integration        5.601s  coverage: 78.7% of statements
?       github.com/docker/docker/pkg/integration/checker        [no test files]
ok      github.com/docker/docker/pkg/integration/cmd    0.153s  coverage: 55.9% of statements
ok      github.com/docker/docker/pkg/ioutils    0.681s  coverage: 68.6% of statements
ok      github.com/docker/docker/pkg/jsonlog    0.053s  coverage: 87.2% of statements
ok      github.com/docker/docker/pkg/jsonmessage        0.083s  coverage: 93.2% of statements
?       github.com/docker/docker/pkg/listeners  [no test files]
ok      github.com/docker/docker/pkg/locker     0.068s  coverage: 88.9% of statements
ok      github.com/docker/docker/pkg/longpath   0.075s  coverage: 100.0% of statements
?       github.com/docker/docker/pkg/mount      [no test files]
ok      github.com/docker/docker/pkg/namesgenerator     0.081s  coverage: 85.7% of statements
?       github.com/docker/docker/pkg/namesgenerator/cmd/names-generator [no test files]
ok      github.com/docker/docker/pkg/parsers    0.116s  coverage: 100.0% of statements
?       github.com/docker/docker/pkg/parsers/kernel     [no test files]
?       github.com/docker/docker/pkg/parsers/operatingsystem    [no test files]
ok      github.com/docker/docker/pkg/pidfile    0.087s  coverage: 84.0% of statements
?       github.com/docker/docker/pkg/platform   [no test files]
?       github.com/docker/docker/pkg/plugingetter       [no test files]
ok      github.com/docker/docker/pkg/plugins    1.172s  coverage: 29.5% of statements
ok      github.com/docker/docker/pkg/plugins/pluginrpc-gen      0.065s  coverage: 56.8% of statements
?       github.com/docker/docker/pkg/plugins/pluginrpc-gen/fixtures     [no test files]
?       github.com/docker/docker/pkg/plugins/pluginrpc-gen/fixtures/otherfixture        [no test files]
?       github.com/docker/docker/pkg/plugins/transport  [no test files]
ok      github.com/docker/docker/pkg/pools      0.091s  coverage: 86.2% of statements
ok      github.com/docker/docker/pkg/progress   0.054s  coverage: 80.0% of statements
?       github.com/docker/docker/pkg/promise    [no test files]
ok      github.com/docker/docker/pkg/pubsub     1.156s  coverage: 82.1% of statements
ok      github.com/docker/docker/pkg/random     0.140s  coverage: 38.1% of statements
?       github.com/docker/docker/pkg/reexec     [no test files]
ok      github.com/docker/docker/pkg/registrar  0.108s  coverage: 84.8% of statements
?       github.com/docker/docker/pkg/signal     [no test files]
ok      github.com/docker/docker/pkg/stdcopy    0.081s  coverage: 100.0% of statements
ok      github.com/docker/docker/pkg/streamformatter    0.061s  coverage: 42.2% of statements
ok      github.com/docker/docker/pkg/stringid   0.053s  coverage: 89.5% of statements
ok      github.com/docker/docker/pkg/stringutils        0.071s  coverage: 100.0% of statements
?       github.com/docker/docker/pkg/symlink    [no test files]
ok      github.com/docker/docker/pkg/sysinfo    0.063s  coverage: 33.3% of statements
ok      github.com/docker/docker/pkg/system     0.074s  coverage: 12.6% of statements
ok      github.com/docker/docker/pkg/tailfile   0.054s  coverage: 61.8% of statements
ok      github.com/docker/docker/pkg/tarsum     0.229s  coverage: 90.3% of statements
ok      github.com/docker/docker/pkg/term       0.044s  coverage: 12.4% of statements
ok      github.com/docker/docker/pkg/term/windows       0.094s  coverage: 0.0% of statements
?       github.com/docker/docker/pkg/testutil   [no test files]
?       github.com/docker/docker/pkg/testutil/assert    [no test files]
?       github.com/docker/docker/pkg/testutil/tempfile  [no test files]
?       github.com/docker/docker/pkg/tlsconfig  [no test files]
ok      github.com/docker/docker/pkg/truncindex 0.077s  coverage: 91.5% of statements
ok      github.com/docker/docker/pkg/urlutil    0.068s  coverage: 100.0% of statements
ok      github.com/docker/docker/pkg/useragent  0.052s  coverage: 88.9% of statements
?       github.com/docker/docker/plugin [no test files]
?       github.com/docker/docker/plugin/distribution    [no test files]
ok      github.com/docker/docker/plugin/store   0.071s  coverage: 0.0% of statements
ok      github.com/docker/docker/plugin/v2      0.107s  coverage: 15.6% of statements
ok      github.com/docker/docker/reference      0.749s  coverage: 87.4% of statements
ok      github.com/docker/docker/registry       10.507s coverage: 51.9% of statements
ok      github.com/docker/docker/restartmanager 0.071s  coverage: 49.0% of statements
ok      github.com/docker/docker/runconfig      0.130s  coverage: 67.4% of statements
ok      github.com/docker/docker/runconfig/opts 0.235s  coverage: 74.9% of statements
ok      github.com/docker/docker/utils  0.072s  coverage: 43.9% of statements
ok      github.com/docker/docker/utils/templates        0.081s  coverage: 28.6% of statements
ok      github.com/docker/docker/volume 0.135s  coverage: 65.4% of statements
ok      github.com/docker/docker/volume/drivers 15.091s coverage: 39.7% of statements
ok      github.com/docker/docker/volume/local   0.115s  coverage: 39.1% of statements
ok      github.com/docker/docker/volume/store   15.095s coverage: 54.2% of statements
?       github.com/docker/docker/volume/testutils       [no test files]

 ________   ____  __.
 \_____  \ |    |/ _|
 /   |   \|      <
 /    |    \    |  \
 \_______  /____|__ \
         \/        \/

INFO: make.ps1 ended at 11/29/2016 22:25:05
PS E:\go\src\github.com\docker\docker>

That's awesome! I'll try it later today.

Yes, SQLite is very relevant on Windows. (Esp for local development, saves a ton of time waiting for builds to complete). In fact I almost never build a static binary with it linked in.

I guess the question here is; do we need SQLite at all on Windows? AFAIK, SQLite is only used now to migrate a docker < 1.10's /var/lib/docker (or equivalent on Windows) to the SQLite-less storage of 1.10+. Given that there has not been an official < 1.10 Windows daemon, that step would not be needed on Windows, so there would be no reason to compile it.
See https://github.com/docker/docker/issues/22146 (and https://github.com/docker/docker/pull/25782)

I tested this PR with Windows 10 + Docker for Windows Beta 30.1 which has Docker Engine 1.12.2-cs2-ws-beta, so I had to use some double backslashes to make it work:
PS C:\docker> git diff
diff --git a/Dockerfile.windows b/Dockerfile.windows
index db0f275..5d26769 100644
--- a/Dockerfile.windows
+++ b/Dockerfile.windows
@@ -162,7 +162,7 @@ SHELL ["powershell", "-command"]
 #  - FROM_DOCKERFILE is used for detection of building within a container.
 ENV GO_VERSION=1.7.3 `
     GIT_VERSION=2.10.2 `
-    GOPATH=C:\go `
+    GOPATH=C:\\go `
     FROM_DOCKERFILE=1 `
        SQLITE_LOCATION=http://sqlite.org/2016/sqlite-amalgamation-3150100.zip

@@ -274,7 +274,7 @@ RUN `
 ENTRYPOINT ["powershell.exe"]

 # Set the working directory to the location of the sources
-WORKDIR C:\go\src\github.com\docker\docker
+WORKDIR C:\\go\\src\\github.com\\docker\\docker

 # Copy the sources into the container
 COPY . .

I hope this is a temporary problem until a newer engine arrives in D4W.

@StefanScherer I think beta 31 was just pushed

@thaJeztah 😂 Yes, just updated. That was fast :-)

I guess the question here is; do we need SQLite at all on Windows? AFAIK, SQLite is only used now to migrate a docker < 1.10's /var/lib/docker (or equivalent on Windows) to the SQLite-less storage of 1.10+. Given that there has not been an official < 1.10 Windows daemon, that step would not be needed on Windows, so there would be no reason to compile it.

@thaJeztah Well yes, that appears to be true. BUT, currently daemon\daemon.go pulls in pkg\graphdb and that code isn't factored out on Windows yet (I'm working on a PR), so there is a requirement in the current codebase. I can remove this once the other PR is finished and ready to submit.

I hope this is a temporary problem until a newer engine arrives in D4W.

@StefanScherer Yes, should be temporary.

@jhowardmsft I just merged the remove sqlite PR...

Thanks @justincormack!  @thaJeztah Removed all the SQLite stuff :smile:

@thaJeztah I guess there's not many maintainers who are going to be comfortable reviewing this 😉
Hence @friism @johnstep @StefanScherer Can you guys at least give confirmation it is working for you. It is being fully exercised in the RS1 CI for this PR.

@jhowardmsft It works perfectly for me, so far. I have run it a few times on Windows Server 2016, but have not tried with Hyper-V isolation. I will read through it shortly and let you know if I have any concerns. Thanks!

@jhowardmsft It works fine with latest D4W Beta 31:
With this little build.bat (ok, I have to port it PowerShell :-) )
setlocal
if not exist docker (
  git clone https://github.com/docker/docker
)
if not exist binary (
  mkdir binary
)
set BINDIR=%cd%
set image=docker
pushd docker
if not "%1x"=="x" (
  git fetch origin pull/%1/head:pr%1
  git checkout pr%1
  set image=dockerpr%1
)
docker build -t %image% -f Dockerfile.windows .
docker run --name %image% %image% hack\make.ps1 -Binary
docker cp %image%:C:\go\src\github.com\docker\docker\bundles\docker.exe ..\binary\docker.exe
docker cp %image%:C:\go\src\github.com\docker\docker\bundles\dockerd.exe ..\binary\dockerd.exe
popd
dir binary

and the following steps
PS C:\> mkdir tst
PS C:\> cd tst
PS C:\tst> notepad build.bat
PS C:\tst> .\build.bat 28964
... snip ...
 OK from your perspective?

Janky error is clearly unrelated. Will restart anyway in case its a glitch on the Linux side.
00:57:01.787 ----------------------------------------------------------------------
00:57:01.787 FAIL: docker_cli_swarm_test.go:999: DockerSwarmSuite.TestSwarmJoinPromoteLocked
00:57:01.787
00:57:01.787 [d3445730d0e50] waiting for daemon to start
00:57:01.788 [d3445730d0e50] daemon started
00:57:01.788 [d732a8251f1c3] waiting for daemon to start
00:57:01.789 [d732a8251f1c3] daemon started
00:57:01.789 [d732a8251f1c3] exiting daemon
00:57:01.789 [d732a8251f1c3] waiting for daemon to start
00:57:01.790 [d732a8251f1c3] daemon started
00:57:01.790 [de51946862eb1] waiting for daemon to start
00:57:01.791 [de51946862eb1] daemon started
00:57:01.791 [d732a8251f1c3] exiting daemon
00:57:01.792 [d732a8251f1c3] waiting for daemon to start
00:57:01.792 [d732a8251f1c3] daemon started
00:57:01.793 [de51946862eb1] exiting daemon
00:57:01.793 [de51946862eb1] waiting for daemon to start
00:57:01.793 [de51946862eb1] daemon started
00:57:01.793 [de51946862eb1] exiting daemon
00:57:01.794 [de51946862eb1] waiting for daemon to start
00:57:01.794 [de51946862eb1] daemon started
00:57:01.794 [de51946862eb1] exiting daemon
00:57:01.794 [de51946862eb1] waiting for daemon to start
00:57:01.794 [de51946862eb1] daemon started
00:57:01.794 docker_cli_swarm_test.go:1058:
00:57:01.794     checkSwarmLockedToUnlocked(c, d3, unlockKey)
00:57:01.794 docker_cli_swarm_test.go:821:
00:57:01.795     c.Assert(getNodeStatus(c, d), checker.Equals, swarm.LocalNodeStateActive)
00:57:01.795 ... obtained swarm.LocalNodeState = "locked"
00:57:01.796 ... expected swarm.LocalNodeState = "active"
00:57:01.796
00:57:01.796 [d3445730d0e50] exiting daemon
00:57:01.796 [d732a8251f1c3] exiting daemon
00:57:01.796 [de51946862eb1] exiting daemon
00:57:04.472
00:57:04.472 ----------------------------------------------------------------------

Thanks @StefanScherer @johnstep !


Identification error

Connecting: Le
[profile] => playerConnecting
[vRP] MySQL begin query vRP/userid_byidentifier (76094)
[profile] <= playerConnecting 0.0020540000000438s
[vRP] LeaveMeAlone (**.185) rejected: identification error
[profile] => vRP save datatables
[profile] <= vRP save datatables 4.5000000227446e-05s
[profile] => playerDropped
[profile] <= playerDropped 0.00012400000014168s

Nobody can connect to the server. Server works 15 hours.

As you can see, there is no "end query". So vrp_mysql is faulted. Most of the vRP issues right now are about vrp_mysql, and I can't figure what is causing exceptions/errors in the C# code.

Yes, I saw. If you want to test vrp_mysql on a full server with debug logs, I will help.

Try enabling these two settings below, they seemed to have helped my server with the error, or maybe it's just calmed down for some reason?
sv_authMaxVariance 1
sv_authMinTrust 5

fixed after 370fcc9e459eaf881be57fc23813f563c2519f37


What happens if the phone goes to sleep?

If i have a socket.io connection from an iphone to a (node) server, and then the phone turns off its display, can the app still receive socketio messages? is anything special required to do this?

No, only apps using voip have this option to run in the background. The best practice is to monitor when the app is going to the background and send an update to the server noting this. Then whenever that user gets a message default to push notifications.


Add monitored entity reconciler

Description
With this a new reconciler is added that deals with the monitored entity from the cluster. It will be stored in the dynakube status from now on, such that if we need to store the value we can guarantee that it is stored somewhere.
Because of this I removed the API call which was inside the settings enrichment reconciler, as it is unneeded as the main purpose was to get the entityID. From now on the ID is simply taken from the dynakube status.
JIRA-ticket: https://dt-rnd.atlassian.net/browse/K8S-9857

How can this be tested?
Deploy the operator and a dynakube with metadata enrichment enabled. Check the logs, also check the dynakube status.

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
Attention: Patch coverage is 65.38462% with 18 lines in your changes missing coverage. Please review.

Project coverage is 57.23%. Comparing base (79211a9) to head (55283c7).
Report is 1 commits behind head on main.

Files
Patch %
Lines

test/mocks/pkg/clients/dynatrace/client.go
15.38%
8 Missing and 3 partials :warning:

...trollers/dynakube/monitored_entities/reconciler.go
80.00%
3 Missing and 2 partials :warning:

pkg/controllers/dynakube/controller.go
60.00%
1 Missing and 1 partial :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3447      +/-   ##
==========================================
- Coverage   57.23%   57.23%   -0.01%
==========================================
  Files         344      345       +1
  Lines       19781    19802      +21
==========================================
+ Hits        11322    11334      +12
- Misses       7221     7227       +6
- Partials     1238     1241       +3

Flag
Coverage Δ

unittests
57.23% <65.38%> (-0.01%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

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

CRD needs to be regenerated:
> git status
On branch feature/add-monitored-entity-reconciler
Your branch is up to date with 'origin/feature/add-monitored-entity-reconciler'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   config/crd/bases/dynatrace.com_dynakubes.yaml
        modified:   config/helm/chart/default/templates/Common/crd/dynatrace-operator-crd.yaml

no changes added to commit (use "git add" and/or "git commit -a")


improve MUDROD dataset landing page

change terminology of Start/End Date: from $start date - Present (instead of now)
the Format should be changed from RAW to BINARY
units should be changed from ‘m’ to ‘km’
coverage language needs to reflect that currently on the PO.DAAC Website
Doi should be DOI, the link should also be linkable e.g. hyperlink

@quintinali Use mudrod-117 branch for this as well.


Preserve headers order by default in CSV serialisation

Pull request checklist

[x] Did you bump the project version?
[x] Did you add a description to the Pull Request?
[x] Did you add new tests?
[x] Did you add reviewers?

Related issue

Preserve headers order by default in CSV serialisation
Serde.to_flatten now returns OrderedDict

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

Project coverage is 71.78%. Comparing base (85e37b4) to head (0b97ad2).

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #45   +/-   ##
=======================================
  Coverage   71.78%   71.78%
=======================================
  Files          24       24
  Lines        1056     1056
=======================================
  Hits          758      758
  Misses        298      298

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

Hi, @NeroBlackstone! Seems good to me. @artememelin any suggestions?

I checked method to_csv with a benchmark and saw that this solution requires at least 2 times more memory allocations and runtime
using Serde
using BenchmarkTools

vals = Vector{Dict{String,Int64}}(undef, 100000)
for i in eachindex(vals)
    dict = Dict{String, Int64}()
    for c in 'a':'z'
        dict[string(c)] = i
    end
    vals[i] = dict
end

@benchmark Serde.to_csv(vals)

master
# BenchmarkTools.Trial: 5 samples with 1 evaluation.
#  Range (min … max):  1.081 s …   1.176 s  ┊ GC (min … max): 12.11% … 17.56%
#  Time  (median):     1.112 s              ┊ GC (median):    14.70%
#  Time  (mean ± σ):   1.129 s ± 41.683 ms  ┊ GC (mean ± σ):  15.29% ±  2.49%

#   █              █  █                                 █   █
#   █▁▁▁▁▁▁▁▁▁▁▁▁▁▁█▁▁█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█▁▁▁█ ▁
#   1.08 s         Histogram: frequency by time        1.18 s <

#  Memory estimate: 742.09 MiB, allocs estimate: 14786791.

PR/45
# BenchmarkTools.Trial: 3 samples with 1 evaluation.
#  Range (min … max):  2.161 s …   2.214 s  ┊ GC (min … max): 13.52% … 16.22%
#  Time  (median):     2.191 s              ┊ GC (median):    15.40%
#  Time  (mean ± σ):   2.189 s ± 26.668 ms  ┊ GC (mean ± σ):  15.06% ±  1.38%

#   █                              █                        █
#   █▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█ ▁
#   2.16 s         Histogram: frequency by time        2.21 s <

#  Memory estimate: 1.39 GiB, allocs estimate: 33973506.

Is it possible to do something about this?

Hi. @artememelin Thank you to point this out.
As I replied in the following issue, csv's cols order actually depends on to_flatten(). If to_flatten() returns Dict, the order is obviously not guaranteed.
One solution is to make to_flatten() return other built-in julia ordered collections such as Vector? But this is a breaking update! This should be considered carefully. And this solution obviously requires modification of the serialization functions of other implemented formats.
Another option is to multi-dispatch the method, returning OrderedDict only if ordered, and informing the user of the side effects. Considering that most of the time we only need to use ordered collections in csv serialization, I think this is a better solution.

https://github.com/bhftbootcamp/Serde.jl/issues/43#issuecomment-2093411821

I think we should try to use vectors instead of dictionaries, where possible
Therefore, it seems to me that it is worth adding a new parameter for method to_flatten, which will determine the type of the returned object (something similar to this)
Then method to_flatten will return Dict by default, but inside method to_csv, you can specify Vector as the return type of to_flatten
I think this should improve performance

It doesn't seem to be as easy as I thought. Regarding headers and headers order, should we arrange them according to type definitions or according to the actual data processed.
For example we have such type definition:
struct SubRecord2
    id::Int64
    name::String
end

struct SubRecord
    code::Int64
    name::String
end

struct ComplexRecord
    id::Int64
    name::String
    data::Union{Float64,SubRecord,SubRecord2}
end

And we have such data:
[ComplexRecord(1,"a",1.0),
ComplexRecord(1,"a",SubRecord(2,"b")),
ComplexRecord(1,"a",SubRecord2(2,"b"))]

Arrange headers according to type definitions, so headers could be:
id, name, data, data_code, data_name, data_id, data_name or
id, name, data, data_id, data_name, data_code, data_name
Arrange headers according to type definitions, have two problems:

How to determine headers order, data from Float64 , data_code, data_name from SubRecord, data_id, data_name from SubRecord2?
How to deal with duplicate headers?

If we have such data:
[ComplexRecord(1,"a",SubRecord(2,"b")),
ComplexRecord(1,"a",SubRecord2(2,"b"))]

Arrange headers according to actual data, so headers could be:
id, name, data, data_code, data_name, data_id, data_name or
id, name, data_code, data_name, data_id, data_name
And problems are:

Should headers that do not exist in the actual data be omitted, like data?
If we arrange headers by actual data, and not ommit data, which means, if we add new element to vector, ComplexRecord(1,"a",1.0) , then headers will changed !!! Is this also expected behavior?

The current implementation is based on actual data. I don't know if we want to continue this behavior

That's a tricky question. I don't think that this function was originally designed with unions in mind. We could try to give indexes to repeated column names to separate them (name and name_1 in your example) but that seems like a niche case. I almost exclusively see this function used with well-defined structs. What's your opinion on this matter?

We could try to give indexes to repeated column names to separate them (name and name_1 in your example) but that seems like a niche case.

I did consider this, but it would definitely cause potential trouble for our deserialization.

I almost exclusively see this function used with well-defined structs. What's your opinion on this matter?

Yes, this is indeed a borderline case. When I have time I will investigate other programming languages with union types, like typescript. See how their csv serialization works.
And... I'm still wondering if union a type other than Nothing makes sense for csv use cases. All our troubles currently come from union types.
Maybe we should artificially limit the union type in Nothing and CustomType/SimpleType, and not allow the third type to appear to prevent annoying ambiguities. I think this is most likely the final solution.

I think the correct Union type constraint is:
When using the Union type, only the following combinations are supported:

Union Null Type (Nothing, Missing) + one Composite Type: Union{Nothing, CompositeType}
Union Null Type + one "Simple Type"(String, Symbol, Char, Number, Enum, Type, Dates.TimeType): Union{Missing, Dates.TimeType}

The following Union types will not be serialized correctly:

Union Multiple Composite Type
Union Multiple Simple Type
Union Simple Types + Composite Type

This is the best way to serialize and deserialize predictably, guarantee expected fields and order, and eliminate duplicately named headers.

That seems very reasonable to me. Do you need any assistance with the implementation?

Hello! I have updated the implementation. In the new implementation:

OrderedCollection removed
The headers and order of headers after CSV serialization is now predictable (Union types need to meet the above constraints).
The structure of the CSV will be determined by the Julia type, not the Julia object value. This means that all Julia objects that have same type will generate the same headers.
-Potential deserialization benefits, since the order of the headers is predictable, deserialization is easier, and even header-less CSV data deserialization can be achieved.

Performance:
Since I only changed the CSV serialization implementation for composite types. Therefore I don't test serialization of dictionary types, they should be unchanged.
using Serde
using BenchmarkTools

struct A
                  a::Int64
                  b::Int64
                  c::Int64
                  d::Int64
                  e::Int64
end

struct B
                  a::A
                  b::Int64
                  c::Int64
                  d::Int64
                  e::Int64
end

function random_B()::B
                         B(A(rand(Int),rand(Int),rand(Int),rand(Int),rand(Int)),rand(Int),rand(Int),rand(Int),rand(Int))
end

v = fill(random_B(),10000)

@benchmark Serde.to_csv(v)

master:
BenchmarkTools.Trial: 50 samples with 1 evaluation.
 Range (min … max):   91.329 ms … 122.198 ms  ┊ GC (min … max): 0.00% … 11.74%
 Time  (median):     101.311 ms               ┊ GC (median):    8.48%
 Time  (mean ± σ):   101.624 ms ±   6.728 ms  ┊ GC (mean ± σ):  8.10% ±  4.65%

  ▄▁ ▄       ▄▁ ▁▄ ▄ ▁   ▄▁ ▁ █   ▄
  ██▁█▆▁▁▁▁▁▁██▁██▆█▆█▆▆▆██▁█▆█▆▆▁█▁▁▁▁▁▁▆▁▆▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▆▆ ▁
  91.3 ms          Histogram: frequency by time          122 ms <

 Memory estimate: 35.61 MiB, allocs estimate: 770045.

PR45:
BenchmarkTools.Trial: 101 samples with 1 evaluation.
 Range (min … max):  47.259 ms … 60.221 ms  ┊ GC (min … max): 0.00% … 4.53%
 Time  (median):     48.952 ms              ┊ GC (median):    0.00%
 Time  (mean ± σ):   49.622 ms ±  2.385 ms  ┊ GC (mean ± σ):  2.13% ± 2.73%

  ▅▄▇▇█              ▅▁▄
  █████▅▅▅▃▃▃▁▅▅▃▃▅█▆███▆▅▁▁▁▁▃▃▃▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▅▃▁▃▁▁▁▁▁▁▁▃ ▃
  47.3 ms         Histogram: frequency by time        57.6 ms <

The time is doubled and the space occupied is doubled. Looks good?
Maybe the code will be a little difficult to read, I used the trick I know to optimize it as much as possible. If you have any performance suggestions, please let me know. Thanks for the review!

I see that a lot of work has been done
It's great that performance has increased!
Soon I will take a closer look at all the changes and return with feedback

Some typo and useless comment forgot to remove, I will fix these when I'm free

I had to format a lot of the code to match our style guide (hopefully ready for the public soon) and created a pull request: https://github.com/NeroBlackstone/Serde.jl/pull/1
Can you see if everything is ok and nothing is broken?
Also, I noticed that now we have two implementations of the to_csv method that went in slightly different ways.
Is it possible to somehow try to unify them into one?

I had to format a lot of the code to match our style guide (hopefully ready for the public soon) and created a pull request: NeroBlackstone#1 Can you see if everything is ok and nothing is broken?

Thank you for your help, I must to confess I learned a lot.  I realized some practices not good in my coding. The code is more readable now.

Also, I noticed that now we have two implementations of the to_csv method that went in slightly different ways. Is it possible to somehow try to unify them into one?

I think it's actually difficult. Our reimplementation of CSV serialization is based on predictable Julia type input. We map the fields in the Julia type to the CSV header one by one.
However, there is no such predictable pattern in Dict. I think it might be reasonable to keep two
different implementations.

Okay, for now let there be two implementations
@dmitrii-doronin Any other ideas or suggestions?

Any other suggestions / updates for this PR?

Hi, @NeroBlackstone! I will look through the PRs today. Hopefully, we'll merge everything.


fix Fix unstable result of aggregrate function hist

Target

Fix unstable result of hist function when involving null value.

Reproduce

test result of regression-test/suites/query_p0/sql_functions/aggregate_functions/test_aggregate_all_functions2.groovy is unstable, sql SELECT histogram(k7, 5) FROM baseall will sometimes acts like the second argument is not passed in.

Root reason

We have short-circuit in AggregateFunctionNullVariadicInline, when this row is NULL, the value will not be added by the nested function. Implementation of histogram relies on its add method to get its seconds argument, when we have an all null value block, histogram will not get its seconds arg even if sql is like select(k7, 5), so a max_bucket_num with default value 128 is serialized. When we do merging, and happens to deserialize the above block at last, the max_bucket_num in merge stage will be assigned to 128, and this leads to the wrong result.

Fix by

Init value of max_bucket_num is assigned to -1, when we do merging, we will discard this aggregated data if its max_bucket_num is -1.

run buildall

run buildall

run buildall

run buildall

run buildall

@zhangstar333 I changed the default value from -1 to 0, so that we can fix the problem in an upgrade friendly way.

run external


Collect new CompletionItemKinds

Collects new completion item kinds.

pragma / directive

macro

Slot, in the sense of a named, declared hole in a template that a user of the element can use to insert content.
e.g. <slot> in Shadow Dom v1, <content> in Shadow Dom v0, transclusion points in AngularJS, <ng-content> in Angular.

There is SymbolKind, but no CompletionItemKind for  Namespace

There's SymbolKind.Package, but not CompletionItemKind.Package

This is futile, server should be able to define their own completion kinds. There's no way you are going to be able to enumerate all possible completion kinds in the world. Especially if you are defining a language server for a dsl it seems unreasonable to bake your domain terminology into the LSP spec. (The item kinds would be specific to the language domain and could be things like , 'task', 'job', 'pipeline', 'resource').

Or... server must be able to provide icons somehow. But yes, I understand how that may not naturally blend with the look and feel of every client.
I suppose having a growing list of 'standard' kinds is still helpful. Probably doesn't help with DSL languages but at least there's a larger set of 'good looking icons' to pick from. Maybe I was a bit harsh calling this 'futile'. So please do carry on enlarging the list :-)

Will do :-)
@jrieken do you think marco and directive/pragma is something we would like to VS Code as well. They are for sure useful for C/C++

Or... server must be able to provide icons somehow. But yes, I understand how that may not naturally blend with the look and feel of every client.

That. The fear is that it will look horrible because every editor has a different style. On other hand we also don't want editor authors to have to provide 100s of icons.

@jrieken do you think marco and directive/pragma is something we would like to VS Code as well. They are for sure useful for C/C++

In VS Code there is a shared subset approach and the rule of thumb is that there are no 1-offs for one language but that you have name five other languages that have the concept.

Fair point. The language I know that have these concepts are:

C/C++
Lisp
C# (has #ifdef, but not macros)
Assembler languages :-)

Not to outright dismiss the idea of a server contributing icons. Might it not go a long way with a few simple guidelines? Something like:

icons should be on transparant background (so they can look good with range of different bg colors)
icons should be provided in pairs, one icon to be used for 'light' themes, one for 'dark' themes (to ensure enough contrast with the editor's theme)
maybe add some rules about icon resolution and file formats (to avoid experiences of pixelated server-provided icons being mixed in with more high-quality native ones).

I think that would probably be enough for the icons to look pretty good and not totally out of place.
I'd say this is probably better/preferable to have all your DSL concepts be represented with only a single generic completion icon.

I see the point for DSLs. For programming languages I do prefer consistency and not different icons for every programming language I use.

Yes, DSLs is what I am personally mostly thinking about. And just extending the list of standard identifiers won't help much there (clearly, adding every noun in the dictionary as a 'kind' and creating icons for them all is not practical).
So, having a long list of 'standard' kinds explicitly listed in the spec is good. But so is having a mechanic to by which non-standard kinds can have their own icons contributed by the server. So why couldn't we have both?

I am fully open to have both.

Hey, I got here searching for docs on what's the best approach for symbolkinds, if we should feed everything we have and if I should map stuff that doesn't fit to something else that's similar.
https://github.com/Razzeee/elm-language-server/issues/11

The symbol item kind is to my knowledge only used to pick an icon. There is no semantic bound to it. If we make this an open set then clients only might show a default icon for it which is fine for me.

When testing what I got so far, some symbolKind lead to different codelenses being provided in my vscode. Might me another plugin, like gitlens. Just wanted to let you know.

For C++ TypeDef would be helpful as well.

Label

Named arguments / parameters. (https://en.wikipedia.org/wiki/Named_parameter).
Once the call is resolved, the LSP server can often suggest names for the arguments.
I'm also missing a more generic (catch-all) "Type" kind.
For example, the dynamic type in Dart: it's neither a keyword (a local can be named "dynamic"), nor a class or an interface.
Similarly, this could be used for enum types. An enum type is (depending on the language) not a class or interface.
I would also not know which type to use for a function type. Again: neither a class nor interface.
Could be used for the typedef case too.

User and Issue were added to VS Code (see microsoft/vscode#91541) so should be simple additions.

From #1872
Add Instruction and Register

type for (primitive) types


Can't save 3d numpy array as a series of 2d dicom scans

Hello, the following problem has occurred. I have a 3d array and I want to save it as a series of 2d images. I found a way with simpleItk - https://simpleitk.readthedocs.io/en/v1.2.2/Examples/DicomSeriesReadModifyWrite/Documentation.html. But there is a problem, Weasis (and its analogs) considers the images as independent and does not combine them as one Series. Can anyone tell me what is the error?
Code:
res2 = np.load('sav.npy')
filtered_image = sitk.GetImageFromArray((res2 * 255).astype(np.int16))

writer = sitk.ImageFileWriter()
# Use the study/series/frame of reference information given in the meta-data
# dictionary and not the automatically generated information from the file IO
writer.KeepOriginalImageUIDOn()

# Copy relevant tags from the original meta-data dictionary (private tags are also
# accessible).
tags_to_copy = ["0010|0010", # Patient Name
                "0010|0020", # Patient ID
                "0010|0030", # Patient Birth Date
                "0020|000D", # Study Instance UID, for machine consumption
                "0020|0010", # Study ID, for human consumption
                "0008|0020", # Study Date
                "0008|0030", # Study Time
                "0008|0050", # Accession Number
                "0008|0060"  # Modality
]
# tags_to_copy = res_tag

modification_time = time.strftime("%H%M%S")
modification_date = time.strftime("%Y%m%d")

direction = image3D.GetDirection()
series_tag_values = [(k, series_reader.GetMetaData(0,k)) for k in tags_to_copy if series_reader.HasMetaDataKey(0,k)] + \
                 [("0008|0031",modification_time), # Series Time
                  ("0008|0021",modification_date), # Series Date
                  ("0008|0008","DERIVED\\SECONDARY"), # Image Type
                  ("0020|000e", "1.2.8<IP_ADDRESS>80043.2.1125"), # Series Instance UID
                  ("0020|0037", '\\'.join(map(str, (direction[0], direction[3], direction[6],# Image Orientation (Patient)
                                                    direction[1],direction[4],direction[7])))),
                  ("0008|103e", series_reader.GetMetaData(0,"0008|103e") + " Processed-SimpleITK")] # Series Description
image_list = []
for i in range(filtered_image.GetDepth()):
    image_slice = filtered_image[:,:,i]

    # Tags shared by the series.
    for tag, value in series_tag_values:
        image_slice.SetMetaData(tag, value)
    # Slice specific tags.
    image_slice.SetMetaData("0008|0012", time.strftime("%Y%m%d")) # Instance Creation Date
    image_slice.SetMetaData("0008|0013", time.strftime("%H%M%S")) # Instance Creation Time
    image_slice.SetMetaData("0020|0032", '\\'.join(map(str,filtered_image.TransformIndexToPhysicalPoint((0,0,i))))) # Image Position (Patient)
    image_slice.SetMetaData("0020|0013", str(i)) # Instance Number

    # Write to the output directory and add the extension dcm, to force writing in DICOM format.
    writer.SetFileName(f'sitk/img_{i}.dcm')
    # image_list.append(image_slice)
    writer.Execute(image_slice)

I feel like I'm missing some small point, but I can't figure out which one.

Found the problem, the tags had the wrong capitalization because of which nothing was found, fix:
"0020|000d", # Study Instance UID, for machine consumption


feat(PageSidebar): remove standalone sidebar export

FX-1922
Description
Move Sidebar to PageSidebar and remove its re-export from the project. Sidebar now needs to be used as Page.Sidebar. A codemod was also released for helping on updates
How to test

See storybook examples of PageSidedar, they should show only example code with the new Page.Sidebar instead of the previous Sidebar
You can test the codemod in staff-portal by running npx on it with the alpha package

Review

[ ] Read CONTRIBUTING.md and Component API principles
[ ] Annotate all props in component with documentation
[ ] Create examples for component
[ ] Ensure that deployed demo has expected results and good examples
[ ] Ensure that tests pass by running yarn test
[ ] Ensure that visuals tests pass by running yarn test:visual. If not - check the documentation how to fix visual tests
[ ] Ensure the changed/created components have not caused accessibility issues. How to use accessibility plugin in storybook.

PR commands

List of available commands:

@toptal-bot run all - Run whole pipeline
@toptal-bot run build - Check build
@toptal-bot run visual - Run visual tests
@toptal-bot run deploy:documentation - Deploy documentation
@toptal-bot run package:alpha-release - Release alpha version

PR Review Guidelines

When to approve? ✅
You are OK with merging this PR and

You have no extra requests.
You have optional requests.

Add nit: to your comment. (ex. nit: I'd rename this variable from makeCircle to getCircle)

When to request changes? ❌
You are not OK with merging this PR because

Something is broken after the changes.
Acceptance criteria is not reached.
Code is dirty.

When to comment (neither ✅ nor ❌)
You want your comments to be addressed before merging this PR in cases like:

There are leftovers like unnecessary logs, comments, etc.
You have an opinionated comment regarding the code that requires a discussion.
You have questions.

How to handle the comments?

An owner of a comment is the only one who can resolve it.
An owner of a comment must resolve it when it's addressed.
A PR owner must reply with ✅ when a comment is addressed.

@augustobmoura I expected you would create a PR with a codemod against this branch 😞 because now we need to re-review again that PR, which we already reviewed previously + codemod 😞 double-work

@augustobmoura I expected you would create a PR with a codemod against this branch disappointed because now we need to re-review again that PR, which we already reviewed previously + codemod disappointed double-work

Should be fixed now


Fix crash when failing to create an LB policy.

****************************************************************

libgrpc.so

     VM SIZE              FILE SIZE
 ++++++++++++++ GROWIN ++++++++++++++
  [ = ]       0 [None]     +40  +0.0%

  [ = ]       0 TOTAL      +40  +0.0%

****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]

[trickle] No significant performance differences

[microbenchmarks] No significant performance differences

The bug was introduced in the PR to convert the LB policy API to C++, but it was only tangentially related to C++.  Prior to that PR, the code used to basically do this:
// Step 1: Create a new LB policy if needed.
grpc_lb_policy* new_lb_policy = nullptr;
if (chand->resolver_result != nullptr) {
  // ...
  new_lb_policy = grpc_lb_policy_create(...);
  // ...
}
// Step 2: Update chand->lb_policy.
chand->lb_policy = new_lb_policy;
// Step 3: Check whether new LB policy needs to be initialized.
if (new_lb_policy != nullptr) {
  // ...initialize chand->lb_policy...
}

When I convered this code to C++, new_lb_policy changed from a simple pointer to an OrphanablePtr<>.  This meant that when its value was moved into chand->lb_policy in step 2, new_lb_policy became null, which meant that I could no longer check whether it was null in step 3.
To work around this, I added a boolean lb_policy_created variable and set it to true when we created a new LB policy.  But I forgot that in the original code, new_lb_policy could have been null because either we updated an existing LB policy or because we failed to create the new LB policy.  I was setting lb_policy_created to true in a place that caught the first case but not the second case.


Update ReadMe

Bounced here from Discord, the project looks dope!
However, Cloud now supports relationships as it runs on 1.4x.

Yea, not sure about migrating. I've seen people have issues with it. My database has 100k documents in it now so I've just been putting off trying to migrate to cloud. Will do it eventually though.

Nevermind, I see the name of the issue. I've added some small instructions for cloud. But it really shouldn't be much different from the self hosting instructions.


Do not root the database

Connect to the database(s) as thredded and not root.
A script that creates the database users at script/create-db-users.
Moved bin/migrate to the more idiomatic script/migrate.
Gem bin/ are the binaries exposed by the gem.
script/migrate now also invokes rake dev:seed and creates the test
database from the schema dump.
All scripts now support running on a single database when the
DB environment variable is set.
Fix Dockerfile (was not running for me at all due to missing
docker_command.sh). Avoid conflict with the host DB by running the docker one at a different port.

Looking awesome, @glebm. Could you squash this first? Then we'll do the business

Squashed.


iOS: replace cargo-lipo, and update for new macOS

Objective

Remove cargo-lipo as it's deprecated and doesn't work on new Apple processors
Fix CI that will fail as soon as GitHub update the worker used by Bevy to macOS 11

Solution

Replace cargo-lipo with building with the correct target
Setup the correct path to libraries by using xcrun --show-sdk-path
Also try and fix path to cmake in case it's not found but available through homebrew

I updated the iOS example to use the new renderer.
I also added a system to move the camera from touch controls, but I'm not sure if how I did touch handling is the best way

Great work!

bors+

bors r+

#3223

bors r+

bors crashed with a timeout (https://app.bors.tech/repositories/32050/log)

bors r+

I've seen that once before. Running bors again worked that time.


Allow users to click on inventory badge to auto fill quantity on the Product page

What is the motivation for adding/enhancing this feature?
Currently, clicking 'X pieces pre-ordered' badge fills the input field. In some cases, users might want to release orders against the current inventory.
What are the acceptance criteria?
Clicking 'X in stock' badge should fill the input field.
Can you complete this feature request by yourself?

[ ] YES
NO

Additional information

Have created PR for this issue which is in review with @adityasharma7 sir


Distance and Direction widget - Ellipse - Semi and Full options create same ellipse when using same line dimensions.

From @pshowalter on August 11, 2016 19:30
@MarkTorrey @kgonzago
Semi and Full options create same ellipse when using same line dimensions.
Choose the Ellipse Type to create.
Full means the Axis values are the full width of the ellipse.
Semi means the Axis values are only half the width of the ellipse.
If I use same line lengths for Major and Minor, and change Ellipse type from Semi to Full, the same ellipse results.  I would think one would be about half the size of the other?

Copied from original issue: Esri/military-tools-webappbuilder#101

From @kgonzago on December 13, 2016 19:39
This is by design. An ellipse will be created the same regardless of Full or Semi, Full denotes Major Axis and Minor Axis lengths are twice the lengths of a Semi.

Closing this issue since it's by design.


This is an issue

Example of Issue description

@shreyaspapi Please, use https://github.com/packit-service/hello-world for testing instead. Or projects in https://github.com/packit-service-testing-organisation/.

Yes, it was an accident. 😁


Event Monitor

So what's wrong with using
[NSApp setActivationPolicy: NSApplicationActivationPolicyAccessory];
or
NSApp.setActivationPolicy(.accessory)

@fmalekpour what do you mean?

Setting NSApplicationActivationPolicyAccessory dismisses the popup if click outside, why do we need the EventMonitor? Is there another reason to keep track of events?

@fmalekpour Sorry, but I have no idea. I've worked on it 4 years ago, so I can't say any pros and cons now.


Subgraph deployment fail to index with non-deterministic postgres connection issue

Do you want to request a feature or report a bug?
Bug
What is the current behavior?
One of my subgraphs reliably fails on block 15402221 with the following error:
Failed to transact block operations: store error: no connection to the server

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
I have a subgraph, which I'd rather keep private (ish) for now, that always fails on block 15402221. It fails with the following error:
Failed to transact block operations: store error: no connection to the server

I'm running graph node graphprotocol/graph-node:v0.27.0. I've tried rewinding this graph with graphman but then as soon as the deployment reached this block it failed again.
I found this PR which should have an unfailing mechanism if the graph pointer continues to progress which seems to be happening based on debug/info logs I'm seeing in graphman:
Sep 22 20:07:33.572 DEBG Requesting logs for blocks [15402288, 15402288], event 0x6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b, 0 contracts, sgd: 542, subgraph_id: <deployment id>, component: BlockStream

However, even with logs like above, the subgraph seems to be stuck on 15402221. I also found this code which makes it seem like this specific error message shouldn't be problematic.
I'm also seeing that none of the other subgraphs I have deployed are running into issues.
What is the expected behavior?
No expected behavior here, better error messages would be nice. Especially if they had a full stack trace.

Restarting my graph-node results in exactly the same error.

Could our database be getting overwhelmed? I see this log line
Sep 22 20:56:05.041 INFO Applying 3025 entity operation(s), block_hash: 0x25cc61f543585ba04ad8624b2f6e4dfaf99f1f09abfd56aa93b1ac77907632c6, block_number: 15402222, sgd: 542, subgraph_id: <deployment id>, component: SubgraphInstanceManager

3k entity operations on block 15402222 which is 1 block past the last block, 15402221.

Ah, looks like this was a problem with my RDS proxy. Configuring graph-node to connect to my Aurora cluster directly resolved the issue.


New Hash API

Description
This narrows the scope of what StableHashTraits.jl does without compromising its known use cases. See #50
TODO:

[x] run through all tests and find any that are really bugs (some will just be due to differences in design
[x] run the benchmarks to get a feel for how far off we are
[x] implement type-hash hoisting to avoid redundant (and slow) hashing of types
[x] replace qualified_name_ use with new stable_type_name method that dispatches on the context and the StructType. It should normally just use the name of the struct type.
[x] run benchmarks again to get a feel for the current approach
[x] think through how to handle custom type tags within the hoisting setup
[x] refactor code to make it simpler
[x] if all is well with benchmarks clean up the tests so we can test for both verison=3 and version<3 behavior
[x] cleanup some dangling code issues / ugliness

[x] transform_type probably needs to be split into transform_type and transform_type_value
[x] improve general readability / comments / organization

[x] re-run tests
[ ] make sure benchmarks remain in decent shape
[x] consider doing caching now: if we don't, adding it will change the hash version again

Benchmarks
Author, please:
Run the benchmarks under test/benchmarks.jl locally, and update test/benchmark_records.md by inserting a new table at the end of the document with the updated numbers
printed at the end of the benchmark script. Place the table as it occurs before
and after the application of this PR.
Before
After

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

:exclamation: No coverage uploaded for pull request base (dfl/struct-tag-types@c6f1000). Click here to learn what that means.

Files
Patch %
Lines

src/hash_traits.jl
88.50%
20 Missing :warning:

src/caching_context.jl
83.33%
7 Missing :warning:

src/hash_algorithms.jl
91.04%
6 Missing :warning:

src/deprecated.jl
97.04%
5 Missing :warning:

src/public_interface.jl
82.14%
5 Missing :warning:

src/special_contexts.jl
96.42%
1 Missing :warning:

Additional details and impacted files
@@                   Coverage Diff                   @@
##             dfl/struct-tag-types      #55   +/-   ##
=======================================================
  Coverage                        ?   81.05%
=======================================================
  Files                           ?        8
  Lines                           ?      586
  Branches                        ?        0
=======================================================
  Hits                            ?      475
  Misses                          ?      111
  Partials                        ?        0

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

@ericphanson: just wanted to bump this; not super high priority, but would be nice to finally resolve this PR.

Makes sense, it is just a big PR so it is hard to find time to review it, and I tend to forget everything between attempts... anyway we can split it into some simpler ones? I.e. pure-refactoring could be a separate PR first

Sure! It is rather large. I have the sense that we are relatively aligned on the overall design / setup at this point, so it seems like a good time to break it up. I'll pick away at it!


updates folders and pages to match current IA

This PR should now reflect the correct folders and pages to match the current IA.

I went through the IA and deleted any pages where we don't have content. We can add these as we go, but I don't want to have to go back and delete pages again at the end of the week. I left a select few empty pages because we NEED to get those done


Cosmetic changes

error NG8001, error NG8002, error TS2339 ...
PR Checklist
Please check if your PR fulfills the following requirements:

[x] The commit message follows our guidelines: https://github.com/CirclonGroup/angular-tree-component/blob/master/CONTRIBUTING.md#commit-message-guidelines
[ ] Tests for the changes have been added (for bug fixes / features)

PR Type
What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Closes #
What is the new behavior?
Does this PR introduce a breaking change?
[ ] Yes
[ ] No

Other information

Changing the imports from angular-tree-component to @circlon/angular-tree-component in the example app does not work. The tree component is not a dependency, so it's not inside the node_modules. The concept is to build the tree component and use the build version in the dist folder to run/test/develop the example and doc apps against.
The reference still works because the path to the dist folder is declared in the tsconfig.base.json. To make this change you have to change the tsconfig.base.json path to the dist folder to include the @circlon.

ty

ty


Do not show empty collections

Right now it doesn't matter to open empty collections as users would like to peak or collect it.
Collections which doesn't offer anything inside for them, i.e. has 0 items, do not show them

I'll take a look.

Continue to #1357


Add support for passing a unique column to queryBuilder for UPSERT st…

The default primary key does work but is not suitable for all situations, there are use cases that need an email or an api key to be used as the conflicting column.

Closing this PR as I don't have enough time to finish the work required here. 😞


[QUESTION] How to preserve whitespace/newlines from imported yaml

Sorry if this isn't the appropriate place to ask, feel free to close and direct me elsewhere.
I have a nicely formatted yaml file with comments and newlines separating sections, that I want to parse, edit with js (via a UI) and save back out. The problem is that the package strips all that stuff (rightly so).
I was wondering if you could provide any suggestions for handling this problem. I'm happy to take a stab at a PR to add an extra option if anyone else would find it useful.
For now I'm playing around with adding another key to the object to store line numbers of blank lines and comments, then adding them back into the string post-dump, but this is far from ideal (and will break with arrays etc)

It's impossible with JS-YAML, sorry. To do something like this you need a parser that can provide full AST of input document, apply patch to it, and save it back. JS-YAML 1.x.x was able to produce AST, but had no patch nor dump functionality. If you have much desire, you can try to fork 1.x.x branch and implement what you need.

Also take a look at bindings for libyaml. I guess libyaml should have needed functionality out of the box.

Thanks for the quick reply and reasoning. For now I'll stick to the current js-yaml as I'm sure all the extra gains from v1-3 outweigh the inconveniences. I'll certainly have a poke around libyaml later on though.


Search does not find nested terms in subgroups (possibly a feature request)

When using passpie, I believe a common search behaviour would be searching for something in a subgroups (at least that's true for me).
Steps to Reproduce
Create new entries:
passpie add foo@opensource/github --random
passpie add foo@opensource/python --random
Search for github
passpie search github
Observed Behaviour
returns nothing.
passpie search opensource
returns both records though
Expected Behaviour
passpie search github
should return the entry for
opensource/github.
(nb: I am giving this as an example as I keep running into it with my own home/   sing/   pt/  subgroups that i use.).

Hello @wakatara
Searches are regular expressions, you'd need to do something like this:
passpie search .*github

But you've made me see that this isn't clear on the documentation.
Thanks for your contribution


Fix sysctl test

@runcom This fixes the sysctl tests in cri-tests.

@baude FYI

@runcom You can cherry pick this into #947

Awesome


[code] clean up code

set mbedtls logging level according to otbr log level
remove duplicated code
add additional calls to improve code coverage

Codecov Report

Merging #182 into master will increase coverage by 1.42%.
The diff coverage is 53.12%.

@@            Coverage Diff             @@
##           master     #182      +/-   ##
==========================================
+ Coverage   83.75%   85.17%   +1.42%
==========================================
  Files          34       34
  Lines        2357     2341      -16
==========================================
+ Hits         1974     1994      +20
+ Misses        383      347      -36

Impacted Files
Coverage Δ

tests/meshcop/commissioner.cpp
87.78% <100%> (+0.02%)
:arrow_up:

src/agent/ncp_wpantund.cpp
84.18% <28.57%> (+9.18%)
:arrow_up:

src/agent/dtls_mbedtls.cpp
86.66% <58.33%> (+1.1%)
:arrow_up:

src/agent/main.cpp
100% <0%> (+19.04%)
:arrow_up:

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 c2dd642...ee639f9. Read the comment docs.


Add support for pyproject.toml

Addresses #69

I've read your commits, and I have a lot of feedback. Here goes:
Adding --use-pyproject option to tbump init
I think this is not a feature we need. There's very little chance someone would want to create the pyproject.toml with tbump init. This feature is all about using an existing configuration file. If you want to keep this feature, tbump init --pyproject should add the tbump configuration to the pyproject.toml file.
Speaking of, a possible refactoring would be to use tomlkit for both creating and updating configuration files- it even knows how to add comments. That way, we could get read of the big hard-coded strings, be sure that the generated file would be valid TOML code, and the code should be much more maintainable and readable.
Using parametrized fixtures for test_config
I think you went to far there. Instead of running every test in test_config.py with both tbump.toml and pyproject.toml, we can write just a few tests;
def test_pyproject_toml_parse_happy():
     """ Check that config can be read from [tool.tbump] """
     ...

def test_pyproject_toml_no_tool_configured():
     """ Check what happens if there's no `[tool.tbump]` section """

And that's it. After that, the code path is the same, so we don't need to run test_invalid_hook_cmd twice.
This also means we probably don't need the pytest-lazy-fixture dependency
Missing tests
On the other hand, I think we need the following tests:
def test_uses_tbump_toml_by_default():
     """
     Create a project with both tbump.toml and pyproject.toml
     Check that tbump.toml is used
     """

def test_fallback_on_pyproject_toml():
    """
    Create a project with pyproject.toml but no tbump.toml
    Check that pyproject.toml is used
"""

mypy update
The last commit can be done in a separate pull request.

Superseeded by #78


Labels

🚀 Feature Proposal
Add Labels to the component library.
Motivation
Used to display text.
Example
Labeling a form field.
Related
#32

@jackcmeyer can you assign this one to me please, thanks!


Transfer data between server using tm1py

Hi, I have seen a previous question where it said that the best way to transfer data between servers is to use the to the execute_mdx function, so that it can return a dictionary that can be passed to the write function without any transformations.
I have tried to use this but I get an error in the write function. I am retrieving the MDX using tm1.get_native_view (cube_name, view_name).MDX
I feel the reason for the error is that the  order of dimension changes. Is there a way to get past this?
Also are there and better methods to transfer data using tm1py or tm1 processes?
@MariusWirtz can you please assist me with this. Thanks

Please post the error message and stack trace that you get when calling the write function with the result set from the execute_mdx function.
Did you pass element_unique_names=False as an argument to the execute_mdx function?
on a side note, you can simplify your code by using execute_view instead of reading the view and turning it into an MDX query.

Thanks for the swift reply, I have passed element_unique_names=False and this solves the issue. I have also simplified the code using your suggestion to use execute_view.
The code is now much simpler -
Data = tm1_source.cubes.cells.execute _view(source cube name, source view name, private=False, element unique names-False, skip zeros= True, skip_ consolidated cells= True, skip cell properties=True, skip_rule derived cells= True)
tm1_ target.cells.write(cube name= target cube name, cellset as dict= Data)

Is there anything else that can be done to make it more efficient and fast?

Two low-hanging fruits for performance:

To make the writeback faster, you use the write_async function.
https://cubewise-code.github.io/tm1py-tales/2021/write-with-tm1py.html

To make the reading faster you can do skip_zeros=True and potentially skip_rule_derived=True and skip_consolidated=True

on a side note, don't forget to clear the slice in the cube in the target instance.

Thanks for the help, will implement this.

Hi @Dashon3200,
two simple solutions:

use n smaller view / MDX queries instead of 1 large view.

change the maximum view size parameter in the tm1.cfg. You can also do this dynamically before and after the retrieval.

config_changes = {"Performance": {"Memory": {"MaximumViewSizeMB": 5000}}}
tm1.server.update_static_configuration(config_changes)

Thanks, will give this a try and share the results.


Update buildkite-metrics to use the agent metrics api

This is super rough, but it works.

Random idea, but what if we didn't pass the agent registration token over the wire and instead used a HMAC'd value with the account_id? Still vulnerable to reply attacks, but at least you can't then use that token to register an agent.

@lox I'd love to look into a better authentication exchange, especially I'd love to homogenize our tokens so that a cluster token can do some limited agent api stuff, and an agent token can do limited rest api stuff, etc. It'd be a little interesting, trying to create tokens which included enough information to do a mac exchange. But I think we're sufficiently protected against replay by TLS for the moment:
https://www.ssllabs.com/ssltest/analyze.html?d=agent.buildkite.com

I wasn't proposing any sort of key exchange @sj26, just rather than passing in BUILDKITE_AGENT_TOKEN, we'd pass in hmac($BUILDKITE_AGENT_TOKEN, $ACCOUNT_ID) and use that as the secret.
It means we aren't encouraging people to put the BUILDKITE_AGENT_TOKEN in env anywhere.

Right, right — for the agent setup and env, not the request channel. Yeah, that also kinda gels with what I mean. I was proposed opaque keys which actually pack information, like our graphql IDs, e.g. Authorization: Token base64(pack($TOKEN_UUID+$NONCE+hmac($TOKEN_SECRET,$TOKEN_UUID+$NONCE))), so BK can unpack the uuid to lookup the agent registration token and then validate the hmac — and you could generate that on the buildkite.com side to feed in as an env. I was misinterpreting and thinking the metrics agent would also then perform hmac for the request channel, but that's probably superfluous.
But yeah, step 2.

Gotcha! That makes sense. Reckon getting it working like it is makes sense for now anyway.

Tests are looking awesome @sj26

@lox thanks! They're rough, but they work. I think maybe some README updates and this is good for release, with some published caveats that it drops a bunch of metrics from the previous version around builds and historical — this is purely for job/agent workload metrics. Do you know many folks using it beyond the elastic stack?

Happy to merge with some README changes!

🚢


Saving new resource tracker template with non-unique alias or name deletes all work

If you create a new resource tracker template via Settings -> GGA -> View and Edit Trackers and give it the same name or alias as an already existing tracker template, GGA shows "Tracker name () or alias () is not unique" and closes the tracker editing window. While that is a fine error, the end result is that the newly configured tracker is discarded completely, which is quite irritating when you already spent a bunch of effort configuring the thresholds, colors, and other settings.
Please change this behavior so that the work is not lost.
I suggest either leaving the tracker window open when this error displays, or setting the alias to nothing and randomizing the name.

I'll fix this to append " (copy)" to a duplicate tracker name or alias.


Convert PlottingLibraryCore, PlottingLibrary2D, and HecCs to NuGet References.

Will need to provide credentials to RAS NuGet Page.

Stale. We're using a very specific version of the plotting library. @RyanM-RMA where does the source code for the plotting library we're using exist, or are we back in line with what RAS is using?

GitHub seems like an ideal location.
This code is no longer maintained by the RAS team?


cmd/compile: Type parameter is not validated in receiver

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

$ go version
devel go1.18-90fb5a4f97 Wed Dec 22 00:11:21 2021 +0000

Does this issue reproduce with the latest release?
No, generics required
What operating system and processor architecture are you using (go env)?
any
go env Output
$ go env

What did you do?
Please refer to https://gotipplay.golang.org/p/pyAU-Se4Iqj

package main

import (
	"fmt"
)

type Foo[T any] struct {
	t T
}

func (f Foo[string]) Do() {
	fmt.Println(f.t)
}

func main() {
	x := Foo[int]{}
	x.Do()
}

What did you expect to see?
A compiler error at line func (f Foo[string]) Do() explaining that string is an invalid type parameter value for Foo
What did you see instead?
The program successfully compiled and can be executed. Output:
0
Program exited.

string is not a keyword, just a predclared identifier. You can override it, e.g.
var string int = 3

Declares a variable of type int, value 3 and name string.
Similarly in your case, you're declaring the method Do on the generic type Foo, using the name string as the type parameter for the body of Do.
Dup of #48813

@randall77  Thanks for explanation.
But if we slightly modify the code:
package main

import (
	"fmt"
)

type Foo[T any] struct {
	t T
}

func Do(f Foo[string])  {
	fmt.Println(f.t)
}

func main() {
	x := Foo[int]{}
	Do(x)
}

we get:
./prog.go:17:5: cannot use x (variable of type Foo[int]) as type Foo[string] in argument to Do
Looks a little inconsistent.

I agree it does look a bit strange. But in the latter example you're not defining a new name string, you're using the actual predeclared string type and instantiating Foo with it. Type expressions in the receiver position and in argument position are very different w.r.t. generics.


Version: <IP_ADDRESS>; Variant: Portable; Arch: Amd64

Version: <IP_ADDRESS>; Variant: Portable; Arch: Amd64
Path: D:\Youngfe_Softwares\SyncTrayzorPortable-x64\SyncTrayzor.exe
System.UnauthorizedAccessException: 拒绝访问。
   在 Pri.LongPath.File.Copy(String sourcePath, String destinationPath, Boolean overwrite)
   在 SyncTrayzor.Services.FilesystemProvider.Copy(String from, String to) 位置 C:\projects\synctrayzor\src\SyncTrayzor\Services\FilesystemProvider.cs:行号 51
   在 SyncTrayzor.Services.Config.ConfigurationProvider.Initialize(Configuration defaultConfiguration) 位置 C:\projects\synctrayzor\src\SyncTrayzor\Services\Config\ConfigurationProvider.cs:行号 130
   在 SyncTrayzor.Bootstrapper.Configure() 位置 C:\projects\synctrayzor\src\SyncTrayzor\Bootstrapper.cs:行号 139
   在 Stylet.BootstrapperBase.Start(String[] args) 位置 c:\projects\stylet\Stylet\BootstrapperBase.cs:行号 81
   在 System.Windows.Application.OnStartup(StartupEventArgs e)
   在 System.Windows.Application.<.ctor>b__1_0(Object unused)
   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Thank you for your response. But it was running very well before this Exception. I didn't change any permission on "Data" folder.

Thank you for your response. But it was running very well before this Exception. I didn't change any permission on "Data" folder.

Please post the bit of your log file leading up to that exception.

I renamed the "Data" folder to "Dataa". And after I started SyncTrayzor.exe again, There was a new "Data" folder created. But I still had this same Exception.

2017-08-10 10:08:05.5542 #1644 [Info] SyncTrayzor.Services.ProcessStartProvider: Starting D:\Youngfe_Softwares\SyncTrayzorPortable-x64\ProcessRunner.exe --shell  -- "https://github.com/canton7/SyncTrayzor/issues"
2017-08-10 10:08:38.3289 #1644 [Info] SyncTrayzor.Services.ProcessStartProvider: Starting D:\Youngfe_Softwares\SyncTrayzorPortable-x64\ProcessRunner.exe --shell  -- "explorer.exe" /select, D:\Youngfe_Softwares\SyncTrayzorPortable-x64\logs\SyncTrayzor.log

I need more of the log - that snippet is not relevant.
Can you please email me the entire log file? My email address is on my GitHub profile page.

Hi, any response?

Closing as no response.


napalm.base.exceptions.ModuleImportError: Cannot import "napalm-dlink". Is the library installed?

Hi Guys,
I am trying to add Dlink switch as minion to saltstack using NAPALM. Can you tell me what driver should I configure in the pillar file?
Also, is there a python package that I need to install too?

Hi @abh23 , Dlink Driver it's not ready to use in producction it's in the early state of development.

Thanks @carbans. I figured it out. I am now using netmiko to manage dlink devices.

Netmiko has support, but you don't have the support of textfsm templates

Oh. Nice input. I will wait for this module to be available for production use


Why disable defaults of ntpsec configuration when migration file not exists?

Issue-template
Summary
When integrating this dm-ntp into our system, we found that the ntp-server in our system is in abnormal state after onboared to Industrail Edge Management system.
Version of the used components
Which versions of the Industrial Edge components did you use?
e.g.

dm-ntp: 1.17.1-1
...

Steps to reproduce
NA
What is the current bug behavior?
No default workable ntp-server configured.
What is the expected correct behavior?
Default configuration should take effect rather than commented
Relevant logs and/or screenshots

Line of code
https://github.com/industrial-edge/device-kit-ntp-service/blob/main/migration/ntpclassic_to_ntpsec.go#https://github.com/industrial-edge/device-kit-ntp-service/blob/main/migration/ntpclassic_to_ntpsec.go#L64-L73

Hi @zLie-a ,
Please fill out "Steps to reproduce".
Thanks


new blog post for API Alpha updates

LGTM, aside from that one example that would be nice to have

👍


🕒 **Discussion Activity Reminder** 🕒

I am not sure if my suggestion is the best, but what I feel strong about it is to avoid the usage of the word "Stale", such word is used across Issues and Pull Request with a particular connotation and expectation that I do not think it is applicable here.
Originally posted by @yordis in https://github.com/community/community/pull/69778#discussion_r1367419836

cc3e99dbaca4b1c9304b911477df7d17263a1698


mro release manager quickstarter contains wrong readme!

Describe the bug
readme.md of release manager is wrong (shows BE docker plain)
To Reproduce
Steps to reproduce the behavior:
go to https://github.com/opendevstack/ods-project-quickstarters/blob/master/boilerplates/release-manager/README.md
Expected behavior
correct readme md content is shown

Resolved by https://github.com/opendevstack/ods-project-quickstarters/pull/396.


Fix graph node stretch not taking titlebar into account

Found an issue while using the DialogueNodes addon:
https://github.com/nagidev/DialogueNodes
Where the stretch was not taking the titlebar into account, causing children to spill out of the node.
Before:

After:

I made sure other GraphNodes (visual shaders) were not broken by this change.

Thanks!


Notification position animation broken

Broken since 2.16.0: https://github.com/filamentphp/filament/pull/3847.

What exactly is broken? Having trouble getting context for this.

The notification should slide in horizontally.
Currently, that doesn't happen and the notification just appears without animation.
I think this might be related to the notifications with actions issue I reported on Discord recently.

These are animating correctly for me in Chrome, Safari and Firefox.

Sorry, I was wrong.
It's not about the horizontal animation, but the vertical position animation when new notifications slide in.
Try spamming the save button here: https://demo.filamentphp.com/shop/products/1/edit?activeRelationManager=0.


Enable the repoinit analyser by default

Expected Behaviour
Enable repoinit checks if the plug-in is not configured explicitly.  The repoinit plug-in is quick, does nothing if no repoinit extensions are present and is very useful. We should enable it by default.
Actual Behaviour
Repoinit checks are not activated.
Reproduce Scenario (including but not limited to)
Not applicable.
Steps to Reproduce
Not applicable.
Platform and Version
Not applicable.
Sample Code that illustrates the problem
Not applicable.
Logs taken while reproducing problem
Not applicable.

Hasn't this been resolved in 0.0.18?

Can we reenable the analyser (https://github.com/adobe/aemanalyser-maven-plugin/blob/4e1a129dc1f7853651e4fc765c32f2146cf8b50f/aemanalyser-maven-plugin/src/main/java/com/adobe/aem/analyser/AemAnalyser.java#L44) now that SLING-10215 is supposably fixed?


list_groups() documentation unclear, as is the REST API related to it.

In this section:

https://github.com/microsoft/azure-devops-python-api/blob/dev/azure-devops/azure/devops/v5_1/graph/graph_client.py#L145-L152

which has this blob of code:
    def list_groups(self, scope_descriptor=None, subject_types=None, continuation_token=None):
        """ListGroups.
        [Preview API] Gets a list of all groups in the current scope (usually organization or account).
        :param str scope_descriptor: Specify a non-default scope (collection, project) to search for groups.
        :param [str] subject_types: A comma separated list of user subject subtypes to reduce the retrieved results, e.g. Microsoft.IdentityModel.Claims.ClaimsIdentity
        :param str continuation_token: An opaque data blob that allows the next page of data to resume immediately after where the previous page ended. The only reliable way to know if there is more data left is the presence of a continuation token.
        :rtype: :class:`<PagedGraphGroups> <azure.devops.v5_1.graph.models.PagedGraphGroups>`
        """

what is actually meant by these pieces and where should I find that information? The REST API docs dont' really tell much and aren't much help either.

https://docs.microsoft.com/en-us/rest/api/azure/devops/graph/groups/list

Here is how I figured it out, but the documentation needs to be a bit more clear. This was through much trial and error.
"""List and Sort Groups in Azure DevOps Project
"""

import configparser
import logging
import os
import pprint as pp
# import json
from azure.devops.connection import Connection  # pylint: disable=import-error
from msrest.authentication import BasicAuthentication  # pylint: disable=import-error

def login_bits() -> Connection:
    """Just does login precursor bits.
    """
    if os.environ.get('AZDO_LOG'):
        logging.basicConfig(level=logging.DEBUG)

    if 'AZDO_PAT' in os.environ and 'AZDO_ORG' in os.environ:
        azdo_pat = os.environ.get('AZDO_PAT')
        ado_org_url = os.environ.get('AZDO_ORG')
    else:
        logging.info('Attempting to read ${HOME}/.local/azdo_config.ini')
        azdo_config = configparser.ConfigParser()
        azdo_config.read(os.environ.get('HOME') + '/.local/azdo_config.ini')
        azdo_pat = azdo_config['auth']['pat']
        ado_org_url = azdo_config['org']['name']

    credentials = BasicAuthentication('', azdo_pat)
    connection = Connection(base_url=ado_org_url, creds=credentials)

    return connection

def main():
    """Main
    """
    # Create a Core Client. This gives us access to the Projects API.
    core_client = login_bits().clients_v5_1.get_core_client()

    # We'll get the Project's information.
    project_info = core_client.get_project(project_id='dudleyp',
                                           include_capabilities=True)

    # Create a Graph Client.
    graph_client = login_bits().clients_v5_1.get_graph_client()

    # Get the descriptor for the project, since it's not in the actual Project
    # information originally retrieved.
    project_response = graph_client.get_descriptor(storage_key=project_info.id)

    # Get a list of all our groups for this Project we got the descriptor for.
    graph_response = graph_client.list_groups(
        scope_descriptor=project_response.value)

    # print it.
    pp.pprint(graph_response.graph_groups[0].display_name)

if __name__ == '__main__':
    main()


Call to undefined function sisventas\Http\Controllers\public_patch()

Laravel Version: 5.3.26
PHP Version: 5.6.28
Database Driver & Version:
Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/5.6.28
Versión del cliente de base de datos: libmysql - mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $
extensión PHP: mysqli

Description:
Hello, a few days ago my module of registering articles worked perfectly, in the options of creating and editing.
Now, when I try to assign a product image to a product, I get the following error.
FatalErrorException in ArticoController.php line 80:
Call to undefined function sisventas \ Http \ Controllers \ public_patch ()
I attach the code of the view and the controller, thank you, can give me the lights of this error.
Thank you very much.
File ArticuloController.php
File View Edit.B
ArticuloController.php.txt
edit.blade.php.txt
lade.php

That's php's way of saying the global function public_patch doesn't exist (and it also checked in the current namespace, hence that error message).

Did you mean public_path, rather than public_patch?
https://github.com/laravel/framework/blob/v5.3.26/src/Illuminate/Foundation/helpers.php#L580-L589

Hi, is public_patch
The solution, remove:
use Validator;
Thanks @GrahamCampbell


Fix SBO operator installed to v0.8.0

What type of PR is this?
/kind failing-test
What does this PR do / why we need it:
This PR fixes to v0.8.0 the Service Binding Operator deployed on Kubernetes cluster for tests.
Which issue(s) this PR fixes:
Fixes #?
PR acceptance criteria:

[ ] Unit test

[ ] Integration test

[ ] Documentation

[ ] Update changelog

[ ] I have read the test guidelines

How to test changes / Special notes to the reviewer:

/approve
/lgtm

/test psi-unit-test-windows

/retest

/hold

@feloy Operatorhub tests are failing on 4.7 cluster now

/approve cancel
after some thinking and in light of recent problem with https://github.com/openshift/odo/issues/4940 We should make sure that our tests are always using the latest SBO version.

Closing this PR as v0.8.0 will be replaced on OCP as soon as version 0.9.0 is released in the next few days


Redirect to https

Hello Traefik :)
How can I configure the helm chart, so that Traefik redirects all http traffic to https?
Thanks!

@rxbn Thanks for your question
You can solve this with the following values.yaml
additionalArguments:
  - --entrypoints.web.http.redirections.entrypoint.to=:443
  - --entrypoints.web.http.redirections.entrypoint.permanent=true

Duplicate of #166


release android version Error!

shell is
code-push release-react ArtGallery-Android android -m --description "点影更新" -d Production
error is:
buildGradle.android.defaultConfig.versionName.replace is not a function
build.gradle is
apply plugin: "com.android.application"

import com.android.build.OutputFile

/**
 * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
 * and bundleReleaseJsAndAssets).
 * These basically call `react-native bundle` with the correct arguments during the Android build
 * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
 * bundle directly from the development server. Below you can see all the possible configurations
 * and their defaults. If you decide to add a configuration block, make sure to add it before the
 * `apply from: "react.gradle"` line.
 *
 * project.ext.react = [
 *   // the name of the generated asset file containing your JS bundle
 *   bundleAssetName: "index.android.bundle",
 *
 *   // the entry file for bundle generation
 *   entryFile: "index.android.js",
 *
 *   // whether to bundle JS and assets in debug mode
 *   bundleInDebug: false,
 *
 *   // whether to bundle JS and assets in release mode
 *   bundleInRelease: true,
 *
 *   // whether to bundle JS and assets in another build variant (if configured).
 *   // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
 *   // The configuration property can be in the following formats
 *   //         'bundleIn${productFlavor}${buildType}'
 *   //         'bundleIn${buildType}'
 *   // bundleInFreeDebug: true,
 *   // bundleInPaidRelease: true,
 *   // bundleInBeta: true,
 *
 *   // the root of your project, i.e. where "package.json" lives
 *   root: "../../",
 *
 *   // where to put the JS bundle asset in debug mode
 *   jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
 *
 *   // where to put the JS bundle asset in release mode
 *   jsBundleDirRelease: "$buildDir/intermediates/assets/release",
 *
 *   // where to put drawable resources / React Native assets, e.g. the ones you use via
 *   // require('./image.png')), in debug mode
 *   resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
 *
 *   // where to put drawable resources / React Native assets, e.g. the ones you use via
 *   // require('./image.png')), in release mode
 *   resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
 *
 *   // by default the gradle tasks are skipped if none of the JS files or assets change; this means
 *   // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
 *   // date; if you have any other folders that you want to ignore for performance reasons (gradle
 *   // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
 *   // for example, you might want to remove it from here.
 *   inputExcludes: ["android/**", "ios/**"]
 * ]
 */

apply from: "react.gradle"

/**
 * Set this to true to create two separate APKs instead of one:
 *   - An APK that only works on ARM devices
 *   - An APK that only works on x86 devices
 * The advantage is the size of the APK is reduced by about 4MB.
 * Upload all the APKs to the Play Store and people will download
 * the correct one based on the CPU architecture of their device.
 */
def enableSeparateBuildPerCPUArchitecture = false

/**
 * Run Proguard to shrink the Java bytecode in release builds.
 */
def enableProguardInReleaseBuilds = false

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.artgallery"
        minSdkVersion 16
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }

    signingConfigs {
        release {
            storeFile file(MYAPP_RELEASE_STORE_FILE)
            storePassword MYAPP_RELEASE_STORE_PASSWORD
            keyAlias MYAPP_RELEASE_KEY_ALIAS
            keyPassword MYAPP_RELEASE_KEY_PASSWORD
        }
    }

    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86"
        }
    }
    buildTypes {
        release {
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
            signingConfig signingConfigs.release
        }
    }
    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
            def versionCodes = ["armeabi-v7a":1, "x86":2]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
            }
        }
    }
}

dependencies {
    compile project(':react-native-code-push')
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.facebook.react:react-native:+'
    // From node_modules
    compile project(':local-album')
    //for Photos select
    compile project(':lib:pingpp')
}

Our logic for parsing the binary version from your build.gradle file seems to be choking on something. We'll investigate this, but in the meantime, you can workaround it by adding '-t "1.0"' to the call to "code-push release-react". That will make the command skip reading the Gradle file entirely since your explicitly giving it the version.

It's release OK , but app no update...

I change the version to 1.0.0 , no problem