Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.

file_input should not attempt to track lost files on windows #366

Merged
merged 2 commits into from
Feb 10, 2022

Conversation

djaglowski
Copy link
Member

@djaglowski djaglowski commented Feb 8, 2022

@codecov
Copy link

codecov bot commented Feb 8, 2022

Codecov Report

Merging #366 (71dd996) into main (3f71d1b) will increase coverage by 0.1%.
The diff coverage is 100.0%.

❗ Current head 71dd996 differs from pull request most recent head 7b58587. Consider uploading reports for the commit 7b58587 to get more accurate results

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #366     +/-   ##
=======================================
+ Coverage   77.1%   77.2%   +0.1%     
=======================================
  Files         94      95      +1     
  Lines       4471    4476      +5     
=======================================
+ Hits        3449    3459     +10     
+ Misses       702     698      -4     
+ Partials     320     319      -1     
Impacted Files Coverage Δ
operator/builtin/input/file/config.go 77.0% <ø> (ø)
operator/builtin/input/file/file.go 70.2% <100.0%> (-2.1%) ⬇️
operator/builtin/input/file/roller_other.go 100.0% <100.0%> (ø)
operator/builtin/input/tcp/tcp.go 79.6% <0.0%> (+1.6%) ⬆️
...perator/builtin/transformer/recombine/recombine.go 76.3% <0.0%> (+2.0%) ⬆️

@djaglowski djaglowski marked this pull request as ready for review February 9, 2022 15:51
@djaglowski djaglowski requested review from a team and jsirianni February 9, 2022 15:51
@djaglowski djaglowski changed the title WIP - filelog receiver should not attempt to track lost files on windows file_input should not attempt to track lost files on windows Feb 9, 2022
@jsirianni
Copy link
Member

I have a windows environment set up, will try and test before end of week.

Copy link
Member

@jsirianni jsirianni left a comment

Choose a reason for hiding this comment

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

Looks good to me. I tested with the following steps

  1. build v0.44.0 contrib and deploy to windows system
  2. try to delete input log file (this fails)
  3. build v0.44.0 contrib with this branch using replace in all modules importing the log collection repo. deploy to windows system.
  4. Wait for logs to be read, delete log file during polling interval. The file deletes successfully.

After deleting, I re-added the log file with new log lines. The collector picks up the new lines without issue.

@djaglowski djaglowski merged commit 89d49a3 into open-telemetry:main Feb 10, 2022
@djaglowski djaglowski deleted the win-filelog-handles branch February 10, 2022 20:12
jsirianni pushed a commit to jsirianni/opentelemetry-log-collection that referenced this pull request Mar 28, 2022
…lemetry#366)

* WIP - filelog receiver should not attempt to track lost files on windows

* Pull os-specific file handle management into separate struct
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants