Skip to content
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

Enhance Logs readability of SDK Conformance Tests #1453

Merged
merged 3 commits into from
Apr 15, 2020

Conversation

aLekSer
Copy link
Collaborator

@aLekSer aLekSer commented Apr 7, 2020

Add more detaied logging for local SDK server. Make npm and apt-get less noisy. apt-get install openjdk-8-jre spares about 25% of output.

For #1452 .

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: ba75c5bb-4540-4194-8836-ab2e69062782

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1453/head:pr_1453 && git checkout pr_1453
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.5.0-8f273a1

@markmandel markmandel added the feature-freeze-do-not-merge Only eligible to be merged once we are out of feature freeze (next full release) label Apr 7, 2020
@aLekSer aLekSer force-pushed the fix/sdk-conformance branch 2 times, most recently from 416d785 to 08fb8dc Compare April 8, 2020 13:13
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: c8cc227f-f1f0-4550-aa3d-df41d49362b4

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1453/head:pr_1453 && git checkout pr_1453
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.5.0-416d785

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: d9602fd4-1665-44fe-86cc-195ff6d3fb8c

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1453/head:pr_1453 && git checkout pr_1453
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.5.0-08fb8dc

@markmandel markmandel added area/tests Unit tests, e2e tests, anything to make sure things don't break kind/cleanup Refactoring code, fixing up documentation, etc labels Apr 9, 2020
Copy link
Member

@markmandel markmandel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Happy to approve once we are out of feature freeze!

@@ -15,8 +15,8 @@
# limitations under the License.

cd /go/src/agones.dev/agones/test/sdk/nodejs
npm install
npm rebuild
npm install --quiet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - && \
apt-get install -y nodejs
apt-get install -qq -y nodejs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also nice! Good idea to reduce the noise!

@@ -143,7 +143,7 @@ run-sdk-conformance-no-build: FEATURE_GATES ?=
run-sdk-conformance-no-build: ensure-agones-sdk-image
run-sdk-conformance-no-build: ensure-build-sdk-image
DOCKER_RUN_ARGS="--net host -e AGONES_SDK_GRPC_PORT=$(GRPC_PORT) -e AGONES_SDK_HTTP_PORT=$(HTTP_PORT) -e FEATURE_GATES=$(FEATURE_GATES) $(DOCKER_RUN_ARGS)" COMMAND=sdktest $(MAKE) run-sdk-command & \
docker run -p $(GRPC_PORT):$(GRPC_PORT) -p $(HTTP_PORT):$(HTTP_PORT) -e "FEATURE_GATES=$(FEATURE_GATES)" -e "ADDRESS=" -e "TEST=$(TESTS)" -e "TIMEOUT=$(TIMEOUT)" -e "DELAY=$(DELAY)" \
docker run -p $(GRPC_PORT):$(GRPC_PORT) -p $(HTTP_PORT):$(HTTP_PORT) -e "FEATURE_GATES=$(FEATURE_GATES)" -e "ADDRESS=" -e "TEST=$(TESTS)" -e "SDK_NAME=$(SDK_FOLDER)" -e "TIMEOUT=$(TIMEOUT)" -e "DELAY=$(DELAY)" \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

gsState: agonesv1.GameServerStateScheduled,
}
l.logger = runtime.NewLoggerWithType(l)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition!

// SetSdkName set SDK name to be added to the logs
func (l *LocalSDKServer) SetSdkName(sdkName string) {
l.testSdkName = sdkName
l.logger = l.logger.WithField("sdkName", l.testSdkName)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect. Love it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks now at least logs from local SDK server would be labeled with SDK name. Hope to label SDK test clients in the future (second half of logs).

@markmandel markmandel removed the feature-freeze-do-not-merge Only eligible to be merged once we are out of feature freeze (next full release) label Apr 14, 2020
@google-oss-robot
Copy link

New changes are detected. LGTM label has been removed.

@aLekSer
Copy link
Collaborator Author

aLekSer commented Apr 15, 2020

Rebased to a fresh master, no changes to the code were made.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 1b39bfff-48e0-42df-a0b4-a8c1a7facd42

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@aLekSer aLekSer force-pushed the fix/sdk-conformance branch 2 times, most recently from e291318 to fff3356 Compare April 15, 2020 11:25
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: dab77125-f1ab-486f-961f-d740cd530a40

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1453/head:pr_1453 && git checkout pr_1453
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.6.0-e291318

// recordRequest append request name to slice
func (l *LocalSDKServer) recordRequest(request string) {
if l.testMode {
l.testMutex.Lock()
defer l.testMutex.Unlock()
l.requestSequence = append(l.requestSequence, request)
}
if l.testSdkName != "" {
l.logger.Debugf("Received %s requets", request)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: request

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 6a74bca0-1b66-408e-bff8-e50149a65920

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1453/head:pr_1453 && git checkout pr_1453
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.6.0-fff3356

if _, ok := aSet[v]; !ok {
l.logger.Infof("Found an element which was not expected %s", v)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.WithField().Error() ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, here definitely should go an error, as well as this helps me to identify one fmt.Print usage.

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akremsa, aLekSer, markmandel

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-robot
Copy link

@akremsa: changing LGTM is restricted to collaborators

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 12e9fd85-fd9c-413e-a4a2-c2fe488230fa

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1453/head:pr_1453 && git checkout pr_1453
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.6.0-189e307

@aLekSer aLekSer merged commit f4b8021 into googleforgames:master Apr 15, 2020
@markmandel markmandel added this to the 1.6.0 milestone May 19, 2020
ilkercelikyilmaz pushed a commit to ilkercelikyilmaz/agones that referenced this pull request Oct 23, 2020
Add more detaied logging for local SDK server. Make npm and apt-get less noisy. apt-get install openjdk-8-jre spares about 25% of output.

For googleforgames#1452 .

* SDK conformance tests - enhance logging

Remove noisy npm and apt-get logs.

* Use logrus.Entry to tag all local SDK logs.

* Simple ParseEnvFlags test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/tests Unit tests, e2e tests, anything to make sure things don't break kind/cleanup Refactoring code, fixing up documentation, etc size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants