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

Log output review #35

Open
phuonghuynh opened this issue Aug 10, 2017 · 4 comments
Open

Log output review #35

phuonghuynh opened this issue Aug 10, 2017 · 4 comments
Assignees

Comments

@phuonghuynh
Copy link
Contributor

Sample log messages for one SQS like bellow, INFO level is enabled by default
Which log entries are redundant?

Aug 10, 2017 12:27:59 PM [log] 
INFO: [c.r.j.p.a.SQSTrigger][thread-0000B1] [job-testjenkins-pipeline] Parse and do match against events, message: {
  "Type" : "Notification",
  "MessageId" : "179b21d9-b49d-5d3d-9d22-73dc458228b2",
  "TopicArn" : "arn:aws:sns:us-west-2:239062223385:testjenkins-topic",
  "Subject" : "UPDATE: AWS CodeCommit us-west-2 push: testjenkins2",
  "Message" : "{\"Records\":[{\"awsRegion\":\"us-west-2\",\"codecommit\":{\"references\":[{\"commit\":\"95a0dc394aa840c441d0734fb6f0307e42ebebec\",\"ref\":\"refs/heads/master\"}]},\"eventId\":\"c0646674-cd6a-4095-baea-5888c6a4d829\",\"eventName\":\"ReferenceChanges\",\"eventPartNumber\":1,\"eventSource\":\"aws:codecommit\",\"eventSourceARN\":\"arn:aws:codecommit:us-west-2:239062223385:testjenkins2\",\"eventTime\":\"2017-08-10T05:27:59.217+0000\",\"eventTotalParts\":1,\"eventTriggerConfigId\":\"98c0360d-86ef-495d-a91b-21f6f5294ff7\",\"eventTriggerName\":\"All\",\"eventVersion\":\"1.0\",\"userIdentityARN\":\"arn:aws:iam::239062223385:user/ext-phuong-huynh\"}]}",
  "Timestamp" : "2017-08-10T05:27:59.274Z",
  "SignatureVersion" : "1",
  "Signature" : "DzYsyV6BHaQZei0jJzrCMq4zwAWIjbY3x7qGSSzEm+UiRItMR+fw3nOxkIyvj4zOUyD3HRrydz2SA1DGaOvAoyQKtF3xwEBD/S8QZe/ZcgQ0zkcoNNBOevzRHCPVNCqqcq9XADHys0whrOr7Vl78Pt/hqMd4XxsGP9UFj/GK5TgiQ0BYU6pF21ylsBl7b6k9Sk2k7BKhRVYb33rTY9MGQzZrJmTmrW3ysWUiDvpHz2yvA/l3adATOzboyn+Kxltepn40Yn4HE7ic7/JhaMyhaxIMnuUUhsINbLX6oe5QM6hXL9QlPouIm1mR89DH7i0dDMvm0qMGZlTxnzHFCMSOvw==",
  "SigningCertURL" : "https://sns.us-west-2.amazonaws.com/SimpleNotificationService-b95095beb82e8f6a046b3aafc7f4149a.pem",
  "UnsubscribeURL" : "https://sns.us-west-2.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-west-2:239062223385:testjenkins-topic:cbae7177-c37e-411e-a5e8-ee9a4b871ff8"
}
Aug 10, 2017 12:27:59 PM [log] 
INFO: [c.r.j.p.a.m.i.ScmJobEventTriggerMatcher][thread-0000B1] [job-testjenkins-pipeline] Hurray! Event arn:aws:codecommit:us-west-2:239062223385:testjenkins2 matched SCM git https://git-codecommit.us-west-2.amazonaws.com/v1/repos/testjenkins2
Aug 10, 2017 12:27:59 PM [log] 
INFO: [c.r.j.p.a.m.i.SubscribeBranchEventTriggerMatcher][thread-0000B1] [job-testjenkins-pipeline] Hurray! Event arn:aws:codecommit:us-west-2:239062223385:testjenkins2 matched branch master
Aug 10, 2017 12:27:59 PM [log] 
INFO: [c.r.j.p.a.m.AndEventTriggerMatcher][thread-0000B1] OK! At least one event matched
Aug 10, 2017 12:27:59 PM [log] 
INFO: [c.r.j.p.a.m.EventTriggerMatcherImpl][thread-0000B1] [job-testjenkins-pipeline] Finally, events match status is true
Aug 10, 2017 12:27:59 PM [log] 
INFO: [c.r.j.p.a.SQSTrigger][thread-0000B1] [job-testjenkins-pipeline] Hurray! Execute it
Aug 10, 2017 12:27:59 PM [log] 
INFO: Try to trigger the build for message: 179b21d9-b49d-5d3d-9d22-73dc458228b2
Aug 10, 2017 12:28:00 PM [log] 
INFO: [c.r.j.p.a.n.SQSChannelImpl][thread-0000B1] Delete 1 message(s) (0 failed) from https://sqs.us-west-2.amazonaws.com/239062223385/testjenkinssqs
Aug 10, 2017 12:28:02 PM [log] 
INFO: Any code changes found in SCM? true
Aug 10, 2017 12:28:02 PM [log] 
INFO: Finally! The build is scheduled? true

@ronaldtse
Copy link
Contributor

Some log entires should be shown only once per message, and some per-repo for matching:

Only show once per message in the beginning (not per repo):

Aug 10, 2017 12:27:59 PM [log]
INFO: [c.r.j.p.a.SQSTrigger][thread-0000B1] [job-testjenkins-pipeline] Parse and do match against events, message: {
"Type" : "Notification",
"MessageId" : "179b21d9-b49d-5d3d-9d22-73dc458228b2",
"TopicArn" : "arn:aws:sns:us-west-2:239062223385:testjenkins-topic",
"Subject" : "UPDATE: AWS CodeCommit us-west-2 push: testjenkins2",
"Message" : "{"Records":[{"awsRegion":"us-west-2","codecommit":{"references":[{"commit":"95a0dc394aa840c441d0734fb6f0307e42ebebec","ref":"refs/heads/master"}]},"eventId":"c0646674-cd6a-4095-baea-5888c6a4d829","eventName":"ReferenceChanges","eventPartNumber":1,"eventSource":"aws:codecommit","eventSourceARN":"arn:aws:codecommit:us-west-2:239062223385:testjenkins2","eventTime":"2017-08-10T05:27:59.217+0000","eventTotalParts":1,"eventTriggerConfigId":"98c0360d-86ef-495d-a91b-21f6f5294ff7","eventTriggerName":"All","eventVersion":"1.0","userIdentityARN":"arn:aws:iam::239062223385:user/ext-phuong-huynh"}]}",
"Timestamp" : "2017-08-10T05:27:59.274Z",
"SignatureVersion" : "1",
"Signature" : "DzYsyV6BHaQZei0jJzrCMq4zwAWIjbY3x7qGSSzEm+UiRItMR+fw3nOxkIyvj4zOUyD3HRrydz2SA1DGaOvAoyQKtF3xwEBD/S8QZe/ZcgQ0zkcoNNBOevzRHCPVNCqqcq9XADHys0whrOr7Vl78Pt/hqMd4XxsGP9UFj/GK5TgiQ0BYU6pF21ylsBl7b6k9Sk2k7BKhRVYb33rTY9MGQzZrJmTmrW3ysWUiDvpHz2yvA/l3adATOzboyn+Kxltepn40Yn4HE7ic7/JhaMyhaxIMnuUUhsINbLX6oe5QM6hXL9QlPouIm1mR89DH7i0dDMvm0qMGZlTxnzHFCMSOvw==",
"SigningCertURL" : "https://sns.us-west-2.amazonaws.com/SimpleNotificationService-b95095beb82e8f6a046b3aafc7f4149a.pem",
"UnsubscribeURL" : "https://sns.us-west-2.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-west-2:239062223385:testjenkins-topic:cbae7177-c37e-411e-a5e8-ee9a4b871ff8"
}

Per repo:

Aug 10, 2017 12:27:59 PM [log]
INFO: [c.r.j.p.a.m.i.ScmJobEventTriggerMatcher][thread-0000B1] [job-testjenkins-pipeline] Hurray! Event arn:aws:codecommit:us-west-2:239062223385:testjenkins2 matched SCM git https://git-codecommit.us-west-2.amazonaws.com/v1/repos/testjenkins2

Per repo:

Aug 10, 2017 12:27:59 PM [log]
INFO: [c.r.j.p.a.m.i.SubscribeBranchEventTriggerMatcher][thread-0000B1] [job-testjenkins-pipeline] Hurray! Event arn:aws:codecommit:us-west-2:239062223385:testjenkins2 matched branch master

Per repo:

Aug 10, 2017 12:27:59 PM [log]
INFO: [c.r.j.p.a.m.AndEventTriggerMatcher][thread-0000B1] OK! At least one event matched

Do we need this?

Aug 10, 2017 12:27:59 PM [log]
INFO: [c.r.j.p.a.m.EventTriggerMatcherImpl][thread-0000B1] [job-testjenkins-pipeline] Finally, events match status is true

Once per triggered repo:
Aug 10, 2017 12:27:59 PM [log]
INFO: [c.r.j.p.a.SQSTrigger][thread-0000B1] [job-testjenkins-pipeline] Hurray! Execute it

Once per triggered repo:

Aug 10, 2017 12:27:59 PM [log]
INFO: Try to trigger the build for message: 179b21d9-b49d-5d3d-9d22-73dc458228b2

Once per message:
Aug 10, 2017 12:28:00 PM [log]

INFO: [c.r.j.p.a.n.SQSChannelImpl][thread-0000B1] Delete 1 message(s) (0 failed) from https://sqs.us-west-2.amazonaws.com/239062223385/testjenkinssqs

Per triggered repo:

Aug 10, 2017 12:28:02 PM [log]
INFO: Any code changes found in SCM? true

Per repo to build:

Aug 10, 2017 12:28:02 PM [log]
INFO: Finally! The build is scheduled? true

@ronaldtse
Copy link
Contributor

In case of failure, this message is shown, but should not be shown:

[c.r.j.p.a.SQSTrigger][thread-000093] [job-indigo-app-wiki-44] Parse and do match against events, message: {
"Type" : "Notification",
"MessageId" : "47653dec-7b46-583e-9846-6fe9a5c7d646",
...

@phuonghuynh
Copy link
Contributor Author

phuonghuynh commented Aug 17, 2017

In case of failure, this message is shown, but should not be shown:

@ronaldtse we should show message body for failure case?

@ronaldtse
Copy link
Contributor

As long as we have shown the full SNS message once, it is good enough -- we don't need to show the same message for every single job, right?

@phuonghuynh phuonghuynh assigned phuonghuynh and unassigned ronaldtse Aug 28, 2017
phuonghuynh added a commit to phuonghuynh/aws-codecommit-trigger-plugin that referenced this issue Sep 16, 2017
* Add pipline test framework

* Update timeout to 1.5m

* Add test specs

* Jenkins IT for internal scm config

* External SCM IT

* Remove Trigger test

* Add credentials feature

* Add new feature Aws Credential

* Remove some FB Suppress checks

* Try fix NULL FB for getName function

* Fix up FB warning

* Fix findbug null issue in SQSTriggerQueue

* Add feature to migrate to new version

* Fix findbug issue Nonnull

* Fix findbugs null pointer issue in sqs queue class

* Submit Migration test case

* Fix Jenkins CI test failure due to pipline model definition version

* Use workflow job v2.6

* Try to fix version compettiple

* Try to fix scm-step version 2.3

* Fix workflow job v2.9

* Add workflow scm to test
phuonghuynh added a commit that referenced this issue Dec 11, 2017
* Enable squash in JGitflow

* Update .travis.yml to support integration test

* Move to new namespace

* Add display-url-api to test scope

* Suppress FB issue RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

* Fix test plugins too old

* Enable squash in JGitflow

* Update .travis.yml to support integration test

* Move to new namespace

* Add display-url-api to test scope

* Suppress FB issue RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

* Fix test plugins too old

* Remove redundant code since we use new namespace

* Update pom version

* Update release plugin

* updating poms for 1.7-SNAPSHOT development

* updating poms for 1.8-SNAPSHOT development

* updating poms for branch'release-1.7' with non-snapshot versions

* updating develop poms to master versions to avoid merge conflicts

* Updating develop poms back to pre merge state

* Test subscribe branches without wildcards, multiple projects

* Test for mactching branch names

* Load SCM urls to support user not confused the config

* Keep scm urls transient var

* Update link in htmls

* Update beta version

* Update pom to beta-1

* Supress NP_NULL_ON_SOME_PATH fidbug flag

* Update Readme

* Text update

* Update text & fix findbugs warnings

* updating poms for 1.8-beta-2-SNAPSHOT development

* updating poms for branch'release-1.8-beta-1' with non-snapshot versions

* updating develop poms to master versions to avoid merge conflicts

* Updating develop poms back to pre merge state

* Update build badge to use ci.jenkins.io one & cache travis mvn repo

* Update version to prepare release

* updating poms for 1.8 branch with snapshot versions

* updating poms for 1.9-SNAPSHOT development

* updating poms for branch'release-1.8' with non-snapshot versions

* updating develop poms to master versions to avoid merge conflicts

* Updating develop poms back to pre merge state

* Update match function for repo url

* Update Log info

* Add more logs

* updating poms for 1.10-SNAPSHOT development

* updating poms for branch'release-1.9' with non-snapshot versions

* updating develop poms to master versions to avoid merge conflicts

* Updating develop poms back to pre merge state

* Match original branch

* updating poms for 1.11-SNAPSHOT development

* updating poms for branch'release-1.10' with non-snapshot versions

* updating develop poms to master versions to avoid merge conflicts

* Updating develop poms back to pre merge state

* Better logger support

* Correct description of trigger in project page

* Refine logs in activity action

* Update test IT

* Test for issue #30

* Fix test issue #30 not start Job

* updating poms for 1.12-SNAPSHOT development

* updating poms for branch'release-1.11' with non-snapshot versions

* updating develop poms to master versions to avoid merge conflicts

* Updating develop poms back to pre merge state

* Shorten log & unset jackson version

* Pipeline support implementation

* Update tests

* Refactor activity log

* View activity log in raw format

* Add clear button

* Fix findbug warning

* Fix findbugs NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

* Change file name to activities

* No need to recreate action many times

* Fix message showing var address

* Remove log output file function

* updating poms for 1.13-SNAPSHOT development

* updating poms for branch'release-1.12' with non-snapshot versions

* updating develop poms to master versions to avoid merge conflicts

* Updating develop poms back to pre merge state

* Support manually enter SCM url

* Implement for pipeline new design

* Support multi repo match

* Fix Test Failure Error

* Fix Single test failures

* Log level changes

* Log refactoring

* Add IR test

* Fix multiple fixture tests failure

* updates documentation with region not found error

* updating poms for 1.13 branch with snapshot versions

* updating poms for 1.14-SNAPSHOT development

* updating poms for branch'release-1.13' with non-snapshot versions

* updating develop poms to master versions to avoid merge conflicts

* Updating develop poms back to pre merge state

* Fix multi project fixture test

* Add one checkbox for Subscribe Internal SCM only

* Support new GUI as well as select Region in SQS setting page

* Fix test compile failed

* Fix test SQS function

* Support jenkins 2.7x

* Update test harness version

* Update default jenkins parent pom and downgrade test harness version

* Fix Jenkins build failure test due to script security version

* Fix no sqs scm is found

* Fix Subscribe Branch tests

* Fix test result fail

* Fix issues tests

* Fix findbugs issue

* updating poms for 1.15-SNAPSHOT development

* updating poms for branch'release-1.14' with non-snapshot versions

* updating develop poms to master versions to avoid merge conflicts

* Updating develop poms back to pre merge state

* Update test script

* Migrate to new structure

* Update aws sqs jar

* Remove comments

* Remove redundant dependencies

* Update shade name

* Prepare for release snapshot sub module

* Reconfigure POMs for next release

* update versions for release

* Skip test project

* update for next development version

* Add changelog file

* To invoke Jenkins CI test dependencies version (#35)

* Add pipline test framework

* Update timeout to 1.5m

* Add test specs

* Jenkins IT for internal scm config

* External SCM IT

* Remove Trigger test

* Add credentials feature

* Add new feature Aws Credential

* Remove some FB Suppress checks

* Try fix NULL FB for getName function

* Fix up FB warning

* Fix findbug null issue in SQSTriggerQueue

* Add feature to migrate to new version

* Fix findbug issue Nonnull

* Fix findbugs null pointer issue in sqs queue class

* Submit Migration test case

* Fix Jenkins CI test failure due to pipline model definition version

* Use workflow job v2.6

* Try to fix version compettiple

* Try to fix scm-step version 2.3

* Fix workflow job v2.9

* Add workflow scm to test

* Update changelog

* update versions for release

* update for next development version

* Support non-interactive installation

* update versions for release

* update for next development version

* Fix queue not saved (#38)

* Remove display uri-api & structs plugins

* Add test for multi threads spec

* Fix Queue list not saved

* update versions for release

* update for next development version

* Update change log

* Make the "Access Test" more complete (#39)

* Make the "Access Test" more complete with trying multiple permissions via multiple actions
* Return Credentials not null

* update versions for release

* update for next development version

* Support print out User Invoked
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants