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

[Feature]: Support for execution logs files #92

Merged
merged 6 commits into from
Mar 29, 2022

Conversation

nevilm-lt
Copy link
Contributor

@nevilm-lt nevilm-lt commented Mar 27, 2022

Issue Link

#91: Support for execution logs files.

Description

Adds support to create a new log file for each container spawned for build task.

Logs will be generated in /var/log/synapse/<jobID>/<containerName>.log folder inside container which is mounted with current directory (./logs/synapse) in docker-compose file.

Log files will contain nucleus container stdout/stderr logs.

image

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • trigger a build which created a new log file.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@nevilm-lt nevilm-lt changed the title Support for execution logs files WIP: Support for execution logs files Mar 27, 2022
@saurabh-prakash saurabh-prakash marked this pull request as draft March 28, 2022 11:20
@nevilm-lt nevilm-lt changed the title WIP: Support for execution logs files [Feature]: Support for execution logs files Mar 29, 2022
@nevilm-lt nevilm-lt added the enhancement New feature or request label Mar 29, 2022
@nevilm-lt nevilm-lt marked this pull request as ready for review March 29, 2022 06:58
Copy link
Collaborator

@saurabh-prakash saurabh-prakash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. Can you paste a snapshot of how the logs are looking in PR description/comments

@@ -271,3 +278,35 @@ func (d *docker) PullImage(containerImageConfig *core.ContainerImageConfig, r *c
}
return nil
}

func (d *docker) WriteLogs(ctx context.Context, r *core.RunnerOptions) error {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to export this? Otherwise, lowercase it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created internal function.

@saurabh-prakash saurabh-prakash merged commit 72aa6e8 into LambdaTest:dev Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants