facebookarchive / contest

Run continuous and on-demand system testing for real and virtual hardware
MIT License
32 stars 15 forks source link

log(jobmanager): Log ServerID #276

Closed xaionaro closed 3 years ago

xaionaro commented 3 years ago

Just adding serverID to the logs.

Test plan

xaionaro@void:~/go/src/github.com/facebookincubator/contest$ go run ./cmds/contest
[2021-04-30T15:33:51.945+01:00 I server.go:96] Using database URI for primary storage: contest:contest@tcp(localhost:3306)/contest?parseTime=true
[2021-04-30T15:33:52.097+01:00 I server.go:110] Storage version: 0
[2021-04-30T15:33:52.097+01:00 I server.go:116] Using database URI for replica storage: contest:contest@tcp(localhost:3306)/contest?parseTime=true
[2021-04-30T15:33:52.115+01:00 I server.go:130] Storage version: 0
[2021-04-30T15:33:52.116+01:00 I pluginregistry.go:63] Registering target manager csvfiletargetmanager
[2021-04-30T15:33:52.116+01:00 I pluginregistry.go:63] Registering target manager targetlist
[2021-04-30T15:33:52.116+01:00 I pluginregistry.go:76] Registering test fetcher uri
[2021-04-30T15:33:52.116+01:00 I pluginregistry.go:76] Registering test fetcher literal
[2021-04-30T15:33:52.116+01:00 I pluginregistry.go:89] Registering test step echo
[2021-04-30T15:33:52.116+01:00 I pluginregistry.go:89] Registering test step example
[2021-04-30T15:33:52.116+01:00 I pluginregistry.go:89] Registering test step cmd
[2021-04-30T15:33:52.116+01:00 I pluginregistry.go:89] Registering test step sshcmd
[2021-04-30T15:33:52.116+01:00 I pluginregistry.go:89] Registering test step randecho
[2021-04-30T15:33:52.116+01:00 I pluginregistry.go:113] Registering reporter targetsuccess
[2021-04-30T15:33:52.116+01:00 I pluginregistry.go:113] Registering reporter noop
[2021-04-30T15:33:52.116+01:00 D httplistener.go:252] Serving a listener    serverID=void
[2021-04-30T15:33:52.116+01:00 I httplistener.go:229] Started HTTP API listener on :8080    serverID=void
[2021-04-30T15:34:34.429+01:00 D jobmanager.go:170] Handling event &{Context:0xc00024d810 Type:event_type_start ServerID:void Err:<nil> Msg:{requestor:contestcli-http TestID: NumRuns:0 JobDescriptor:{
    "JobName": "test job",
    "Reporting": {
        "FinalReporters": [
            {
                "Name": "noop"
            }
        ],
        "RunReporters": [
            {
                "Name": "TargetSuccess",
                "Parameters": {
                    "SuccessExpression": "\u003e80%"
                }
            },
            {
                "Name": "Noop"
            }
        ]
    },
    "RunInterval": "3s",
    "Runs": 3,
    "Tags": [
        "test",
        "csv"
    ],
    "TestDescriptors": [
        {
            "TargetManagerAcquireParameters": {
                "Targets": [
                    {
                        "FQDN": "example.org",
                        "ID": "1234"
                    }
                ]
            },
            "TargetManagerName": "TargetList",
            "TargetManagerReleaseParameters": {},
            "TestFetcherFetchParameters": {
                "Steps": [
                    {
                        "label": "some label",
                        "name": "cmd",
                        "parameters": {
                            "args": [
                                "Title={{ Title .FQDN }}, ToUpper={{ ToUpper .FQDN }}"
                            ],
                            "executable": [
                                "echo"
                            ]
                        }
                    }
                ],
                "TestName": "Literal test"
            },
            "TestFetcherName": "literal"
        }
    ]
}} RespCh:0xc000204720} serverID=void
[2021-04-30T15:34:34.433+01:00 D jobmanager.go:123] Sending response &{Requestor:contestcli-http JobID:0 Err:could not create job request: could not store job request in database: Error 1146: Table 'contest.jobs' doesn't exist Status:<nil> JobIDs:[]}  api_method=start    ttp_job_id= http_requestor=contestcli-http  http_verb=start serverID=void
codecov[bot] commented 3 years ago

Codecov Report

Merging #276 (0e0d205) into master (9b21034) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #276   +/-   ##
=======================================
  Coverage   66.88%   66.89%           
=======================================
  Files         135      135           
  Lines        6411     6412    +1     
=======================================
+ Hits         4288     4289    +1     
  Misses       1631     1631           
  Partials      492      492           
Flag Coverage Δ
e2e 43.66% <100.00%> (+0.01%) :arrow_up:
integration 57.59% <100.00%> (-0.17%) :arrow_down:
unittests 49.22% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/jobmanager/jobmanager.go 78.35% <100.00%> (+0.16%) :arrow_up:
pkg/runner/test_runner.go 92.25% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9b21034...0e0d205. Read the comment docs.