Skip to content
This repository has been archived by the owner on Jun 19, 2022. It is now read-only.

Commit

Permalink
[release-0.13] Auto-update dependencies (#731)
Browse files Browse the repository at this point in the history
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign grantr nachocano
/cc grantr nachocano
  • Loading branch information
mattmoor authored Mar 30, 2020
1 parent 07837b6 commit b986a36
Show file tree
Hide file tree
Showing 14 changed files with 151 additions and 64 deletions.
18 changes: 9 additions & 9 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions vendor/github.com/google/go-containerregistry/pkg/name/digest.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/github.com/google/go-containerregistry/pkg/name/ref.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions vendor/github.com/google/go-containerregistry/pkg/name/tag.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,19 @@ func (source *Trigger) ConvertTo(ctx context.Context, obj apis.Convertible) erro
sink.Spec.Subscriber = source.Spec.Subscriber
if source.Spec.Filter != nil {
sink.Spec.Filter = &v1beta1.TriggerFilter{
Attributes: make(v1beta1.TriggerFilterAttributes, 0),
}
if source.Spec.Filter.Attributes != nil {
sink.Spec.Filter = &v1beta1.TriggerFilter{
Attributes: make(v1beta1.TriggerFilterAttributes, len(*source.Spec.Filter.Attributes)),
}
for k, v := range *source.Spec.Filter.Attributes {
sink.Spec.Filter.Attributes[k] = v
}
}
if source.Spec.Filter.DeprecatedSourceAndType != nil {
sink.Spec.Filter = &v1beta1.TriggerFilter{
Attributes: make(v1beta1.TriggerFilterAttributes, 2),
}
sink.Spec.Filter.Attributes["source"] = source.Spec.Filter.DeprecatedSourceAndType.Source
sink.Spec.Filter.Attributes["type"] = source.Spec.Filter.DeprecatedSourceAndType.Type
}
Expand All @@ -63,7 +68,7 @@ func (sink *Trigger) ConvertFrom(ctx context.Context, obj apis.Convertible) erro
sink.ObjectMeta = source.ObjectMeta
sink.Spec.Broker = source.Spec.Broker
sink.Spec.Subscriber = source.Spec.Subscriber
if source.Spec.Filter != nil {
if source.Spec.Filter != nil && source.Spec.Filter.Attributes != nil {
attributes := TriggerFilterAttributes{}
for k, v := range source.Spec.Filter.Attributes {
attributes[k] = v
Expand Down
14 changes: 12 additions & 2 deletions vendor/knative.dev/eventing/test/lib/resources/eventing.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ func WithAttributesTriggerFilterV1Beta1(eventSource, eventType string, extension
}
}

// WithDependencyAnnotaionTrigger returns an option that adds a dependency annotation to the given Trigger.
func WithDependencyAnnotaionTrigger(dependencyAnnotation string) TriggerOption {
// WithDependencyAnnotationTrigger returns an option that adds a dependency annotation to the given Trigger.
func WithDependencyAnnotationTrigger(dependencyAnnotation string) TriggerOption {
return func(t *eventingv1alpha1.Trigger) {
if t.Annotations == nil {
t.Annotations = make(map[string]string)
Expand All @@ -304,6 +304,16 @@ func WithDependencyAnnotaionTrigger(dependencyAnnotation string) TriggerOption {
}
}

// WithDependencyAnnotationTrigger returns an option that adds a dependency annotation to the given Trigger.
func WithDependencyAnnotationTriggerV1Beta1(dependencyAnnotation string) TriggerOptionV1Beta1 {
return func(t *eventingv1beta1.Trigger) {
if t.Annotations == nil {
t.Annotations = make(map[string]string)
}
t.Annotations[eventingv1beta1.DependencyAnnotation] = dependencyAnnotation
}
}

// WithBroker returns an option that adds a Broker for the given Trigger.
func WithBroker(brokerName string) TriggerOption {
return func(t *eventingv1alpha1.Trigger) {
Expand Down
2 changes: 1 addition & 1 deletion vendor/knative.dev/pkg/injection/sharedmain/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func GetLeaderElectionConfig(ctx context.Context) (*kle.Config, error) {
leaderElectionConfigMap, err := kubeclient.Get(ctx).CoreV1().ConfigMaps(system.Namespace()).Get(kle.ConfigMapName(), metav1.GetOptions{})
if err != nil {
if apierrors.IsNotFound(err) {
return kle.NewConfigFromMap(nil)
return kle.NewConfigFromConfigMap(nil)
}

return nil, err
Expand Down
3 changes: 2 additions & 1 deletion vendor/knative.dev/pkg/metrics/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package metrics
import (
"errors"
"fmt"
"strings"
"sync"

"go.opencensus.io/stats/view"
Expand Down Expand Up @@ -74,7 +75,7 @@ func UpdateExporterFromConfigMap(component string, logger *zap.SugaredLogger) fu
return func(configMap *corev1.ConfigMap) {
UpdateExporter(ExporterOptions{
Domain: domain,
Component: component,
Component: strings.ReplaceAll(component, "-", "_"),
ConfigMap: configMap.Data,
}, logger)
}
Expand Down
5 changes: 3 additions & 2 deletions vendor/knative.dev/test-infra/scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@ integration tests).
Use the flags `--build-tests`, `--unit-tests` and `--integration-tests` to run a
specific set of tests.

To run a specific program as a test, use the `--run-test` flag, and provide the
To run specific programs as a test, use the `--run-test` flag, and provide the
program as the argument. If arguments are required for the program, pass
everything as a single quotes argument. For example,
`./presubmit-tests.sh --run-test "test/my/test data"`.
`./presubmit-tests.sh --run-test "test/my/test data"`. This flag can be used
repeatedly, and each one will be ran in sequential order.

The script will automatically skip all presubmit tests for PRs where all changed
files are exempt of tests (e.g., a PR changing only the `OWNERS` file).
Expand Down
21 changes: 20 additions & 1 deletion vendor/knative.dev/test-infra/scripts/library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,13 @@ function capture_output() {
return ${failed}
}

# Print failed step, which could be highlighted by spyglass.
# Parameters: $1...n - description of step that failed
function step_failed() {
local spyglass_token="Step failed:"
echo "${spyglass_token} $@"
}

# Create a temporary file with the given extension in a way that works on both Linux and macOS.
# Parameters: $1 - file name without extension (e.g. 'myfile_XXXX')
# $2 - file extension (e.g. 'xml')
Expand Down Expand Up @@ -475,7 +482,19 @@ function run_go_tool() {
if [[ -z "$(which ${tool})" ]]; then
local action=get
[[ $1 =~ ^[\./].* ]] && action=install
go ${action} $1
# Avoid running `go get` from root dir of the repository, as it can change go.sum and go.mod files.
# See discussions in https://github.com/golang/go/issues/27643.
if [[ ${action} == "get" && $(pwd) == "${REPO_ROOT_DIR}" ]]; then
local temp_dir="$(mktemp -d)"
local install_failed=0
# Swallow the output as we are returning the stdout in the end.
pushd "${temp_dir}" > /dev/null 2>&1
go ${action} $1 || install_failed=1
popd > /dev/null 2>&1
(( install_failed )) && return ${install_failed}
else
go ${action} $1
fi
fi
shift 2
${tool} "$@"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# For help, see
# https://github.com/raviqqe/liche/blob/master/README.md

# Don't check localhost links
-x "^https?://localhost($|[:/].*)"
# Don't check localhost links and don't check templated links
-x "(^https?://localhost($|[:/].*))|(^https://.*{{.*$)"
Loading

0 comments on commit b986a36

Please sign in to comment.