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: when load config from cdn directory in dynconfig, skip sub directories #310

Merged
merged 1 commit into from
Jun 10, 2021

Conversation

jim3ma
Copy link
Member

@jim3ma jim3ma commented Jun 10, 2021

Signed-off-by: Jim Ma [email protected]

Description

When there is some directories in cdnDir, ioutil.ReadFile(filepath.Join(d.cdnDirPath, file.Name())) will always fail.

Related Issue

Motivation and Context

Screenshots (if appropriate):

Types of changes

  • 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 change)
  • Documentation Update (if none of the other choices apply)

Checklist:

  • Code compiles correctly.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@jim3ma jim3ma requested a review from a team as a code owner June 10, 2021 02:41
@codecov-commenter
Copy link

codecov-commenter commented Jun 10, 2021

Codecov Report

Merging #310 (e191b5a) into main (dd6daf5) will decrease coverage by 0.74%.
The diff coverage is 18.18%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #310      +/-   ##
==========================================
- Coverage   44.41%   43.66%   -0.75%     
==========================================
  Files          53       53              
  Lines        4195     4205      +10     
==========================================
- Hits         1863     1836      -27     
- Misses       2093     2129      +36     
- Partials      239      240       +1     
Flag Coverage Δ
unittests 43.66% <18.18%> (-0.75%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
internal/dynconfig/dynconfig.go 53.03% <ø> (ø)
scheduler/config/dynconfig.go 47.76% <18.18%> (-6.63%) ⬇️
client/daemon/peer/peertask_stream_callback.go 65.00% <0.00%> (-22.50%) ⬇️
client/daemon/peer/peertask_stream.go 58.11% <0.00%> (-3.02%) ⬇️
client/daemon/peer/peertask_base.go 32.92% <0.00%> (-0.49%) ⬇️

@jim3ma jim3ma changed the title Fix: when load config from cdn directory in dynconfig, skip sub directory Fix: when load config from cdn directory in dynconfig, skip sub directories Jun 10, 2021
@gaius-qi gaius-qi merged commit d2f469e into main Jun 10, 2021
@gaius-qi gaius-qi deleted the fix/dynconfig branch June 10, 2021 03:07
gaius-qi pushed a commit that referenced this pull request Jun 28, 2023
e-ngo pushed a commit to e-ngo/dragonfly that referenced this pull request Jan 23, 2025
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