opencontainers/distribution-spec

Debug mode cannot be turned off for conformance test

shizhMSFT opened this issue · 1 comments

export OCI_DEBUG=0 is not working for the conformance test.

Root cause:

debug, _ := strconv.ParseBool(os.Getenv(envVarDebug))

client, err = reggie.NewClient(hostname,
reggie.WithDefaultName(namespace),
reggie.WithUsernamePassword(username, password),
reggie.WithDebug(true),
reggie.WithUserAgent("distribution-spec-conformance-tests"),
reggie.WithAuthScope(authScope),
reggie.WithInsecureSkipTLSVerify(true))
if err != nil {
panic(err)
}

Line 201 of setup.go always set the debug mode to true without evaluating the debug value from OCI_DEBUG at line 188.

I believe this is intentional. The debug variable is used with:

httpWriter = newHTTPDebugWriter(debug)

and the output is significantly longer when running conformance with debugging, showing each request/response to the user running the conformance test. The reggie debug setting I believe is supposed to be separate and is required for the conformance reports.

CC @jdolitsky