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

Filter service logs by git branch and commit #1868

Merged
merged 1 commit into from Mar 15, 2019

Conversation

3 participants
@pjdufour-truss
Copy link
Contributor

pjdufour-truss commented Mar 14, 2019

Description

This PR adds the ability to optionally filter service logs by git branch and commit. With the new logging improvements almost every log line from MyMove should include a git branch and commit now. For example,

bin/ecs-show-service-stopped-logs app experimental graceful_shutdown e68bf2ea55db75b5fb2a8a4b99bff39fbbaff2a6

Or just by the branch

bin/ecs-show-service-stopped-logs app experimental graceful_shutdown

Reviewer Notes

Is there anything you would like reviewers to give additional scrutiny?

Setup

None

Code Review Verification Steps

  • Code follows the guidelines for Logging
  • The requirements listed in
    Querying the Database Safely
    have been satisfied.
  • Any new migrations/schema changes:
    • Follow our guidelines for zero-downtime deploys (see Zero-Downtime Deploys)
    • Have been communicated to #dp3-engineering
    • Secure migrations have been tested using bin/run-prod-migrations
  • There are no aXe warnings for UI.
  • This works in IE.
  • Any new client dependencies (Google Analytics, hosted libraries, CDNs, etc) have been:
  • Tested in the Experimental environment (for changes to containers, app startup, or connection to data stores)
  • User facing changes have been reviewed by design.
  • Request review from a member of a different team.
  • Have the Pivotal acceptance criteria been met for this change?

References

Screenshots

None

@codecov

This comment has been minimized.

Copy link

codecov bot commented Mar 14, 2019

Codecov Report

Merging #1868 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1868   +/-   ##
=======================================
  Coverage   49.58%   49.58%           
=======================================
  Files         430      430           
  Lines       18499    18499           
  Branches     1632     1632           
=======================================
  Hits         9172     9172           
  Misses       8523     8523           
  Partials      804      804
set -u

[[ -f "$DIR/ecs-service-logs" ]] || (echo "Missing bin/ecs-service-logs. Run make build_tools" && exit 1)

"$DIR/ecs-service-logs" --cluster "app-${2}" --service "${1}" --status "RUNNING" --verbose
"$DIR/ecs-service-logs" --cluster "app-${2}" --service "${1}" --git-branch "${3:-}" --git-commit "${4:-}" --status "RUNNING" --verbose

This comment has been minimized.

@chrisgilmerproj

chrisgilmerproj Mar 14, 2019

Contributor

When you pass in - as a default does it just ignore the value?

This comment has been minimized.

@pjdufour-truss

pjdufour-truss Mar 14, 2019

Author Contributor

"${4:-}" this actually means it returns an empty string if the var $4 doesn't exist. Bash magic.

@chrisgilmerproj
Copy link
Contributor

chrisgilmerproj left a comment

🤖 - this is very cool!

@rdhariwal
Copy link
Contributor

rdhariwal left a comment

:shipit:

@pjdufour-truss pjdufour-truss merged commit c0034c4 into master Mar 15, 2019

19 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
ci/circleci: acceptance_tests_experimental Your tests passed on CircleCI!
Details
ci/circleci: acceptance_tests_local Your tests passed on CircleCI!
Details
ci/circleci: acceptance_tests_staging Your tests passed on CircleCI!
Details
ci/circleci: build_app Your tests passed on CircleCI!
Details
ci/circleci: build_migrations Your tests passed on CircleCI!
Details
ci/circleci: build_tools Your tests passed on CircleCI!
Details
ci/circleci: client_test Your tests passed on CircleCI!
Details
ci/circleci: client_test_coverage Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_mymove Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_office Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_tsp Your tests passed on CircleCI!
Details
ci/circleci: pre_deps_golang Your tests passed on CircleCI!
Details
ci/circleci: pre_deps_yarn Your tests passed on CircleCI!
Details
ci/circleci: pre_test Your tests passed on CircleCI!
Details
ci/circleci: server_test Your tests passed on CircleCI!
Details
ci/circleci: server_test_coverage Your tests passed on CircleCI!
Details
codecov/patch Coverage not affected when comparing 379b766...0ec7aa4
Details
codecov/project 49.58% remains the same compared to 379b766
Details

@pjdufour-truss pjdufour-truss deleted the service_logs_commit branch Mar 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.