-
Notifications
You must be signed in to change notification settings - Fork 35
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
Store integreat-cms.log as an artifact after test run in CI #2672
Conversation
Code Climate has analyzed commit d540ee3 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 81.5% (-0.2% change). View more on Code Climate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM. I was a bit surprised that the circleci checks for this pr did not generate the artifact (Or I did not find it). Is that to be expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 👍
think it would also be useful to set the logging level to DEBUG, but I couldn't find how to do that :(
I thought this was supposed to be managed by#: Use debug logging on CircleCI LOG_LEVEL = "DEBUG"
in circleci_settings.py, but no.
The actual log level in CI is currently INFO.
log example
Maybe someone has some ideas on how to change this?
@seluianova Ah, I got it: The LOG_LEVEL
setting is just an intermediary variable and not used by Django. The real logging setting is here:
integreat-cms/integreat_cms/core/settings.py
Line 580 in 781f29a
LOGGING: Final[dict[str, Any]] = { |
So what happens is this:
from .settings import *
sets theLOGGING
setting based on the default value ofLOG_LEVEL
(which isINFO
in this case)LOG_LEVEL = "DEBUG"
does not change theLOGGING
setting anymore and thus has no effect
I was a bit surprised that the circleci checks for this pr did not generate the artifact (Or I did not find it). Is that to be expected?
@david-venhoff I think that's expected since the tests did not fail and the artifact is only stored when the tests fail.
I mean we could also think about storing the log in any case, since a few lines of text are only a few kb, so storing it will not cost a lot of credits.
8711925
to
d3f7900
Compare
@timobrembeck thank you! |
d3f7900
to
d540ee3
Compare
Short description
Sometimes we encounter test failures in CI that are not reproduced locally.
We can see some pieces of the log in the test output, but sometimes it's not enough to localize the problem.
To make the analysis a bit easier, I suggest attaching full integreat-cms.log as a job artifact.
It will only be available when there are test failures:
Proposed changes
Side effects
No?
I think it would also be useful to set the logging level to DEBUG, but I couldn't find how to do that :(
I thought this was supposed to be managed by
in circleci_settings.py, but no.
The actual log level in CI is currently INFO.
log example
Maybe someone has some ideas on how to change this?
Resolved issues
Fixes: #2256
Pull Request Review Guidelines