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

Fixing bug where script output would appear twice in task logs #1059

Merged
merged 2 commits into from
Jan 23, 2025

Conversation

sburmanoctopus
Copy link
Contributor

@sburmanoctopus sburmanoctopus commented Jan 23, 2025

Background

While testing out the new event driven tentacle client in Octopus Server, we found that E2E tests were failing because log output was coming through twice.

Results

Before

When the event driven tentacle client work was done, it maintained a quirk with script service V1. The quirk was that calling "Complete Script" could return output. This output had to be written to the Octopus Server task log, but only script service V1 was doing this.

During the refactor, we ended up maintaining the output logging after "Complete Script", but it was put in a common place which will get run for all service types, not just V1.

After

Where we call OnScriptStatusResponseReceived after we "Complete Script" is the correct location. However, if we do not receive any output (e.g. if we are the V2 or K8s script service), then we simply do not output the results.

We enhanced a test to prove the flaw, and then fixed the test by solving the issue.

How to review this PR

Quality ✔️

Pre-requisites

  • I have read How we use GitHub Issues for help deciding when and where it's appropriate to make an issue.
  • I have considered informing or consulting the right people, according to the ownership map.
  • I have considered appropriate testing for my change.

@sburmanoctopus sburmanoctopus marked this pull request as ready for review January 23, 2025 04:30
@sburmanoctopus sburmanoctopus requested a review from a team as a code owner January 23, 2025 04:30
@sburmanoctopus sburmanoctopus merged commit 1b68570 into main Jan 23, 2025
51 of 52 checks passed
@sburmanoctopus sburmanoctopus deleted the sast/fix-output-double-up branch January 23, 2025 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants