Support generating protobuf & grpc service defs from argo packges

Is this a BUG REPORT or FEATURE REQUEST?:
This is a FEATURE REQUEST. At present, I can successfully use proteus to generate a .proto from argoproj/argo/pkg/apis/workflow/v1alpha1 but there are a few problems left to solve.
The various k8s.io packages that argo imports must also have .proto files generated if the .proto generated for argo itself is going to be a complete representation of the go definitions. This has not worked so far in my experiments. Often proteus segfaults when trying to run on k8s.io packages and other times it generates mostly empty .proto files.
You can try too:
$ pwd
/home/user/go/src/github.com/argoproj/argo/vendor
$ proteus -f ../proto -p k8s.io/api/core/v1 --verbose
...

Take a look inside /home/user/go/src/github.com/argoproj/argo/proto for what it outputs, if it even runs...
Here is what I have been doing to generate .proto from argo's workflow package.
$ pwd
/home/user/go/src/github.com/argoproj/argo
$ proteus -f ./proto -p github.com/argoproj/argo/pkg/apis/workflow/v1alpha1 --verbose

This produces a .proto file under ./proto/github.com/argoproj/argo/pkg/apis/workflow/v1alpha1/generated.proto which is great!
It also generates a pkg/apis/workflow/v1alpha1/generated.pb.go.
However, there are a few problems. Not all the messages have all their fields. For example,
v1alpha1.Item is defined as follows:
// Item expands a single workflow step into multiple parallel steps
// The value of Item can be a map, string, bool, or number
type Item struct {
	Value interface{}
}

But the resulting message lacks any fields... This has to do with an incompatibility between go's interface{} type and protoc (including gogo/protoc). One solution might be to use the Any proto type from google. See this stackoverflow thread.
// Item expands a single workflow step into multiple parallel steps
// The value of Item can be a map, string, bool, or number
message Item {
	option (gogoproto.goproto_getters) = false;
	option (gogoproto.typedecl) = false;
}

How to reproduce it (as minimally and precisely as possible):

install proteus
run the following from the root this project:

mkdir proto && \
proteus -f ./proto \
        -p github.com/argoproj/argo/pkg/apis/workflow/v1alpha1 \
        --verbose

Inspect the contents of ./proto

For what its worth, I also tried using go-to-protobuf and had essentially 0 success.
Environment:

Argo version:

$ argo version
argo: v2.1.0
  BuildDate: 2018-05-01T20:03:06Z
  GitCommit:<PHONE_NUMBER>cc194f1b34ff7295f0832eac1c1651
  GitTreeState: clean
  GitTag: v2.1.0
  GoVersion: go1.9.3
  Compiler: gc
  Platform: darwin/amd64

Kubernetes version :

$ kubectl version -o yaml
clientVersion:
  buildDate: 2017-12-21T06:34:11Z
  compiler: gc
  gitCommit: 6260bb08c46c31eea6cb538b34a9ceb3e406689c
  gitTreeState: clean
  gitVersion: v1.8.6
  goVersion: go1.8.3
  major: "1"
  minor: "8"
  platform: darwin/amd64
serverVersion:
  buildDate: 2018-01-18T09:42:01Z
  compiler: gc
  gitCommit: 5fa2db2bd46ac79e5e00a4e6ed24191080aa463b
  gitTreeState: clean
  gitVersion: v1.9.2
  goVersion: go1.9.2
  major: "1"
  minor: "9"
  platform: linux/amd64```

Another issue related to this, proteus and go-to-protobuf doesn’t seem to know how to generate proto import statements. This is part of why running proteus with --verbose shows so many wanrings about ignoring certain types because their proto def could not be found.

@jessesuen -- Here are some notes on my attempts:
I cloned your fork and checked out the protobuf branch. Painless! Proteus is installed from my previous attempts so I did not have to do that.
$ pwd
/Users/gaige/go/src/github.com/jessesuen/argo
$ mkdir proto
$ proteus -f ./proto -p github.com/jessesuen/argo/pkg/apis/workflow/v1alpha1 --verbose
# no output, This usually means nothing happened
$ ls proto
# no output, the dir is empty.
$ proteus -f ./proto -p k8s.io/api/core/v1 --verbose
# no output
$ ls proto
# no output

Interestingly, if I do the following, I get proto generated but of course since it is generated from argoproj/argo your changes to Item hasn't been applied.
$ proteus -f ./proto -p github.com/argoproj/argo/pkg/apis/workflow/v1alpha1 --verbose
WARN: ignoring type interface{}
WARN: type "SecretKeySelector" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "SecretKeySelector" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "SecretKeySelector" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "SecretKeySelector" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "SecretKeySelector" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "SecretKeySelector" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Time" of package github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/apis/meta/v1 will be ignored because it was not present on the scan path.
WARN: type "Time" of package github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/apis/meta/v1 will be ignored because it was not present on the scan path.
WARN: type "SecretKeySelector" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "SecretKeySelector" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "SecretKeySelector" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "SecretKeySelector" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "ContainerPort" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "EnvFromSource" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "EnvVar" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "ResourceRequirements" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "VolumeMount" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "VolumeDevice" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Probe" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Probe" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Lifecycle" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "TerminationMessagePolicy" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "PullPolicy" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "SecurityContext" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "ContainerPort" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "EnvFromSource" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "EnvVar" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "ResourceRequirements" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "VolumeMount" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "VolumeDevice" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Probe" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Probe" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Lifecycle" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "TerminationMessagePolicy" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "PullPolicy" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "SecurityContext" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Affinity" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Container" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Toleration" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "UID" of package github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/types will be ignored because it was not present on the scan path.
WARN: type "Time" of package github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/apis/meta/v1 will be ignored because it was not present on the scan path.
WARN: type "Time" of package github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/apis/meta/v1 will be ignored because it was not present on the scan path.
WARN: type "OwnerReference" of package github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/apis/meta/v1 will be ignored because it was not present on the scan path.
WARN: type "Initializers" of package github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/apis/meta/v1 will be ignored because it was not present on the scan path.
WARN: type "Volume" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "PersistentVolumeClaim" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Affinity" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Toleration" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "LocalObjectReference" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Time" of package github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/apis/meta/v1 will be ignored because it was not present on the scan path.
WARN: type "Time" of package github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/apis/meta/v1 will be ignored because it was not present on the scan path.
WARN: type "Volume" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
INFO: Generated proto: proto/github.com/argoproj/argo/pkg/apis/workflow/v1alpha1/generated.proto
INFO: executing protoc: /usr/local/bin/protoc --proto_path=/Users/gaige/go/src:./proto:/Users/gaige/go/src/github.com/gogo/protobuf/protobuf:proto/github.com/argoproj/argo/pkg/apis/workflow/v1alpha1:.
WARN: ignoring type interface{}
WARN: type "SecretKeySelector" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "SecretKeySelector" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "SecretKeySelector" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "SecretKeySelector" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "SecretKeySelector" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "SecretKeySelector" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Time" of package github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/apis/meta/v1 will be ignored because it was not present on the scan path.
WARN: type "Time" of package github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/apis/meta/v1 will be ignored because it was not present on the scan path.
WARN: type "SecretKeySelector" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "SecretKeySelector" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "SecretKeySelector" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "SecretKeySelector" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "ContainerPort" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "EnvFromSource" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "EnvVar" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "ResourceRequirements" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "VolumeMount" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "VolumeDevice" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Probe" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Probe" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Lifecycle" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "TerminationMessagePolicy" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "PullPolicy" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "SecurityContext" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "ContainerPort" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "EnvFromSource" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "EnvVar" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "ResourceRequirements" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "VolumeMount" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "VolumeDevice" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Probe" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Probe" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Lifecycle" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "TerminationMessagePolicy" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "PullPolicy" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "SecurityContext" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Affinity" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Container" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Toleration" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "UID" of package github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/types will be ignored because it was not present on the scan path.
WARN: type "Time" of package github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/apis/meta/v1 will be ignored because it was not present on the scan path.
WARN: type "Time" of package github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/apis/meta/v1 will be ignored because it was not present on the scan path.
WARN: type "OwnerReference" of package github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/apis/meta/v1 will be ignored because it was not present on the scan path.
WARN: type "Initializers" of package github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/apis/meta/v1 will be ignored because it was not present on the scan path.
WARN: type "Volume" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "PersistentVolumeClaim" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Affinity" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Toleration" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "LocalObjectReference" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: type "Time" of package github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/apis/meta/v1 will be ignored because it was not present on the scan path.
WARN: type "Time" of package github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/apis/meta/v1 will be ignored because it was not present on the scan path.
WARN: type "Volume" of package github.com/argoproj/argo/vendor/k8s.io/api/core/v1 will be ignored because it was not present on the scan path.
WARN: no RPCs in the given proto file, not generating anything
$ ls proto/
github.com
$ ls -lah  proto/github.com/argoproj/argo/pkg/apis/workflow/v1alpha1/generated.proto
-rwxr-xr-x  1 gaige  staff    12K May 22 12:29 proto/github.com/argoproj/argo/pkg/apis/workflow/v1alpha1/generated.proto

I am not really sure why proteus won't generate proto from your fork of argo.

Another experiment again using go-to-protobuf
$ dep ensure -add github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
Fetching sources...
$ sh ./hack/generate-proto.sh # This file is a copy of the one used in argo-cd
+ set -o errexit
+ set -o nounset
+ set -o pipefail
+++ dirname hack/generate-proto.sh
++ cd hack/..
++ pwd
+ PROJECT_ROOT=/Users/gaige/go/src/github.com/argoproj/argo
++ cd /Users/gaige/go/src/github.com/argoproj/argo
++ ls -d -1 ./vendor/k8s.io/code-generator
+ CODEGEN_PKG=./vendor/k8s.io/code-generator
+ PATH=/Users/gaige/go/src/github.com/argoproj/argo/dist:/Users/gaige/.cargo/bin:./node_modules/.bin:/Users/gaige/go/bin:/Users/gaige/.google/google-cloud-sdk/bin:/Users/gaige/.nvm/versions/node/v8.9.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
+ go build -i -o dist/go-to-protobuf ./vendor/k8s.io/code-generator/cmd/go-to-protobuf
+ go build -i -o dist/protoc-gen-gogo ./vendor/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo
+ PACKAGES=(github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1)
+ APIMACHINERY_PKGS=(+k8s.io/apimachinery/pkg/util/intstr +k8s.io/apimachinery/pkg/api/resource +k8s.io/apimachinery/pkg/runtime/schema +k8s.io/apimachinery/pkg/runtime k8s.io/apimachinery/pkg/apis/meta/v1 k8s.io/api/core/v1)
++ IFS=,
++ echo github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1
++ IFS=,
++ echo +k8s.io/apimachinery/pkg/util/intstr,+k8s.io/apimachinery/pkg/api/resource,+k8s.io/apimachinery/pkg/runtime/schema,+k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/api/core/v1
+ go-to-protobuf --logtostderr --go-header-file=/Users/gaige/go/src/github.com/argoproj/argo/hack/custom-boilerplate.go.txt --packages=github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1 --apimachinery-packages=+k8s.io/apimachinery/pkg/util/intstr,+k8s.io/apimachinery/pkg/api/resource,+k8s.io/apimachinery/pkg/runtime/schema,+k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/api/core/v1 --proto-import=./vendor
2018/05/22 13:57:33 github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto: warning: Import k8s.io/apimachinery/pkg/util/intstr/generated.proto but not used.
2018/05/22 13:57:33 github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto: warning: Import k8s.io/apimachinery/pkg/util/intstr/generated.proto but not used.
2018/05/22 13:57:33 github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto: warning: Import k8s.io/apimachinery/pkg/util/intstr/generated.proto but not used.
2018/05/22 13:57:33 github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/schema/generated.proto but not used.
github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto: warning: Import k8s.io/apimachinery/pkg/util/intstr/generated.proto but not used.
2018/05/22 13:57:35 github.com/argoproj/argo/vendor/k8s.io/api/core/v1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/schema/generated.proto but not used.
2018/05/22 13:57:37 github.com/argoproj/argo/vendor/github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/schema/generated.proto but not used.
github.com/argoproj/argo/vendor/github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1/generated.proto: warning: Import k8s.io/apimachinery/pkg/util/intstr/generated.proto but not used.
github.com/argoproj/argo/vendor/github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/generated.proto but not used.
+ go build -i -o dist/protoc-gen-gogofast ./vendor/github.com/gogo/protobuf/protoc-gen-gogofast
+ GOPROTOBINARY=gogofast
+ go build -i -o dist/protoc-gen-grpc-gateway ./vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
# github.com/argoproj/argo/vendor/google.golang.org/genproto/googleapis/api/annotations
vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go:63:26: undefined: proto.InternalMessageInfo
vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go:349:30: undefined: proto.InternalMessageInfo
vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go:614:39: undefined: proto.InternalMessageInfo

Another go
$ pwd ; git status
$ pwd ; git status
/Users/gaige/go/src/github.com/argoproj/argo
On branch protobuf
Your branch is up to date with 'origin/protobuf'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   Gopkg.lock
	modified:   Gopkg.toml

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	hack/generate-proto.sh

no changes added to commit (use "git add" and/or "git commit -a")
$ git diff Gopkg.toml
diff --git a/Gopkg.toml b/Gopkg.toml
index 3976756..69484b1 100644
--- a/Gopkg.toml
+++ b/Gopkg.toml
@@ -5,6 +5,9 @@ required = [
   "k8s.io/code-generator/cmd/lister-gen",
   # required by packr build (which we don't import as a package)
   "golang.org/x/sync/errgroup",
+  # required for proto generation
+  "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway",
+  "github.com/golang/protobuf",
 ]

 [[constraint]]
@@ -50,3 +53,11 @@ required = [
 [[constraint]]
   name = "github.com/spf13/cobra"
   branch = "master"
+
+[[constraint]]
+  name = "github.com/grpc-ecosystem/grpc-gateway"
+  version = "1.4.0"
+
+[[constraint]]
+  name = "github.com/gogo/protobuf"
+  version = "0.5.0"
$ bash ./hack/generate-proto.sh
+ set -o errexit
+ set -o nounset
+ set -o pipefail
+++ dirname ./hack/generate-proto.sh
++ cd ./hack/..
++ pwd
+ PROJECT_ROOT=/Users/gaige/go/src/github.com/argoproj/argo
++ cd /Users/gaige/go/src/github.com/argoproj/argo
++ ls -d -1 ./vendor/k8s.io/code-generator
+ CODEGEN_PKG=./vendor/k8s.io/code-generator
+ PATH=/Users/gaige/go/src/github.com/argoproj/argo/dist:/Users/gaige/.cargo/bin:./node_modules/.bin:/Users/gaige/go/bin:/Users/gaige/.google/google-cloud-sdk/bin:/Users/gaige/.nvm/versions/node/v8.9.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
+ go build -i -o dist/go-to-protobuf ./vendor/k8s.io/code-generator/cmd/go-to-protobuf
+ go build -i -o dist/protoc-gen-gogo ./vendor/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo
+ PACKAGES=(github.com/argoproj/argo/pkg/apis/workflow/v1alpha1)
+ APIMACHINERY_PKGS=(+k8s.io/apimachinery/pkg/util/intstr +k8s.io/apimachinery/pkg/api/resource +k8s.io/apimachinery/pkg/runtime/schema +k8s.io/apimachinery/pkg/runtime k8s.io/apimachinery/pkg/apis/meta/v1 k8s.io/api/core/v1)
++ IFS=,
++ echo github.com/argoproj/argo/pkg/apis/workflow/v1alpha1
++ IFS=,
++ echo +k8s.io/apimachinery/pkg/util/intstr,+k8s.io/apimachinery/pkg/api/resource,+k8s.io/apimachinery/pkg/runtime/schema,+k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/api/core/v1
+ go-to-protobuf --logtostderr --go-header-file=/Users/gaige/go/src/github.com/argoproj/argo/hack/custom-boilerplate.go.txt --packages=github.com/argoproj/argo/pkg/apis/workflow/v1alpha1 --apimachinery-packages=+k8s.io/apimachinery/pkg/util/intstr,+k8s.io/apimachinery/pkg/api/resource,+k8s.io/apimachinery/pkg/runtime/schema,+k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/api/core/v1 --proto-import=./vendor
2018/05/22 14:32:41 github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto: warning: Import k8s.io/apimachinery/pkg/util/intstr/generated.proto but not used.
2018/05/22 14:32:41 github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto: warning: Import k8s.io/apimachinery/pkg/util/intstr/generated.proto but not used.
2018/05/22 14:32:41 github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto: warning: Import k8s.io/apimachinery/pkg/util/intstr/generated.proto but not used.
2018/05/22 14:32:41 github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/schema/generated.proto but not used.
github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto: warning: Import k8s.io/apimachinery/pkg/util/intstr/generated.proto but not used.
2018/05/22 14:32:42 github.com/argoproj/argo/vendor/k8s.io/api/core/v1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/schema/generated.proto but not used.
2018/05/22 14:32:44 github.com/argoproj/argo/pkg/apis/workflow/v1alpha1/generated.proto: warning: Import k8s.io/apimachinery/pkg/util/intstr/generated.proto but not used.
github.com/argoproj/argo/pkg/apis/workflow/v1alpha1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/schema/generated.proto but not used.
github.com/argoproj/argo/pkg/apis/workflow/v1alpha1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/generated.proto but not used.
+ go build -i -o dist/protoc-gen-gogofast ./vendor/github.com/gogo/protobuf/protoc-gen-gogofast
+ GOPROTOBINARY=gogofast
+ go build -i -o dist/protoc-gen-grpc-gateway ./vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
# github.com/argoproj/argo/vendor/google.golang.org/genproto/googleapis/api/annotations
vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go:63:26: undefined: proto.InternalMessageInfo
vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go:349:30: undefined: proto.InternalMessageInfo
vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go:614:39: undefined: proto.InternalMessageInfo
$ git status
On branch protobuf
Your branch is up to date with 'origin/protobuf'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   Gopkg.lock
	modified:   Gopkg.toml
	modified:   pkg/apis/workflow/v1alpha1/types.go

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	hack/generate-proto.sh
	pkg/apis/workflow/v1alpha1/generated.pb.go
	pkg/apis/workflow/v1alpha1/generated.proto

no changes added to commit (use "git add" and/or "git commit -a")
$ git diff pkg/apis/workflow/v1alpha1/types.go
diff --git a/pkg/apis/workflow/v1alpha1/types.go b/pkg/apis/workflow/v1alpha1/types.go
index c85d824..29c7238 100644
--- a/pkg/apis/workflow/v1alpha1/types.go
+++ b/pkg/apis/workflow/v1alpha1/types.go
@@ -53,215 +53,215 @@ const (
 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 type Workflow struct {
        metav1.TypeMeta   `json:",inline"`
-       metav1.ObjectMeta `json:"metadata"`
-       Spec              WorkflowSpec   `json:"spec"`
-       Status            WorkflowStatus `json:"status"`
+       metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"`
+       Spec              WorkflowSpec   `json:"spec" protobuf:"bytes,2,opt,name=spec"`
+       Status            WorkflowStatus `json:"status" protobuf:"bytes,3,opt,name=status"`
 }

 // WorkflowList is list of Workflow resources
 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 type WorkflowList struct {
        metav1.TypeMeta `json:",inline"`
-       metav1.ListMeta `json:"metadata"`
-       Items           []Workflow `json:"items"`
+       metav1.ListMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"`
+       Items           []Workflow `json:"items" protobuf:"bytes,2,rep,name=items"`
 }

 // WorkflowSpec is the specification of a Workflow.
 type WorkflowSpec struct {
        // Templates is a list of workflow templates used in a workflow
-       Templates []Template `json:"templates"`
+       Templates []Template `json:"templates" protobuf:"bytes,1,rep,name=templates"`

        // Entrypoint is a template reference to the starting point of the workflow
-       Entrypoint string `json:"entrypoint"`
+       Entrypoint string `json:"entrypoint" protobuf:"bytes,2,opt,name=entrypoint"`

        // Arguments contain the parameters and artifacts sent to the workflow entrypoint
        // Parameters are referencable globally using the 'workflow' variable prefix.
        // e.g. {{workflow.parameters.myparam}}
-       Arguments Arguments `json:"arguments,omitempty"`
+       Arguments Arguments `json:"arguments,omitempty" protobuf:"bytes,3,opt,name=arguments"`

        // ServiceAccountName is the name of the ServiceAccount to run all pods of the workflow as.
-       ServiceAccountName string `json:"serviceAccountName,omitempty"`
+       ServiceAccountName string `json:"serviceAccountName,omitempty" protobuf:"bytes,4,opt,name=serviceAccountName"`

        // Volumes is a list of volumes that can be mounted by containers in a workflow.
-       Volumes []apiv1.Volume `json:"volumes,omitempty"`
+       Volumes []apiv1.Volume `json:"volumes,omitempty" protobuf:"bytes,5,rep,name=volumes"`

        // VolumeClaimTemplates is a list of claims that containers are allowed to reference.
        // The Workflow controller will create the claims at the beginning of the workflow
        // and delete the claims upon completion of the workflow
-       VolumeClaimTemplates []apiv1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"`
+       VolumeClaimTemplates []apiv1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,6,rep,name=volumeClaimTemplates"`

        // Parallelism limits the max total parallel pods that can execute at the same time in a workflow
-       Parallelism *int64 `json:"parallelism,omitempty"`
+       Parallelism *int64 `json:"parallelism,omitempty" protobuf:"varint,7,opt,name=parallelism"`

        // Suspend will suspend the workflow and prevent execution of any future steps in the workflow
-       Suspend *bool `json:"suspend,omitempty"`
+       Suspend *bool `json:"suspend,omitempty" protobuf:"varint,8,opt,name=suspend"`

        // NodeSelector is a selector which will result in all pods of the workflow
        // to be scheduled on the selected node(s). This is able to be overridden by
        // a nodeSelector specified in the template.
-       NodeSelector map[string]string `json:"nodeSelector,omitempty"`
+       NodeSelector map[string]string `json:"nodeSelector,omitempty" protobuf:"bytes,9,rep,name=nodeSelector"`

        // Affinity sets the scheduling constraints for all pods in the workflow.
        // Can be overridden by an affinity specified in the template
-       Affinity *apiv1.Affinity `json:"affinity,omitempty"`
+       Affinity *apiv1.Affinity `json:"affinity,omitempty" protobuf:"bytes,10,opt,name=affinity"`

        // Tolerations to apply to workflow pods.
-       Tolerations []apiv1.Toleration `json:"tolerations,omitempty"`
+       Tolerations []apiv1.Toleration `json:"tolerations,omitempty" protobuf:"bytes,11,rep,name=tolerations"`

        // ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images
        // in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets
        // can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet.
        // More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
-       ImagePullSecrets []apiv1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
+       ImagePullSecrets []apiv1.LocalObjectReference `json:"imagePullSecrets,omitempty" protobuf:"bytes,12,rep,name=imagePullSecrets"`

        // OnExit is a template reference which is invoked at the end of the
        // workflow, irrespective of the success, failure, or error of the
        // primary workflow.
-       OnExit string `json:"onExit,omitempty"`
+       OnExit string `json:"onExit,omitempty" protobuf:"bytes,13,opt,name=onExit"`
 }
# ... The rest is omitted for brevity but you get the idead
$ cat pkg/apis/workflow/v1alpha1/generated.proto

// This file was autogenerated by go-to-protobuf. Do not edit it manually!

syntax = 'proto2';

package github.com.argoproj.argo.pkg.apis.workflow.v1alpha1;

import "k8s.io/api/core/v1/generated.proto";
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";

// Package-wide variables from generator "generated".
option go_package = "v1alpha1";

// Arguments to a template
message Arguments {
  // Parameters is the list of parameters to pass to the template or workflow
  repeated Parameter parameters = 1;

  // Artifacts is the list of artifacts to pass to the template or workflow
  repeated Artifact artifacts = 2;
}

// Artifact indicates an artifact to place at a specified path
message Artifact {
  // name of the artifact. must be unique within a template's inputs/outputs.
  optional string name = 1;

  // Path is the container path to the artifact
  optional string path = 2;

  // mode bits to use on this file, must be a value between 0 and 0777
  // set when loading input artifacts.
  optional int32 mode = 3;

  // From allows an artifact to reference an artifact from a previous step
  optional string from = 4;

  // ArtifactLocation contains the location of the artifact
  optional ArtifactLocation artifactLocation = 5;

  // GlobalName exports an output artifact to the global scope, making it available as
  // '{{workflow.outputs.artifacts.XXXX}} and in workflow.status.outputs.artifacts
  optional string globalName = 6;
}

// ArtifactLocation describes a location for a single or multiple artifacts.
// It is used as single artifact in the context of inputs/outputs (e.g. outputs.artifacts.artname).
// It is also used to describe the location of multiple artifacts such as the archive location
// of a single workflow step, which the executor will use as a default location to store its files.
message ArtifactLocation {
  // S3 contains S3 artifact location details
  optional S3Artifact s3 = 1;

  // Git contains git artifact location details
  optional GitArtifact git = 2;

  // HTTP contains HTTP artifact location details
  optional HTTPArtifact http = 3;

  // Artifactory contains artifactory artifact location details
  optional ArtifactoryArtifact artifactory = 4;

  // Raw contains raw artifact location details
  optional RawArtifact raw = 5;
}

// ArtifactoryArtifact is the location of an artifactory artifact
message ArtifactoryArtifact {
  // URL of the artifact
  optional string url = 1;

  optional ArtifactoryAuth artifactoryAuth = 2;
}

// ArtifactoryAuth describes the secret selectors required for authenticating to artifactory
message ArtifactoryAuth {
  // UsernameSecret is the secret selector to the repository username
  optional k8s.io.api.core.v1.SecretKeySelector usernameSecret = 1;

  // PasswordSecret is the secret selector to the repository password
  optional k8s.io.api.core.v1.SecretKeySelector passwordSecret = 2;
}

// DAGTask represents a node in the graph during DAG execution
message DAGTask {
  // Name is the name of the target
  optional string name = 1;

  // Name of template to execute
  optional string template = 2;

  // Arguments are the parameter and artifact arguments to the template
  optional Arguments arguments = 3;

  // Dependencies are name of other targets which this depends on
  repeated string dependencies = 4;
}

// DAGTemplate is a template subtype for directed acyclic graph templates
message DAGTemplate {
  // Target are one or more names of targets to execute in a DAG
  optional string target = 1;

  // Tasks are a list of DAG tasks
  repeated DAGTask tasks = 2;
}

// GitArtifact is the location of an git artifact
message GitArtifact {
  // Repo is the git repository
  optional string repo = 1;

  // Revision is the git commit, tag, branch to checkout
  optional string revision = 2;

  // UsernameSecret is the secret selector to the repository username
  optional k8s.io.api.core.v1.SecretKeySelector usernameSecret = 3;

  // PasswordSecret is the secret selector to the repository password
  optional k8s.io.api.core.v1.SecretKeySelector passwordSecret = 4;
}

// HTTPArtifact allows an file served on HTTP to be placed as an input artifact in a container
message HTTPArtifact {
  // URL of the artifact
  optional string url = 1;
}

// Inputs are the mechanism for passing parameters, artifacts, volumes from one template to another
message Inputs {
  // Parameters are a list of parameters passed as inputs
  repeated Parameter parameters = 1;

  // Artifact are a list of artifacts passed as inputs
  repeated Artifact artifacts = 2;
}

// Item expands a single workflow step into multiple parallel steps
// The value of Item can be a map, string, bool, or number
//
// +protobuf=true
// +protobuf.options.(gogoproto.goproto_stringer)=false
// +k8s:openapi-gen=true
message Item {
  optional int64 type = 1;

  optional string numVal = 2;

  optional bool boolVal = 3;

  optional string strVal = 4;

  map<string, ItemValue> mapVal = 5;
}

// +protobuf=true
// +protobuf.options.(gogoproto.goproto_stringer)=false
// +k8s:openapi-gen=true
message ItemValue {
  optional int64 type = 1;

  optional string numVal = 2;

  optional bool boolVal = 3;

  optional string strVal = 4;
}

// Pod metdata
message Metadata {
  map<string, string> annotations = 1;

  map<string, string> labels = 2;
}

// NodeStatus contains status information about an individual node in the workflow
// +k8s:openapi-gen=false
message NodeStatus {
  // ID is a unique identifier of a node within the worklow
  // It is implemented as a hash of the node name, which makes the ID deterministic
  optional string id = 1;

  // Name is unique name in the node tree used to generate the node ID
  optional string name = 2;

  // DisplayName is a human readable representation of the node. Unique within a template boundary
  optional string displayName = 3;

  // Type indicates type of node
  optional string type = 4;

  // TemplateName is the template name which this node corresponds to. Not applicable to virtual nodes (e.g. Retry, StepGroup)
  optional string templateName = 5;

  // Phase a simple, high-level summary of where the node is in its lifecycle.
  // Can be used as a state machine.
  optional string phase = 6;

  // BoundaryID indicates the node ID of the associated template root node in which this node belongs to
  optional string boundaryID = 7;

  // A human readable message indicating details about why the node is in this condition.
  optional string message = 8;

  // Time at which this node started
  optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 9;

  // Time at which this node completed
  optional k8s.io.apimachinery.pkg.apis.meta.v1.Time finishedAt = 10;

  // PodIP captures the IP of the pod for daemoned steps
  optional string podIP = 11;

  // Daemoned tracks whether or not this node was daemoned and need to be terminated
  optional bool daemoned = 12;

  // Inputs captures input parameter values and artifact locations supplied to this template invocation
  optional Inputs inputs = 13;

  // Outputs captures output parameter values and artifact locations produced by this template invocation
  optional Outputs outputs = 14;

  // Children is a list of child node IDs
  repeated string children = 15;

  // OutboundNodes tracks the node IDs which are considered "outbound" nodes to a template invocation.
  // For every invocation of a template, there are nodes which we considered as "outbound". Essentially,
  // these are last nodes in the execution sequence to run, before the template is considered completed.
  // These nodes are then connected as parents to a following step.
  //
  // In the case of single pod steps (i.e. container, script, resource templates), this list will be nil
  // since the pod itself is already considered the "outbound" node.
  // In the case of DAGs, outbound nodes are the "target" tasks (tasks with no children).
  // In the case of steps, outbound nodes are all the containers involved in the last step group.
  // NOTE: since templates are composable, the list of outbound nodes are carried upwards when
  // a DAG/steps template invokes another DAG/steps template. In other words, the outbound nodes of
  // a template, will be a superset of the outbound nodes of its last children.
  repeated string outboundNodes = 16;
}

// Outputs hold parameters, artifacts, and results from a step
message Outputs {
  // Parameters holds the list of output parameters produced by a step
  repeated Parameter parameters = 1;

  // Artifacts holds the list of output artifacts produced by a step
  repeated Artifact artifacts = 2;

  // Result holds the result (stdout) of a script template
  optional string result = 3;
}

// Parameter indicate a passed string parameter to a service template with an optional default value
message Parameter {
  // Name is the parameter name
  optional string name = 1;

  // Default is the default value to use for an input parameter if a value was not supplied
  optional string default = 2;

  // Value is the literal value to use for the parameter.
  // If specified in the context of an input parameter, the value takes precedence over any passed values
  optional string value = 3;

  // ValueFrom is the source for the output parameter's value
  optional ValueFrom valueFrom = 4;

  // GlobalName exports an output parameter to the global scope, making it available as
  // '{{workflow.outputs.parameters.XXXX}} and in workflow.status.outputs.parameters
  optional string globalName = 5;
}

// RawArtifact allows raw string content to be placed as an artifact in a container
message RawArtifact {
  // Data is the string contents of the artifact
  optional string data = 1;
}

// ResourceTemplate is a template subtype to manipulate kubernetes resources
message ResourceTemplate {
  // Action is the action to perform to the resource.
  // Must be one of: get, create, apply, delete, replace
  optional string action = 1;

  // Manifest contains the kubernetes manifest
  optional string manifest = 2;

  // SuccessCondition is a label selector expression which describes the conditions
  // of the k8s resource in which it is acceptable to proceed to the following step
  optional string successCondition = 3;

  // FailureCondition is a label selector expression which describes the conditions
  // of the k8s resource in which the step was considered failed
  optional string failureCondition = 4;
}

// RetryStrategy provides controls on how to retry a workflow step
message RetryStrategy {
  // Limit is the maximum number of attempts when retrying a container
  optional int32 limit = 1;
}

// S3Artifact is the location of an S3 artifact
message S3Artifact {
  optional S3Bucket s3Bucket = 1;

  // Key is the key in the bucket where the artifact resides
  optional string key = 2;
}

// S3Bucket contains the access information required for interfacing with an S3 bucket
message S3Bucket {
  // Endpoint is the hostname of the bucket endpoint
  optional string endpoint = 1;

  // Bucket is the name of the bucket
  optional string bucket = 2;

  // Region contains the optional bucket region
  optional string region = 3;

  // Insecure will connect to the service with TLS
  optional bool insecure = 4;

  // AccessKeySecret is the secret selector to the bucket's access key
  optional k8s.io.api.core.v1.SecretKeySelector accessKeySecret = 5;

  // SecretKeySecret is the secret selector to the bucket's secret key
  optional k8s.io.api.core.v1.SecretKeySelector secretKeySecret = 6;
}

// ScriptTemplate is a template subtype to enable scripting through code steps
message ScriptTemplate {
  optional k8s.io.api.core.v1.Container container = 1;

  // Source contains the source code of the script to execute
  optional string source = 2;
}

// Sidecar is a container which runs alongside the main container
message Sidecar {
  optional k8s.io.api.core.v1.Container container = 1;

  // MirrorVolumeMounts will mount the same volumes specified in the main container
  // to the sidecar (including artifacts), at the same mountPaths. This enables
  // dind daemon to partially see the same filesystem as the main container in
  // order to use features such as docker volume binding
  optional bool mirrorVolumeMounts = 2;
}

// SuspendTemplate is a template subtype to suspend a workflow at a predetermined point in time
message SuspendTemplate {
}

// Template is a reusable and composable unit of execution in a workflow
message Template {
  // Name is the name of the template
  optional string name = 1;

  // Inputs describe what inputs parameters and artifacts are supplied to this template
  optional Inputs inputs = 2;

  // Outputs describe the parameters and artifacts that this template produces
  optional Outputs outputs = 3;

  // NodeSelector is a selector to schedule this step of the workflow to be
  // run on the selected node(s). Overrides the selector set at the workflow level.
  map<string, string> nodeSelector = 4;

  // Affinity sets the pod's scheduling constraints
  // Overrides the affinity set at the workflow level (if any)
  optional k8s.io.api.core.v1.Affinity affinity = 5;

  // Metdata sets the pods's metadata, i.e. annotations and labels
  optional Metadata metadata = 6;

  // Deamon will allow a workflow to proceed to the next step so long as the container reaches readiness
  optional bool daemon = 7;

  // Steps define a series of sequential/parallel workflow steps
  repeated WorkflowStep steps = 8;

  // Container is the main container image to run in the pod
  optional k8s.io.api.core.v1.Container container = 9;

  // Script runs a portion of code against an interpreter
  optional ScriptTemplate script = 10;

  // Resource template subtype which can run k8s resources
  optional ResourceTemplate resource = 11;

  // DAG template subtype which runs a DAG
  optional DAGTemplate dag = 12;

  // Suspend template subtype which can suspend a workflow when reaching the step
  optional SuspendTemplate suspend = 13;

  // Sidecars is a list of containers which run alongside the main container
  // Sidecars are automatically killed when the main container completes
  repeated Sidecar sidecars = 14;

  // Location in which all files related to the step will be stored (logs, artifacts, etc...).
  // Can be overridden by individual items in Outputs. If omitted, will use the default
  // artifact repository location configured in the controller, appended with the
  // <workflowname>/<nodename> in the key.
  optional ArtifactLocation archiveLocation = 15;

  // Optional duration in seconds relative to the StartTime that the pod may be active on a node
  // before the system actively tries to terminate the pod; value must be positive integer
  // This field is only applicable to container and script templates.
  optional int64 activeDeadlineSeconds = 16;

  // RetryStrategy describes how to retry a template when it fails
  optional RetryStrategy retryStrategy = 17;

  // Parallelism limits the max total parallel pods that can execute at the same time within the
  // boundaries of this template invocation. If additional steps/dag templates are invoked, the
  // pods created by those templates will not be counted towards this total.
  optional int64 parallelism = 18;

  // Tolerations to apply to workflow pods.
  repeated k8s.io.api.core.v1.Toleration tolerations = 19;
}

// ValueFrom describes a location in which to obtain the value to a parameter
message ValueFrom {
  // Path in the container to retrieve an output parameter value from in container templates
  optional string path = 1;

  // JSONPath of a resource to retrieve an output parameter value from in resource templates
  optional string jsonPath = 2;

  // JQFilter expression against the resource object in resource templates
  optional string jqFilter = 3;

  // Parameter reference to a step or dag task in which to retrieve an output parameter value from
  // (e.g. '{{steps.mystep.outputs.myparam}}')
  optional string parameter = 4;
}

// Workflow is the definition of a workflow resource
// +genclient
// +genclient:noStatus
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
message Workflow {
  optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;

  optional WorkflowSpec spec = 2;

  optional WorkflowStatus status = 3;
}

// WorkflowList is list of Workflow resources
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
message WorkflowList {
  optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;

  repeated Workflow items = 2;
}

// WorkflowSpec is the specification of a Workflow.
message WorkflowSpec {
  // Templates is a list of workflow templates used in a workflow
  repeated Template templates = 1;

  // Entrypoint is a template reference to the starting point of the workflow
  optional string entrypoint = 2;

  // Arguments contain the parameters and artifacts sent to the workflow entrypoint
  // Parameters are referencable globally using the 'workflow' variable prefix.
  // e.g. {{workflow.parameters.myparam}}
  optional Arguments arguments = 3;

  // ServiceAccountName is the name of the ServiceAccount to run all pods of the workflow as.
  optional string serviceAccountName = 4;

  // Volumes is a list of volumes that can be mounted by containers in a workflow.
  repeated k8s.io.api.core.v1.Volume volumes = 5;

  // VolumeClaimTemplates is a list of claims that containers are allowed to reference.
  // The Workflow controller will create the claims at the beginning of the workflow
  // and delete the claims upon completion of the workflow
  repeated k8s.io.api.core.v1.PersistentVolumeClaim volumeClaimTemplates = 6;

  // Parallelism limits the max total parallel pods that can execute at the same time in a workflow
  optional int64 parallelism = 7;

  // Suspend will suspend the workflow and prevent execution of any future steps in the workflow
  optional bool suspend = 8;

  // NodeSelector is a selector which will result in all pods of the workflow
  // to be scheduled on the selected node(s). This is able to be overridden by
  // a nodeSelector specified in the template.
  map<string, string> nodeSelector = 9;

  // Affinity sets the scheduling constraints for all pods in the workflow.
  // Can be overridden by an affinity specified in the template
  optional k8s.io.api.core.v1.Affinity affinity = 10;

  // Tolerations to apply to workflow pods.
  repeated k8s.io.api.core.v1.Toleration tolerations = 11;

  // ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images
  // in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets
  // can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet.
  // More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
  repeated k8s.io.api.core.v1.LocalObjectReference imagePullSecrets = 12;

  // OnExit is a template reference which is invoked at the end of the
  // workflow, irrespective of the success, failure, or error of the
  // primary workflow.
  optional string onExit = 13;
}

// WorkflowStatus contains overall status information about a workflow
// +k8s:openapi-gen=false
message WorkflowStatus {
  // Phase a simple, high-level summary of where the workflow is in its lifecycle.
  optional string phase = 1;

  // Time at which this workflow started
  optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 2;

  // Time at which this workflow completed
  optional k8s.io.apimachinery.pkg.apis.meta.v1.Time finishedAt = 3;

  // A human readable message indicating details about why the workflow is in this condition.
  optional string message = 4;

  // Nodes is a mapping between a node ID and the node's status.
  map<string, NodeStatus> nodes = 5;

  // PersistentVolumeClaims tracks all PVCs that were created as part of the workflow.
  // The contents of this list are drained at the end of the workflow.
  repeated k8s.io.api.core.v1.Volume persistentVolumeClaims = 6;

  // Outputs captures output values and artifact locations produced by the workflow via global outputs
  optional Outputs outputs = 7;
}

// WorkflowStep is a reference to a template to execute in a series of step
message WorkflowStep {
  // Name of the step
  optional string name = 1;

  // Template is a reference to the template to execute as the step
  optional string template = 2;

  // Arguments hold arguments to the template
  optional Arguments arguments = 3;

  // WithItems expands a step into multiple parallel steps from the items in the list
  repeated Item withItems = 4;

  // WithParam expands a step into from the value in the parameter
  optional string withParam = 5;

  // When is an expression in which the step should conditionally execute
  optional string when = 6;
}

So, partial progress but the bash script doesn't run to completion so I cannot attest to the quality of the proto.

Another experiment. This one removes references to grpc-gateway from the hack/generate-proto.sh script.
$ bash hack/generate-proto.sh
+ set -o errexit
+ set -o nounset
+ set -o pipefail
+++ dirname hack/generate-proto.sh
++ cd hack/..
++ pwd
+ PROJECT_ROOT=/Users/gaige/go/src/github.com/argoproj/argo
++ cd /Users/gaige/go/src/github.com/argoproj/argo
++ ls -d -1 ./vendor/k8s.io/code-generator
+ CODEGEN_PKG=./vendor/k8s.io/code-generator
+ PATH=/Users/gaige/go/src/github.com/argoproj/argo/dist:/Users/gaige/.cargo/bin:./node_modules/.bin:/Users/gaige/go/bin:/Users/gaige/.google/google-cloud-sdk/bin:/Users/gaige/.nvm/versions/node/v8.9.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
+ go build -i -o dist/go-to-protobuf ./vendor/k8s.io/code-generator/cmd/go-to-protobuf
+ go build -i -o dist/protoc-gen-gogo ./vendor/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo
+ PACKAGES=(github.com/argoproj/argo/pkg/apis/workflow/v1alpha1)
+ APIMACHINERY_PKGS=(+k8s.io/apimachinery/pkg/util/intstr +k8s.io/apimachinery/pkg/api/resource +k8s.io/apimachinery/pkg/runtime/schema +k8s.io/apimachinery/pkg/runtime k8s.io/apimachinery/pkg/apis/meta/v1 k8s.io/api/core/v1)
++ IFS=,
++ echo github.com/argoproj/argo/pkg/apis/workflow/v1alpha1
++ IFS=,
++ echo +k8s.io/apimachinery/pkg/util/intstr,+k8s.io/apimachinery/pkg/api/resource,+k8s.io/apimachinery/pkg/runtime/schema,+k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/api/core/v1
+ go-to-protobuf --logtostderr --go-header-file=/Users/gaige/go/src/github.com/argoproj/argo/hack/custom-boilerplate.go.txt --packages=github.com/argoproj/argo/pkg/apis/workflow/v1alpha1 --apimachinery-packages=+k8s.io/apimachinery/pkg/util/intstr,+k8s.io/apimachinery/pkg/api/resource,+k8s.io/apimachinery/pkg/runtime/schema,+k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/api/core/v1 --proto-import=./vendor
2018/05/22 16:25:19 github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto: warning: Import k8s.io/apimachinery/pkg/util/intstr/generated.proto but not used.
2018/05/22 16:25:19 github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto: warning: Import k8s.io/apimachinery/pkg/util/intstr/generated.proto but not used.
2018/05/22 16:25:20 github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto: warning: Import k8s.io/apimachinery/pkg/util/intstr/generated.proto but not used.
2018/05/22 16:25:20 github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/schema/generated.proto but not used.
github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto: warning: Import k8s.io/apimachinery/pkg/util/intstr/generated.proto but not used.
2018/05/22 16:25:21 github.com/argoproj/argo/vendor/k8s.io/api/core/v1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/schema/generated.proto but not used.
2018/05/22 16:25:23 github.com/argoproj/argo/pkg/apis/workflow/v1alpha1/generated.proto: warning: Import k8s.io/apimachinery/pkg/util/intstr/generated.proto but not used.
github.com/argoproj/argo/pkg/apis/workflow/v1alpha1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/schema/generated.proto but not used.
github.com/argoproj/argo/pkg/apis/workflow/v1alpha1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/generated.proto but not used.
+ go build -i -o dist/protoc-gen-gogofast ./vendor/github.com/gogo/protobuf/protoc-gen-gogofast
+ GOPROTOBINARY=gogofast
++ find /Users/gaige/go/src/github.com/argoproj/argo '(' -name '*.proto' -and -path '*/server/*' -or -path '*/reposerver/*' -and -name '*.proto' ')'
+ PROTO_FILES='/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/argoproj/argo-cd/reposerver/repository/repository.proto
/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/argoproj/argo-cd/server/application/application.proto
/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/argoproj/argo-cd/server/cluster/cluster.proto
/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/argoproj/argo-cd/server/repository/repository.proto
/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/argoproj/argo-cd/server/version/version.proto'
+ for i in '${PROTO_FILES}'
+ '[' -f /.dockerenv ']'
+ GOOGLE_PROTO_API_PATH=/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis
+ GOGO_PROTOBUF_PATH=/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/gogo/protobuf
+ protoc -I/Users/gaige/go/src/github.com/argoproj/argo -I/usr/local/include -I./vendor -I/Users/gaige/go/src -I/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis -I/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/gogo/protobuf --gogofast_out=plugins=grpc:/Users/gaige/go/src /Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/argoproj/argo-cd/reposerver/repository/repository.proto
vendor/github.com/argoproj/argo-cd/reposerver/repository/repository.proto: warning: Import k8s.io/api/core/v1/generated.proto but not used.
+ for i in '${PROTO_FILES}'
+ '[' -f /.dockerenv ']'
+ GOOGLE_PROTO_API_PATH=/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis
+ GOGO_PROTOBUF_PATH=/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/gogo/protobuf
+ protoc -I/Users/gaige/go/src/github.com/argoproj/argo -I/usr/local/include -I./vendor -I/Users/gaige/go/src -I/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis -I/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/gogo/protobuf --gogofast_out=plugins=grpc:/Users/gaige/go/src /Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/argoproj/argo-cd/server/application/application.proto
+ for i in '${PROTO_FILES}'
+ '[' -f /.dockerenv ']'
+ GOOGLE_PROTO_API_PATH=/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis
+ GOGO_PROTOBUF_PATH=/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/gogo/protobuf
+ protoc -I/Users/gaige/go/src/github.com/argoproj/argo -I/usr/local/include -I./vendor -I/Users/gaige/go/src -I/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis -I/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/gogo/protobuf --gogofast_out=plugins=grpc:/Users/gaige/go/src /Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/argoproj/argo-cd/server/cluster/cluster.proto
+ for i in '${PROTO_FILES}'
+ '[' -f /.dockerenv ']'
+ GOOGLE_PROTO_API_PATH=/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis
+ GOGO_PROTOBUF_PATH=/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/gogo/protobuf
+ protoc -I/Users/gaige/go/src/github.com/argoproj/argo -I/usr/local/include -I./vendor -I/Users/gaige/go/src -I/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis -I/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/gogo/protobuf --gogofast_out=plugins=grpc:/Users/gaige/go/src /Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/argoproj/argo-cd/server/repository/repository.proto
vendor/github.com/argoproj/argo-cd/server/repository/repository.proto: warning: Import k8s.io/api/core/v1/generated.proto but not used.
+ for i in '${PROTO_FILES}'
+ '[' -f /.dockerenv ']'
+ GOOGLE_PROTO_API_PATH=/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis
+ GOGO_PROTOBUF_PATH=/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/gogo/protobuf
+ protoc -I/Users/gaige/go/src/github.com/argoproj/argo -I/usr/local/include -I./vendor -I/Users/gaige/go/src -I/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis -I/Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/gogo/protobuf --gogofast_out=plugins=grpc:/Users/gaige/go/src /Users/gaige/go/src/github.com/argoproj/argo/vendor/github.com/argoproj/argo-cd/server/version/version.proto


Transpose of 3X3 Matrix Calculator

Calculator Functions
This Calculator will calculate the transpose of 3X3 Matrix.
I am GSSOC 22 contributor. Please assign me this issue.
Contribution Event
GSSOC22
Code of Conduct

[X] I follow Contributing Guidelines & Code of conduct of this project.

/assign


BUG — Login Failed: Unknown Error Occurred

Problem: When trying to login, I get this error.
What API calls is the application making to authenticate with the Navidrome server? I have my instance behind an Authentik forward-Auth proxy to help with user management, and I’m willing to bet that I don’t have the correct paths in the allowlist.

Currently I use the direct /login endpoint which likely means the app doesn't support IAP like Authentik due to the absence of SSO authentication. I don't plan to add the feature in near future but I think it's pretty interesting as I also use Authentik for some services

I have this same issue

i've added this issue to the "Known Issues/FAQ" discussion here. i will keep this issue open in case anyone has a different situation

same problem, my navidrome behind authentik and traefik


Page: Cases - 'Gewerk aan' cases behaviour

Case:
Ask Indrukwekkend for explanation what to do with 4 or more selected cases per employee.
Suggestion:
Might be another slideshow with .slick

Take measure of the blocks in Illustrator and fit them to the blocks. When published on behoorlijk.indrukwekkend.nl ask for explanation.


update setuptools required by codecov

docker build -t notary_client complains that  "platform_system" is required, when installing codecov. It looks like codecov's dependency setuptools needs upgrading.
Step 4/9 : RUN pip install codecov
 ---> Running in 4c5abc930d19
Downloading/unpacking codecov
  Downloading codecov-2.0.9-py2.py3-none-any.whl
Downloading/unpacking requests>=2.7.9 (from codecov)
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1266, in prepare_files
    req_to_install.extras):
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2401, in requires
    dm = self._dep_map
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2597, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2630, in _compute_dependencies
    common = frozenset(reqs_for_extra(None))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2627, in reqs_for_extra
    if req.marker_fn(override={'extra':extra}):
  File "/usr/lib/python2.7/dist-packages/_markerlib/markers.py", line 113, in marker_fn
    return eval(compiled_marker, environment)
  File "<environment marker>", line 1, in <module>
NameError: name 'platform_system' is not defined

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "patch-1" git@github.com:cyc115/notary.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

Can one of the admins verify this patch?

Thank you so much for fixing this @cyc115 - I'm wondering if it'd be better if we just used their bash script instead?  I know we made the switch at some point because there were some issues connectivity/instability issues originally, but it seems like it's been pretty stable for a while now and may require less dependencies than their python tool.

Heyy there @cyli ,thanks for your comment! I agree, it would be nice to remove pip as dependcy and move to codecov bash :). I am not familiar with codecov though so it would take a bit of time for the fix if no one get around to it. Is it possible to check in this quick fix to allow further development on notary while making another pr to remove pip as dependcy and use bash version of codecov?

@cyli Actually the problem no longer persist. I am going to close this PR as it is no longer needed. :) Thanks cyli!


New altruist implementation

Replaced "FALLBACK_URL" env variable with "ALTRUISTS"; this is reflected in the production configs and local .env.example
Created Altruist infra with HTTPS load balancer, nginx, and multiple blockchain nodes of each type
Fixed a few minor bugs introduced from development environment
Removed local blockchain-subdomain as localhost can work fine with subdomains
Upgraded Loopback 4 to latest; this introduced a possible need for a new sequence.ts #102  and required the manual addition of CORS headers to make it work for now

Blockchain subdomains were not working in my machine. At that time I was on Ubuntu and the portal was running from inside of a container.
@nymd was it as simple as http://blockchain-domain.localhost:port ?


Algolia issues

Hi! Thanks a lot for this tool.
Can you explain a little more the process with Algolia?
What's Algolia Token?
Thanks a lot

Btw I got this error: Error: The layer 'storeLocations' does not exist in the map's style and cannot be queried for features.

not work.

Too difficult to get working - Algolia is a third party map search corporation . I just wanted a simple mapbox with filters and store locations but I am skipping this


Mismatched types, expected std::string::String, found &str

#[derive(Serialize, TS)]
#[ts(export)]
struct GetMeResponse(#[ts(type = "CurrentUser")] CurrentUser);

CurrentUser is a struct from a library that does not derive(TS). I really just want to export that struct since I'm returning it directly as part of my API, but I'm getting this error when I try to do so:
mismatched types
expected `std::string::String` because of return type rustc(E0308)
rest.rs(19, 23): try using a conversion method: `.to_string()

The suggested conversion method obviously isn't valid in that position so I'm not sure how to resolve. Is this the correct way to export an external struct?

Thanks for the report. Fixed in 6.1.2 which was just released.

Thanks for the quick fix!


Update styles.scss

I believe this should remove the external link image in the blog posts but keep them in the main site. Both Kara and I feel that the little arrows are distracting in the blog.
We should confirm this on staging before release.

I don't think this change quite works currently, it's actually kind of difficult for CSS to do this "not in class" matching in general (e.g. https://stackoverflow.com/questions/31268382/css-selector-for-something-not-inside-something-else).

It is currently not possible to construct a CSS selector that matches elements that are not descendants of specific elements ...

I updated it so that only the vuln page and home page has the arrow on links.


Add specialised passStringToWasm for Node.js

Node.js doesn't currently implement TextEncoder::encodeInto. I've raised an upstream issue to add it - https://github.com/nodejs/node/issues/26904 - but it's likely to take some time and will be available only in new releases.
In the meanwhile, it's worth noting that Node.js already has Buffer::write which has pretty similar semantics, but doesn't require creating an intermediate view using .subarray and instead accepts pointer and length directly.
Also, Node.js has Buffer::byteLength helper which allows to efficiently retrieve an encoded byte length of a string upfront, and so allows us to avoid a loop with reallocations.
This change takes leverage of these methods by generating an additional Buffer-based view into the WASM memory and using it for string operations.
I'm seeing up to 35% increase in performance in string-heavy library benchmarks.

Nice!


Update kuro.js

fixes mobile notifications, thanks chenzw

showing that it works

Thanks for this

NP. I was bitching about it to a buddy and he was like I know how to fix this. So I figured I would pass it along.


Add keys endpoint

:tada: This PR is included in version 1.1.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


RFE: parse credentials file, then swizzle docker URI

I have a feeling this will be the initial experience for most users when trying to import from a private registry:
$ enroot import my-registry.com/foo/bar:v1.0
[ERROR] Invalid argument: my-registry.com/foo/bar:v1.0

$ # find out about the docker:// prefix

$ enroot import docker://my-registry.com/foo/bar:v1.0
[ERROR] URL https://registry-1.docker.io/v2/my-registry.com/foo/bar/manifests/v1.0 returned error code: 401

$ # realize that URL doesn't look right
$ # find out about the '/' to '#' conversion

$ enroot import docker://my-registry.com#foo/bar:v1.0
[ERROR] URL https://my-registry.com/jwt/auth returned error code: 403

$ # realize there's some sort of permissions error going on
$ # find out about the credentials file

$ echo "machine my-registry.com login $USER password $ACCESS_TOKEN" >>~/.config/enroot/.credentials
-bash: /home/lyeager/.config/enroot/credentials: No such file or directory
$ mkdir -p ~/.config/enroot/
$ echo "machine my-registry.com login $USER password $ACCESS_TOKEN" >>~/.config/enroot/.credentials
$ enroot import docker://my-registry.com#foo/bar:v1.0

$ # still didn't work ...
$ # on a whim, try adding the user explicitly

$ enroot import docker://lyeager@my-registry.com#foo/bar:v1.0

$ # OMG it works!

I have a proposal to help with some of that pain.
What if we parse the .credentials file before attempting to use curl. We keep a list of (machine,login) pairs. Then, we parse the URI given on the command line. If the registry is null, then the user may have forgotten to swap the "/" for a "#". Check to see if the first part of the image matches any hostname in the credentials file. If so, swap the next "/" for a "#". Also, add the "USER@" prefix to the URI if it is not present, since we can read the user from the credentials file.

It was not implemented this way mainly because of NGC, now that they fixed their authentication endpoint, it might be doable.

What is the "interactive login"?

Same as the above but without the credential file, it will prompt for the password:
enroot import docker://lyeager@my-registry.com#foo/bar:v1.0

Personally, I have never used the interactive login.

Speaking as someone in the "most users" group, this was exactly the experience that I went through.


Refactor annotation extension facet / make more parts of annotation extensions searchable

Currently we expose a facet 'annotation extensions', which is useful for curators but does not directly relate to a meaningful biological question. Also, it assumes classes (see http://jira.geneontology.org/browse/GO-838)
We will refactor this to expose facets that are biological categories. We will start with 'participant' and 'location' (TBD: how should the hierarchy of facets be handled in the UI?)
The majority of the work here is in the golr loader; the only change in this codebase is a trivial addition/replacement in the yaml. This would be a standard 4-tuple (id,label,closure,closure-label), though in fact only the closure parts would be used.
Population of closure
Each field is associated with 1 or more OPs. For example

participant: has participant
location: [located in, part of, occurs in]

Call this specified set P_f. Call the union of P_f and inferred subproperties P_f*.
For each gene association, we walk the graph

From the assigned GO class
From the extension class, if the extension relation is in P_f*.

Note that in either case, the walking should only follow OPs in P_f*.
The PoorMansReasoning strategy is to use the OGW graph walking code specifying P_f.
A cleaner approach is to replace steps 1 and 2 with the following:

Translate the combo of the class and extension to an OWL anon class, e.g. C and R some Y, as is done for GAF validation and as specified in the extensions paper. Call this C'
Use the materialized expression reasoner to find all reflexive ancestors of C' over every P in P_f.

This is guaranteed complete for EL. The PMR strategy may have edges but may be good enough. @hdietze to investigate.
Note that in all cases we treat the filler in the annotation extension as a class. For completeness we should ensure that we include SubClassOf some SO:gene | PR:protein etc to allow the GO-838 query in a seamless way.
Examples for 'location' facet

foo1 annotated to 'bar synthesis' (c5) and part_of some interneuron (c16)

location_closure should contain interneuron, neuron, etc as well as 'nervous system', since the initial relation R is in P_f', and the classes are in the subClass + partOf path (rule 2)
Note also that we expect the same thing if a precomposed term is used

foo1 annotated to 'bar synthesis in interneuron'
'bar synthesis in interneuron' =  'bar synthesis' and part_of some interneuron

So long as go-plus is loaded the path will be the same (rule 1)
TBD
For completeness, the (implicit or explicit) annotation relationship must be considered. E.g. for the location facet, and a direct annotation to 'axon' (here the location closure blends into the existing isa-partof one).
cc @dosumis

It should be noted that these fields should provide the obvious anchor points for the somewhat pointless at present amigo pages for CL, CHEBI classes etc

From my initial comments:
Currently in AmiGO, annotation extensions are stored as 1) a blob (annotation_extension_json) and 2) annotation extension classes (including class, class_label, the closures, searchables, etc.).
However, this means that you are unable to do things like find the target of an activity (e.g. has_input(UniProtKB:O89046) by normal searching methods. Moreover, even power tools like gannet are unable to do much here since the blob is not searchable. (The only way would be CLI tools, like the bbop libs, and parsing the output yourself).
The goal here would be to make a satisfying amount of the annotation extension structure available to the standard AmiGO interface.
This also means that we'll need to add more fields to the load.

@kltm - yes this will require additional closure fields such as participant as specified above.

Note that the specification here can be generalized to include population of the current isa_partof_closure and regulates_closure fields. This provides the natural solution to https://github.com/geneontology/amigo/issues/267


Support lowercase kiB

Currently, Size::from_str only supports uppercase units: KiB, KB. It would be nice to support having the first letter be lowercased, which doesn't change the meaning in any human-readable format I'm aware of.

Sounds good, a pr would be welcome.


Fix duplication

add_attribute_object and add_DN_object have similar code.
I put similar code in build_data().

Less code is better :)

This needs a rebase.  I'm prepared to approve after that's done.
And apologies for the long wait, @KaoruToda

@levitte I have finished to rebase.
However CI is failed.
Do I have to resolve conflicts?

Yes, you have to resolve conflicts.  And then push the update (you will have to use the -f flag when doing so).

@levitte I have finised to resolve conflicts.

Hello @KaoruToda,
in the OpenSSL repository merge commits like 466daea744e6 are prohibited. You have to rebase your branch to the tip of master instead. Fortunately, in git almost every mistake can be easily undone: Here are the necessary steps for you to revert the merge commit, rebase your branch on top of the master branch, and force-push your changes to your OpenSSL GitHub repository.
update your local copy and the master branch
git fetch --all
git checkout master
git pull

checkout your pull request branch
git checkout fix-duplication

verify that the tip of your branch points to the merge commit
git show

    commit 466daea744e60b28c06f6250bfcf3306bbff6bea (HEAD -> fix-duplication, github/pr-4566)
    Merge: 9a4a43f958 5848be0488
    Author: Kaoru Toda<EMAIL_ADDRESS>    Date:   Thu Mar 29 20:50:20 2018 +0900

        Merge branch 'master' into fix-duplication

undo the merge commit
git reset --hard HEAD~

rebase your branch on top of the master branch
git rebase master

force-push your new branch to your github clone
git push origin fix-duplication --force

Thank you for helping improve the code!  Merged to master.


Fix for layers.Reshape when using -1 and a dynamic batch size.

When using -1 for one of the dimensions and a dynamic batch size, with the Tensorflow backend, in non eager mode, this would result in Tensors with a None dimension where the -1 was. This is because the reshape op does not treat the batch size specially and therefore has no way to determine what goes to the batch dimension vs. the -1 dimension.
To fix this, we resolve the -1 to an actual number at build time since the layer knows that the batch dimension is untouched.
Note that this bug would not affect the JAX and PyTorch backends because we inject a fake batch size when needed.

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

Comparison is base (144d2af) 78.99% compared to head (c7ce0c4) 56.13%.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #18792       +/-   ##
===========================================
- Coverage   78.99%   56.13%   -22.86%
===========================================
  Files         336      336
  Lines       34182    34185        +3
  Branches     6695     6695
===========================================
- Hits        27001    19189     -7812
- Misses       5591    13537     +7946
+ Partials     1590     1459      -131

Flag
Coverage Δ

keras
56.13% <100.00%> (-22.76%)
:arrow_down:

keras-jax
?

keras-numpy
56.13% <100.00%> (+<0.01%)
:arrow_up:

keras-tensorflow
?

keras-torch
?

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.


trying to disable net.ipv4.ip_forward

I am trying to disable net.ipv4.ip_forward from file "/etc/sysctl.d/*" (nt.conf file) but when I write net.ipv4.ip_forward=0. I found out that it is not reading from that file. It is changing according to /proc/sys/net/ipv4/ip_forward.

provide some solution by which I can disable "net.ipv4.ip_forward"

Hi @Akshaybaisla, have you seen this issue https://github.com/flatcar-linux/Flatcar/issues/297? The sysctl.d files do work but there  are other ways through which ip_forwarding gets enabled: docker will enable it, systemd-networkd as well.
What you can do is set the iptables policy: iptables -P FORWARD DROP, which will stop ip_forwarding for anything not matching any other rules.

Hello, I'll close this issue. Feel free to reopen that issue if you got a chance to try the resolution suggested. Thanks :)


Youtube video doesn't fit the player window.

I've been getting this issue for a month now, and I'm getting tired of it!
http://i.imgur.com/jjzqSVy.jpg
It looks like that and I can't make it stop.  I tried switching player mode to flash and it fixes it, but then it keeps crashing firefox and it sucks.  I demand this to be fixed NOW!

If you are still using 2.1.7, upgrade to the current Developer Version.

Issues is still present in the current developer version for me. I am on Google Chrome Version 43.0.2357.81 (64-bit) on OSX

Same here. 525 dev build. Both userscript and xpi versions. Firefox 37.0.2.

I am using the updated dev build, that is not the issue.  It was fine earlier but now it is not.

Seems like YTC ignores inline style:
<video src="mediasource:https://www.youtube.com/somerandomsid" data-no-fullscreen="true" class="video-stream html5-main-video" style="width: 640px; height: 360px; left: 0px; top: 0px; transform: none;"></video>

The only "temp solution" is to enable the new player from https://www.youtube.com/testtube
Although I don't like that player as it don't show the play status and time all the time, the video fill the player.

The new player fixes the problem but it disables autoplay on playlists the same video stats again when you click on the play icon
There is a user script that is better called Resize YT To Window Size  https://greasyfork.org/en/scripts/811-resize-yt-to-window-size

This issue has been reposted multiple times, please use the search box to avoid more duplicates. The main issue thread seems to be focused here, as well as temporary fix suggestions: https://github.com/YePpHa/YouTubeCenter/issues/1844#issuecomment-106976683

Thanks, issue resolved.

#1844 applies to Chrome. So proper naming for issues is required otherwise duplicates unavoidable.
Searching for term 'resize' gives me 64! opened issues.
I guess the best way is to create new issue with proper title and close each duplicate with link to it.

 I demand this to be fixed NOW!

That's funny. The author provides this extension free of charge and works on it for free when he has time.  Especially considering this was discussed in multiple threads. So calm yourself RecklessJames.

A duplicate of #1844.


Corrected links to the template-operator

Since the template-operator was moved from Lifecycle-manager to a new repo, links have to be corrected.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


ollama run silently truncating prompt

What is the issue?
The documentation shows us how to use ollama run to summarize a file, see
$ ollama run llama3.2 "Summarize this file: $(cat README.md)"

https://github.com/ollama/ollama?tab=readme-ov-file#pass-the-prompt-as-an-argument
What's not obvious here is that by default the prompt (and therefore the file passed in) gets truncated to 2048 tokens.
There's a warning in the server's logs but it's not clear to users of the ollama run command

time=2024-12-14T18:01:09.338Z level=WARN source=runner.go:129 msg="truncating input prompt" limit=2048 prompt=3858 keep=5 new=2048

This behavior is not obvious to users and easy to run into without even realizing.
It seems like it's not possible to change this behavior currently with ollama run. What's the best way forward here? Can we add a parameter to ollama run or should ollama run issue a warning for users?
OS
Linux
GPU
Other
CPU
Intel
Ollama version
0.5.1

https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-specify-the-context-window-size
The CLI is a simple frontend to the API and has limited functionality, different clients are available to make better use of the server.  But you are right that the limitations aren't better explained.
A workaround for the problem you highlight is to increase the context window of the model.
$ ollama run llama3.2
>>> /set parameter num_ctx 32768
Set parameter 'num_ctx' to '32768'
>>> /save llama3.2-32k
Created new model 'llama3.2-32k'
>>> /bye
$ ollama run llama3.2-32k "Summarize this file: $(cat README.md)"
This file appears to be a documentation or README page for the Ollama project, which is a framework for building and running large language models.
...

Related: #7043

@daniel-j-h thanks for the issue. I definitely agree it's not easy to see right now when the context length is exceeded. I'm going to close this in favor of #7043 though.


Chemistry narwhal hackpad

Ready to submit your project? Nice job! Hopefully you've read the submission guidelines. If not, make sure to read them first.
If you're unsure about the format, make sure to check out the Orpheuspad example and follow the format there.
If this PR isn't a submission, that's okay too! If there's anything about this PR template that seems confusing, let me know in #hackpad on the slack!

Hi!
I am just out right now. I will do that as soon as I get home.
Ariane
On Wed, Oct 23, 2024, 4:26 p.m. blaze @.***> wrote:

@.**** requested changes on this pull request.
Would you mind please putting your files in a separate folder? Currently
they're in the root hackpads directory. Thanks!
—
Reply to this email directly, view it on GitHub
https://github.com/hackclub/hackpad/pull/209#pullrequestreview-2390423244,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AND3UZQTYSJA3Z4RCIEWH4TZ5AA7ZAVCNFSM6AAAAABQLNDLL2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGOJQGQZDGMRUGQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

Hi just added a message to the slack. I'm Having some trouble on figuring out how to fix it. I'll get the problem solved as soon as I can.

Hey - could you also add your source KiCad files to the PCB folder? I've fixed your file structure for you, everything needs to be in the hackpads/ChemistryNarwhalHackpad folder


ARROW-15911: [C++] Find correct GTest on macOS with Xcode

Was hitting some issue on Xcode with it not being able to find the correct version of gtest (it's suffixed with "d" if it's debug and release otherwise). I think the issue is that Xcode figures out for itself whether to build Debug or Release after CMake runs, which means that Xcode is stuck only being able to build in one of the two.

@kou I was told you could help review this, would you mind taking a look? Thanks!

I'm not sure this change, as it stands, does anything.  But I am no cmake expert.  GENERATOR_IS_MULTI_CONFIG is a global property and not a variable.  So, there is no variable named GENERATOR_IS_MULTI_CONFIG and so it defaults to "".  So it will never affect the if statement because it will always be false.
On my Windows machine it doesn't matter if I'm using the VS generator or the Ninja generator, it still sets CMAKE_GTEST_DEBUG_EXTENSION based on CMAKE_BUILD_TYPE.
On the other hand, if I do (note this is what we do later on in the line 1941 link @kou provided)...
get_property(_GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(_GENERATOR_IS_MULTI_CONFIG)

...then it does recognize the property.  However, if I then try and build in release mode, it fails because it can't find the file.  So all this does is switch multi-config generators from "always fails when building debug" to "always fails when building release".  You claim Multiconfiguration generators always want the flag set but I'm not sure that statement is true.  A multi-configuration generator wants gtestd.dll if run with --config Debug and it wants gtest.dll if run with --config Release.  There is no way to know, at configuration time, what will be needed at runtime.
So if we are going to build gtest at configuration time (which we need to do if we want to use gtest for test discovery) then we either need to build both versions if it is multi-config or we need to always build one version but only use that version for test discovery and not for a runtime dependency.

I'm not sure this change, as it stands, does anything.  But I am no cmake expert.  GENERATOR_IS_MULTI_CONFIG is a global property and not a variable.  So, there is no variable named GENERATOR_IS_MULTI_CONFIG and so it defaults to "".  So it will never affect the if statement because it will always be false.
On my Windows machine it doesn't matter if I'm using the VS generator or the Ninja generator, it still sets CMAKE_GTEST_DEBUG_EXTENSION based on CMAKE_BUILD_TYPE.
On the other hand, if I do (note this is what we do later on in the line 1941 link @kou provided)...
get_property(_GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(_GENERATOR_IS_MULTI_CONFIG)

...then it does recognize the property.  However, if I then try and build in release mode, it fails because it can't find the file.  So all this does is switch multi-config generators from "always fails when building debug" to "always fails when building release".  You claim Multiconfiguration generators always want the flag set but I'm not sure that statement is true.  A multi-configuration generator wants gtestd.dll if run with --config Debug and it wants gtest.dll if run with --config Release.  There is no way to know, at configuration time, what will be needed at runtime.
So if we are going to build gtest at configuration time (which we need to do if we want to use gtest for test discovery) then we either need to build both versions if it is multi-config or we need to always build one version but only use that version for test discovery and not for a runtime dependency.

(I'm trying to reproduce this on Linux with -G "Ninja Multi-Config". Please wait for a week... I don't have enough time to work on this for now...)

It seems that recent GoogleTest removes d postfix: https://github.com/google/googletest/pull/3732
The change isn't released yet. How about using the current main for bundled GoogleTest?
We can change to use a released version again once GoogleTest 1.12.0 is released.

Oh thank you for looking into this! I think that's a great solution too. If we switch to the GTest head, we can just get rid of that whole block dealing with the d suffix right?
Also looking at GTest's readme, I see that it says

GoogleTest now follows the Abseil Live at Head philosophy. We recommend using the latest commit in the main branch in your projects.

Maybe we could consider just always using the latest commit?

If we switch to the GTest head, we can just get rid of that whole block dealing with the d suffix right?

I think so. Could you try it?

Also looking at GTest's readme, I see that it says

GoogleTest now follows the Abseil Live at Head philosophy. We recommend using the latest commit in the main branch in your projects.

Maybe we could consider just always using the latest commit?

Ah, I didn't notice it.
Could you use the latest commit?

Switching to latest commit seems to work for me.

There was also a failure with jemalloc in debug builds now after I rebased. It seems that we were appending --enable-debug after appending the EP_LOG_OPTIONS, which made log_output_on_failure be set to 1;--enable-debug, which caused a failure. I fixed that also

@westonpace do you want to try this on Windows before we merge this?

The appveyor failure looks like a problem.  It's a slightly different link error than the one I'm getting but I think in spirit it is the same.  The arrow testing library gets built as a shared object and references some of gtest.  Those parts of gtest do not seem to be properly exporting their symbols.

Closing because it has been untouched for a while, in case it's still relevant feel free to reopen and move it forward 👍


⚠ Bofrost.at has degraded performance

In 9ef9788, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1727 ms

Resolved: Bofrost.at performance has improved in d16aaad after 11 minutes.