-
Notifications
You must be signed in to change notification settings - Fork 753
Conversation
I'm not quite sure why we test for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @dannyqiu, thanks for this PR! I've sent a few comments.
@@ -38,7 +38,7 @@ binary-cross: | |||
|
|||
all-yaml: kubeless.yaml kubeless-non-rbac.yaml kubeless-openshift.yaml kafka-zookeeper.yaml | |||
|
|||
kubeless.yaml: kubeless.jsonnet | |||
kubeless.yaml: kubeless.jsonnet kubeless-non-rbac.jsonnet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kubeless-non-rbac.jsonnet
has its own task, why are you adding it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since kubeless.yaml
is generated from kubeless-non-rbac.jsonnet
, it should be a dependency when compiling.
@@ -97,7 +97,7 @@ var callCmd = &cobra.Command{ | |||
logrus.Fatalf("Unable to generate ID %v", err) | |||
} | |||
req.SetHeader("event-id", eventID) | |||
req.SetHeader("event-time", timestamp.String()) | |||
req.SetHeader("event-time", timestamp.Format(time.RFC3339)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Agree with the format
pkg/utils/kubelessutil.go
Outdated
@@ -641,6 +641,8 @@ func EnsureFuncDeployment(client kubernetes.Interface, funcObj *kubelessApi.Func | |||
Value: dpm.Spec.Template.Spec.Containers[0].Resources.Limits.Memory().String(), | |||
}, | |||
) | |||
} else { | |||
return fmt.Errorf("Expected non-empty handler and non-empty function content") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not return an error here because there is the case in which the user specifies an already built image (custom) that doesn't require a handler and function. For example: kubeless function deploy foo --runtime-image=nginx
is a valid command. I am okay if we print something here in the logs though because probably something weird is happening.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
BTW @dannyqiu to fix the CI you need to modify the tests that are looking for the old timestamp format. You need to modify the tests that looks for https://github.com/kubeless/kubeless/blob/366318ecd3a85e3acd21d46351ef084ff0cf6595/examples/Makefile#L308 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You modified more examples than needed, please revert those changes for the cases that are not affected. Thanks for applying the changes!
examples/Makefile
Outdated
@@ -407,7 +407,7 @@ python-nats-verify: | |||
$$found | |||
# Verify event context | |||
logs=`kubectl logs -l function=python-nats`; \ | |||
echo $$logs | grep -q "event-time.*UTC" && \ | |||
echo $$logs | grep -q "event-time.*Z" && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your changes doesn't affect to nats
examples/Makefile
Outdated
@@ -441,7 +441,7 @@ python-kinesis-verify: | |||
$$found | |||
# Verify event context | |||
logs=`kubectl logs -l function=python-kinesis`; \ | |||
echo $$logs | grep -q "event-time.*UTC" && \ | |||
echo $$logs | grep -q "event-time.*Z" && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your changes doesn't affect to kinesis
either
examples/Makefile
Outdated
@@ -475,7 +475,7 @@ python-kinesis-multi-record-verify: | |||
$$found | |||
# Verify event context | |||
logs=`kubectl logs -l function=python-kinesis-multi-record`; \ | |||
echo $$logs | grep -q "event-time.*UTC" && \ | |||
echo $$logs | grep -q "event-time.*Z" && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same for kinesis
examples/Makefile
Outdated
@@ -519,7 +519,7 @@ nats-python-func1-topic-test-verify: | |||
$$found | |||
# Verify event context | |||
logs=`kubectl logs -l function=nats-python-func1-topic-test`; \ | |||
echo $$logs | grep -q "event-time.*UTC" && \ | |||
echo $$logs | grep -q "event-time.*Z" && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same for nats
examples/Makefile
Outdated
@@ -545,7 +545,7 @@ nats-python-func2-topic-test-verify: | |||
$$found | |||
# Verify event context | |||
logs=`kubectl logs -l function=nats-python-func2-topic-test`; \ | |||
echo $$logs | grep -q "event-time.*UTC" && \ | |||
echo $$logs | grep -q "event-time.*Z" && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same for nats
examples/Makefile
Outdated
@@ -571,7 +571,7 @@ nats-python-func-multi-topic-verify: | |||
$$found | |||
# Verify event context | |||
logs=`kubectl logs -l function=nats-python-func-multi-topic`; \ | |||
echo $$logs | grep -q "event-time.*UTC" && \ | |||
echo $$logs | grep -q "event-time.*Z" && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same
examples/Makefile
Outdated
@@ -593,7 +593,7 @@ nats-python-func-multi-topic-verify: | |||
$$found | |||
# Verify event context | |||
logs=`kubectl logs -l function=nats-python-func-multi-topic`; \ | |||
echo $$logs | grep -q "event-time.*UTC" && \ | |||
echo $$logs | grep -q "event-time.*Z" && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and the same
Sorry, I didn't see the updated changes. Thanks for the patch! |
Issue Ref: [Issue number related to this PR or None]
Description:
TODOs: