-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support of faasd and fix faas-netes issue #78
Support of faasd and fix faas-netes issue #78
Conversation
Hi @nitishkumar71 great to see the first version of this PR arriving :) I'm not sure if we have the issue and PR template in this repository yet, but would you mind adding in some of those fields to your PR description? |
Done. Sharing update w.r.t to pending work
|
c565064
to
d944271
Compare
Thank you for your contribution. I've just checked and your commit doesn't appear to be signed-off. That's something we need before your Pull Request can be merged. Please see our contributing guide. |
7da93cb
to
43ade6b
Compare
value = string(invoke(t, functionRequest, "", "", http.StatusOK)) | ||
if value != setValue { | ||
t.Errorf("got %s, wanted %s", value, newValue) | ||
if config.ProviderName == faasNetesProviderName { |
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, secret update does not happen directly in kubernetes. we needed to scale down and up the function for secret update. As test function does not read updated secret.
@@ -62,7 +66,12 @@ func Test_ScaleFromZeroDuringInvoke(t *testing.T) { | |||
|
|||
defer deleteFunction(t, functionRequest) | |||
|
|||
scaleFunction(t, functionName, 0) | |||
// scaleFunction(t, functionName, 0) | |||
err := config.Client.ScaleFunction(context.Background(), functionName, config.DefaultNamespace, 0) |
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.
Have standardized the scaling approach
tests/logs_test.go
Outdated
actual := strings.TrimLeft(msg.Text, "0123456789/: ") | ||
if !strings.HasPrefix(actual, expected) { | ||
t.Fatalf("got unexpected log message %q, expected %q", actual, expected) | ||
if config.ProviderName != faasdProviderName { |
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.
Log Prefix for faasd does not comply with this. Hence skipped it.
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.
what do the logs in faasd look like? can you document the difference here? maybe there is a way for us to normailze the test or even normalize the logs so that we can still test both?
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.
2021-10-03T14:34:27Z 2021/10/03 14:34:27 Version: 0.18.8 SHA: 76e463a7a017f81ed88ae7824d2ef7a3f60ed45e
2021-10-03T14:34:27Z 2021/10/03 14:34:27 Timeouts: read: 5s, write: 5s hard: 0s.
2021-10-03T14:34:27Z 2021/10/03 14:34:27 Listening on port: 8080
2021-10-03T14:34:27Z 2021/10/03 14:34:27 Writing lock-file to: /tmp/.lock
2021-10-03T14:34:27Z 2021/10/03 14:34:27 Metrics listening on port: 8081
2021-10-03T14:34:27Z 2021/10/03 14:34:27 Forking fprocess.
2021-10-03T14:34:27Z 2021/10/03 14:34:27 Wrote 11 Bytes - Duration: 0.008953 seconds
2021-10-03T14:44:00Z 2021/10/03 14:44:00 SIGTERM received.. shutting down server in 5s
2021-10-03T14:44:00Z 2021/10/03 14:44:00 Removing lock-file : /tmp/.lock
2021-10-03T14:44:05Z 2021/10/03 14:44:05 No new connections allowed. Exiting in: 5
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.
I guess if we add TZ-
to the trim set, then then it will work this test
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.
Perhaps the test could become less picky and just look for the core detail:
strings.contains(output, Forking fprocess.)
strings.contains(output, Wrote 11 Bytes)
cf8df23
to
bd20e73
Compare
bd20e73
to
e525c29
Compare
@LucasRoesler @alexellis It's ready for review. I have added few comments to put more context around the code changed. |
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.
@nitishkumar71 just a few whitespace fixes and one thing about config, but it otherwise looks good.
Sorry I was a bit slow. I was travelling and originally thought I would be more available but a few things went a little wrong/sideways and I was pretty occupied.
tests/logs_test.go
Outdated
actual := strings.TrimLeft(msg.Text, "0123456789/: ") | ||
if !strings.HasPrefix(actual, expected) { | ||
t.Fatalf("got unexpected log message %q, expected %q", actual, expected) | ||
if config.ProviderName != faasdProviderName { |
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.
what do the logs in faasd look like? can you document the difference here? maybe there is a way for us to normailze the test or even normalize the logs so that we can still test both?
Thank you for your contribution. I've just checked and your commit doesn't appear to be signed-off. That's something we need before your Pull Request can be merged. Please see our contributing guide. |
df686d5
to
0d213cf
Compare
0d213cf
to
412309d
Compare
Based on our discussion, have made changes in log test to validate the result. Don't have permission to re-run these jobs on this repo but the success results for the same commit are recorded in the fork. |
If we can fix faas-netes, maybe it can be done in a separate PR? |
412309d
to
7bd7d28
Compare
Signed-off-by: Nitishkumar Singh <[email protected]> Apply suggestions from code review Co-authored-by: Lucas Roesler <[email protected]> Changes for registry provider Signed-off-by: Nitishkumar Singh <[email protected]> Log comparision strategy changed Signed-off-by: Nitishkumar Singh <[email protected]> included 5 seconds dealy in log test Signed-off-by: Nitishkumar Singh <[email protected]> increased waiting time to 30 seconds Signed-off-by: Nitishkumar Singh <[email protected]>
7bd7d28
to
970be1d
Compare
@nitishkumar71 i can't tell what you changed to get it passing, it is the 30 second sleep? |
Yes |
It is a bit blunt, but let's start with something that works and iterate 👍 |
Signed-off-by: Nitishkumar Singh [email protected]
Certifier should support validation of faasd installation
Description
Motivation and Context
Closes #77 #60
How Has This Been Tested?
CI has been extended to test faasd installation along with openfaas in Kubernetes.
Types of changes
Checklist:
Commits:
git commit -s
for the Developer Certificate of Origin (DCO)Code:
Docs: