Skip to content

Log line "Build finished" is not correct #8762

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

Closed
humitos opened this issue Dec 14, 2021 · 0 comments · Fixed by #8815
Closed

Log line "Build finished" is not correct #8762

humitos opened this issue Dec 14, 2021 · 0 comments · Fixed by #8815
Assignees
Labels
Accepted Accepted issue on our roadmap Bug A bug

Comments

@humitos
Copy link
Member

humitos commented Dec 14, 2021

In

log.info(
'Build finished',
# TODO: move all of these attributes to ``log.bind`` if possible
project_slug=self.project.slug if self.project else '',
version_slug=self.version.slug if self.version else '',
# TODO: add organization_slug here
success=self.build.get('success') if self.build else '',
length=self.build.get('length') if self.build else '',
)

we are logging Build finished (inside __exit__), but that line is called up to 3 times per build because we are using the DockerBuildEnvironment (which inherit from BuildEnvironment) 3 times with a context manager:

  1. when syncing the repository:
    env_cls = DockerBuildEnvironment
  2. when running the setup:
    env_cls = DockerBuildEnvironment
  3. when running the build:
    env_cls = DockerBuildEnvironment

Note that we are using this log line in the New Relic dashboard and it's currently showing not accurate data.

Related to #3984

@humitos humitos added Bug A bug Accepted Accepted issue on our roadmap labels Dec 14, 2021
@humitos humitos self-assigned this Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Bug A bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant