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

Fix resource processor porter install logs truncation #4048

Merged
merged 8 commits into from
Nov 6, 2024

Conversation

marrobi
Copy link
Member

@marrobi marrobi commented Aug 1, 2024

Related to #3992

Modify the shell_output_logger function in resource_processor/shared/logging.py to split lengthy log outputs into smaller chunks before logging.

  • Chunk Log Output:

    • Add chunk_log_output helper function to split the log output into smaller chunks.
    • Update shell_output_logger to use chunk_log_output for logging lengthy outputs in chunks.
  • Tests:

    • Add test_shell_output_logger_chunked_logging to verify chunked logging functionality.
    • Add test_chunk_log_output to test the chunk_log_output helper function.

For more details, open the Copilot Workspace session.

Related to #3992

Modify the `shell_output_logger` function in `resource_processor/shared/logging.py` to split lengthy log outputs into smaller chunks before logging.

* **Chunk Log Output**:
  - Add `chunk_log_output` helper function to split the log output into smaller chunks.
  - Update `shell_output_logger` to use `chunk_log_output` for logging lengthy outputs in chunks.

* **Tests**:
  - Add `test_shell_output_logger_chunked_logging` to verify chunked logging functionality.
  - Add `test_chunk_log_output` to test the `chunk_log_output` helper function.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/microsoft/AzureTRE/issues/3992?shareId=XXXX-XXXX-XXXX-XXXX).
@marrobi
Copy link
Member Author

marrobi commented Aug 1, 2024

@jonnyry another AI assisted fix, fancy testing?

Copy link

github-actions bot commented Aug 1, 2024

Unit Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit 9dd6b9d.

♻️ This comment has been updated with latest results.

* Change version from "0.9.0" to "0.9.1"

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/microsoft/AzureTRE/issues/3992?shareId=XXXX-XXXX-XXXX-XXXX).
@marrobi
Copy link
Member Author

marrobi commented Aug 1, 2024

Update version number in resource_processor/_version.py

  • Change version from "0.9.0" to "0.9.1"

For more details, open the Copilot Workspace session.

@jonnyry
Copy link
Contributor

jonnyry commented Aug 1, 2024

@jonnyry another AI assisted fix, fancy testing?

Sure will do thanks.

@jonnyry
Copy link
Contributor

jonnyry commented Sep 12, 2024

@marrobi Looking good... :-)

Can I suggest prefixing chunked log entries with [Log chunk X of Y] or similar for readability?

image

@marrobi marrobi marked this pull request as ready for review October 10, 2024 16:27
@marrobi
Copy link
Member Author

marrobi commented Oct 10, 2024

/test

@marrobi marrobi enabled auto-merge (squash) October 10, 2024 16:27
Copy link

🤖 pr-bot 🤖

🏃 Running tests: https://github.com/microsoft/AzureTRE/actions/runs/11278144139 (with refid a69368e4)

(in response to this comment from @marrobi)

@marrobi
Copy link
Member Author

marrobi commented Oct 10, 2024

@jonnyry this better?

@jonnyry
Copy link
Contributor

jonnyry commented Oct 30, 2024

@jonnyry this better?

Yes great thanks :-)

image

Copy link
Collaborator

@tim-allen-ck tim-allen-ck left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@Danny-Cooke-CK Danny-Cooke-CK left a comment

Choose a reason for hiding this comment

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

approved

@marrobi
Copy link
Member Author

marrobi commented Nov 6, 2024

/test-force-approve

Passed here - https://github.com/microsoft/AzureTRE/actions/runs/11278144139

Copy link

github-actions bot commented Nov 6, 2024

🤖 pr-bot 🤖

✅ Marking tests as complete (for commit 9dd6b9d)

(in response to this comment from @marrobi)

@marrobi marrobi merged commit 9140431 into main Nov 6, 2024
11 checks passed
@marrobi marrobi deleted the marrobi/issue3992 branch November 6, 2024 13:28
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.

4 participants