Skip to content

Feat: Automatically create parent directories of portPropertyFile path - #1761

Merged
rohanKanojia merged 1 commit into
fabric8io:masterfrom
Willena:feat/port-file-mapping-parrent-folder-create
Mar 9, 2024
Merged

rohanKanojia merged 1 commit into
fabric8io:masterfrom
Willena:feat/port-file-mapping-parrent-folder-create

Conversation

@Willena

@Willena Willena commented Feb 27, 2024

Copy link
Copy Markdown
Contributor

This adds a new option enabling automatic folder creation for the path specified in portPropertyFile.

@codecov

codecov Bot commented Mar 2, 2024 •

Copy link
Copy Markdown

Codecov Report

Merging #1761 (4db1e84) into master (110a8f8) will increase coverage by 0.01%.
Report is 1 commits behind head on master.
The diff coverage is 100.00%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1761      +/-   ##
============================================
+ Coverage     65.75%   65.76%   +0.01%     
  Complexity     2295     2295              
============================================
  Files           172      172              
  Lines         10181    10184       +3     
  Branches       1405     1406       +1     
============================================
+ Hits           6695     6698       +3     
  Misses         2934     2934              
  Partials        552      552              
Files Coverage Δ
...va/io/fabric8/maven/docker/access/PortMapping.java 90.53% <100.00%> (+0.17%) ⬆️

@rohanKanojia

Copy link
Copy Markdown
Member

@Willena : Hello, do you think it's a good idea to always create parent directories by default?

@Willena

Willena commented Mar 2, 2024

Copy link
Copy Markdown
Contributor Author

My initials thought were to add a new parameter set to "false" by default to avoid changing the current behaviour (do not create paths). This should be (unless I forgot something) the current behaviour in the PR.

That beeing said I would personnaly prefer that the plugin always try to create parent paths (and thus I can remove the option and simplifies the code).

@rohanKanojia

Copy link
Copy Markdown
Member

@Willena : It's good to be defensive. Your changes look good to me.

However, I get the feeling that exposing a new configuration parameter just to ensure whether parent directory of portPropertyFile exists is a bit overkill.

@Willena Willena changed the title Feat: Add configuration allowing portPropertyFile directories to be created Feat: Automatically create parent directories of portPropertyFile path Mar 2, 2024
@Willena

Willena commented Mar 2, 2024 •

Copy link
Copy Markdown
Contributor Author

However, I get the feeling that exposing a new configuration parameter just to ensure whether parent directory of portPropertyFile exists is a bit overkill.

I fully agree with you. I've updated the PR to remove the option. Parent directories are now always created.

@rohanKanojia

Copy link
Copy Markdown
Member

@Willena : Thanks! Could you please add a line to doc/changelog.md regarding this change?

@Willena

Willena commented Mar 6, 2024

Copy link
Copy Markdown
Contributor Author

Done !

Signed-off-by: Guillaume Villena <guillaume@villena.me>
@sonarqubecloud

sonarqubecloud Bot commented Mar 7, 2024

Copy link
Copy Markdown

@rohanKanojia
rohanKanojia merged commit b97009a into fabric8io:master Mar 9, 2024
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.

2 participants