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: Ensure elt/run log file is closed #8043

Merged
merged 1 commit into from
Aug 19, 2023
Merged

Conversation

edgarrmondragon
Copy link
Collaborator

@edgarrmondragon edgarrmondragon commented Aug 18, 2023

Fixes this warning:

ResourceWarning: Enable tracemalloc to get the object allocation traceback
/meltano/meltano-cloud/src/meltano/core/logging/output_logger.py:217: ResourceWarning: unclosed file <_io.TextIOWrapper name='/project/.meltano/logs/elt/prodtap-getpocket-to-target-jsonl/12701452-91c4-4b2b-928c-943cc1e271fa/elt.log' mode='a' encoding='UTF-8'>
  logger.removeHandler(self.redirect_log_handler)

https://docs.python.org/3/library/logging.handlers.html#logging.FileHandler

@netlify
Copy link

netlify bot commented Aug 18, 2023

Deploy Preview for meltano canceled.

Name Link
🔨 Latest commit 5693ffe
🔍 Latest deploy log https://app.netlify.com/sites/meltano/deploys/64dfb3b91ee521000845419d

@edgarrmondragon edgarrmondragon changed the title fix: Ensure elt/run log file is closed after read fix: Ensure elt/run log file is closed Aug 18, 2023
@codecov
Copy link

codecov bot commented Aug 18, 2023

Codecov Report

Merging #8043 (5693ffe) into main (5232005) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #8043   +/-   ##
=======================================
  Coverage   89.54%   89.54%           
=======================================
  Files         297      297           
  Lines       21924    21924           
  Branches     2446     2446           
=======================================
  Hits        19632    19632           
  Misses       1936     1936           
  Partials      356      356           
Files Changed Coverage Δ
src/meltano/core/logging/output_logger.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@edgarrmondragon edgarrmondragon marked this pull request as ready for review August 18, 2023 18:49
@edgarrmondragon edgarrmondragon enabled auto-merge (squash) August 18, 2023 18:49
@edgarrmondragon edgarrmondragon merged commit fa9cccb into main Aug 19, 2023
43 checks passed
@edgarrmondragon edgarrmondragon deleted the fix/close-log-file branch August 19, 2023 00:35
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.

None yet

2 participants