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

[27.x backport] move parsing key-value files to a separate package #5503

Open
wants to merge 1 commit into
base: 27.x
Choose a base branch
from

Conversation

austinvazquez
Copy link
Contributor

- What I did

Move the code for parsing key-value files, such as used for env-files and label-files to a separate package. This allows other projects (such as compose) to use the same parsing logic, but provide custom lookup functions for their situation (which is slightly different).

The new package provides utilities for parsing key-value files for either a file or an io.Reader. Most tests for EnvFile were now testing functionality that's already tested in the new package, so were (re)moved.

(cherry picked from commit 9ecfe4f)

- How I did it

git cherry-pick -xsS 9ecfe4f5a7634d9c375ffce1a273c421f2df716c

- How to verify it

- Description for the changelog

move parsing key-value files to a separate package (pkg/kvfile)

- A picture of a cute animal (not mandatory but encouraged)

Move the code for parsing key-value files, such as used for
env-files and label-files to a separate package. This allows
other projects (such as compose) to use the same parsing
logic, but provide custom lookup functions for their situation
(which is slightly different).

The new package provides utilities for parsing key-value files
for either a file or an io.Reader. Most tests for EnvFile were
now testing functionality that's already tested in the new package,
so were (re)moved.

Co-authored-by: Nicolas De Loof <[email protected]>
Signed-off-by: Nicolas De Loof <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit 9ecfe4f)
Signed-off-by: Austin Vazquez <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Oct 4, 2024

Codecov Report

Attention: Patch coverage is 89.47368% with 4 lines in your changes missing coverage. Please review.

Project coverage is 59.77%. Comparing base (19279c9) to head (d075f97).
Report is 11 commits behind head on 27.x.

Additional details and impacted files
@@            Coverage Diff             @@
##             27.x    #5503      +/-   ##
==========================================
- Coverage   59.78%   59.77%   -0.01%     
==========================================
  Files         345      345              
  Lines       23442    23443       +1     
==========================================
- Hits        14015    14014       -1     
- Misses       8453     8454       +1     
- Partials      974      975       +1     

@thaJeztah
Copy link
Member

Can you also cherry-pick the other related changes, so that it's a clean cherry-pick? I probably should've done them together instead of as 3 separate PRs;

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

see above 😅

@thaJeztah thaJeztah added kind/enhancement area/go-sdk Changes affecting the Go SDK impact/go-sdk Noteworthy (compatibility changes) in the Go SDK labels Oct 8, 2024
@thaJeztah thaJeztah added this to the 27.4.0 milestone Oct 8, 2024
@thaJeztah thaJeztah added the kind/refactor PR's that refactor, or clean-up code label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/go-sdk Changes affecting the Go SDK impact/go-sdk Noteworthy (compatibility changes) in the Go SDK kind/enhancement kind/refactor PR's that refactor, or clean-up code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants