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

do not ignore error when walk dir in pkger #230

Merged
merged 1 commit into from
May 31, 2022
Merged

Conversation

alovak
Copy link
Contributor

@alovak alovak commented May 27, 2022

What:

  • handle (do not ignore) error from the function that adds migration files into pkger

Why:

Currently, we ignore the error when pkger walks the migration directory and the migration file name does not match the expected format. When such happens it stops adding the rest of the files. In our case with manual migrations, we named the file in a way so golang-migrate will ignore it: we just removed .up part. But, we didn't know that we have one more layer of file format checking :(

P.S. we should not check file name format here and delegate it to golang-migrate

@codecov-commenter
Copy link

codecov-commenter commented May 27, 2022

Codecov Report

Merging #230 (ae76db3) into master (19fece7) will decrease coverage by 0.16%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##           master     #230      +/-   ##
==========================================
- Coverage   77.84%   77.68%   -0.17%     
==========================================
  Files          29       29              
  Lines         930      932       +2     
==========================================
  Hits          724      724              
- Misses        161      162       +1     
- Partials       45       46       +1     
Impacted Files Coverage Δ
database/pkger.go 55.10% <33.33%> (-2.35%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 19fece7...ae76db3. Read the comment docs.

@alovak alovak merged commit 08d3991 into master May 31, 2022
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.

5 participants