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

archive: Add absolute path mode #141

Merged
merged 7 commits into from
Sep 15, 2022
Merged

archive: Add absolute path mode #141

merged 7 commits into from
Sep 15, 2022

Conversation

hacktron95
Copy link
Contributor

@hacktron95 hacktron95 commented Oct 13, 2020

ALL CREDITS goes to @imranismail
Fixes #130
#106 comment

Description

  • add absolute path mode to tar.gz file by checking for any path prefixed with /

  • add test in tar_test.gz for the absolute path mode.

  • since gzip.go uses tar.gz underneath it, there was no changed made to gzip.go

  • added test in gzip_test.go for the absolute path mode.

  • Read the CONTRIBUTING document.

  • Read the CODE OF CONDUCT document.

  • Add tests to cover changes.

  • Ensure your code follows the code style of this project.

  • Ensure CI and all other PR checks are green OR

    • Code compiles correctly.
    • Created tests which fail without the change (if possible).
    • All new and existing tests passed.
  • Add your changes to Unreleased section of CHANGELOG.

  • Improve and update the README (if necessary).

  • Ensure documentation is up-to-date. The same file will be updated in plugin index when your PR is accepted, so it will be available for end-users at http://plugins.drone.io.

@kakkoyun
Copy link
Contributor

@hacktron95 Thanks for the contribution. We'll have a look at it as soon as we can.

@kakkoyun
Copy link
Contributor

kakkoyun commented Feb 2, 2021

Hey @hacktron95, sorry I think I dropped the ball on this one. I'll try to spare some time for reviewing this.

Copy link
Contributor

@kakkoyun kakkoyun left a comment

Choose a reason for hiding this comment

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

Overall, it looks good to me. Only a few nit comments.

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
archive/gzip/gzip_test.go Outdated Show resolved Hide resolved
archive/gzip/gzip_test.go Outdated Show resolved Hide resolved
@kakkoyun kakkoyun changed the title add absolute path mode archive: Add absolute path mode Feb 2, 2021
kakkoyun and others added 2 commits February 2, 2021 09:14
Co-authored-by: Kemal Akkoyun <kakkoyun@users.noreply.github.com>
@hacktron95
Copy link
Contributor Author

hey @kakkoyun thanks a lot for your review, I'll resolve all the suggested changes during the weekend 👍

@hacktron95 hacktron95 requested a review from kakkoyun February 14, 2021 09:08
@hacktron95
Copy link
Contributor Author

hey @kakkoyun, hope you are doing well!,
may I ask what's the progress on this PR please?
thanks

@kakkoyun
Copy link
Contributor

@hacktron95 Hey, I have missed this. I'll take a look at it. Thanks for your patience!

@silvez-dh
Copy link

silvez-dh commented Jul 28, 2021

hello @kakkoyun. Just want to know if this PR will be still considered to be merged. Facing same issue.

Thanks!

@kakkoyun
Copy link
Contributor

It's still considered. Reviews are welcome. It's been a while since the last time I have touched the project. I'll do my best to merge it, no promises. As I told additional reviews and tests would be helpful.

@umarizulkifli
Copy link

bump this PR

@ste93cry
Copy link
Contributor

I think that use-cases where the paths to cache are outside of the workspace directory are quite common, e.g. when wanting to save the cache of some package managers. I am personally affected by this when trying to save the directory of the Composer cache. Is there any plan to bring this PR home anytime soon?

kakkoyun
kakkoyun previously approved these changes Mar 9, 2022
Copy link
Contributor

@kakkoyun kakkoyun left a comment

Choose a reason for hiding this comment

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

LGTM.

I'll let another set of eyes check it out before we merge it.

cc @jimsheldon

@mattzuba
Copy link

Echoing @ste93cry - this is preventing me from proper caching for a large number of repositories utilizing composer and npm (Node). Any chance of seeing this merged any time soon? For what it's worth, I pulled the author's repo and built it locally for testing with drone exec and it worked great for composer dependencies.

@kakkoyun
Copy link
Contributor

I guess we need help from @meltwater-foundation to proceed with this

@bdebyl bdebyl self-requested a review July 19, 2022 13:59
@bdebyl
Copy link
Contributor

bdebyl commented Jul 19, 2022

@hacktron95 Do you mind pulling the latest master into your working branch and resolving conflicts? After this and passing tests I'm happy to review and merge.

@bdebyl bdebyl added v1.4.0 Issues for v1.4.0 release enhancement New feature or request labels Jul 19, 2022
@mattzuba
Copy link

mattzuba commented Sep 8, 2022

pinging @hacktron95 - can you review @bdebyl's comment from Jul 19?

@bdebyl
Copy link
Contributor

bdebyl commented Sep 13, 2022

@hacktron95 @mattzuba I can resolve the merge conflicts if either of you are unavailable to. That's all that's left to get this merged and ready for the v1.4.0 release

@mattzuba
Copy link

I have forked this and the other repos, rebased the commits and done some testing and I'm happy to submit a new PR if you'd like.

@hacktron95
Copy link
Contributor Author

Hey @mattzuba @bdebyl, Sorry for my late reply
I totally overlooked this thread, I've merged upstream master because my repository was forked from another fork :D so I hope I did it right.

@bdebyl bdebyl merged commit ab88f2d into meltwater:master Sep 15, 2022
@Dan6erbond
Copy link

Dan6erbond commented May 14, 2024

Just came across this thread and really happy to see that the absolute paths are now supported. Are there any examples on how to use it? I'm trying to understand how Drone will handle different Docker images e.g. the plugin and then the Go image that I'm using in my pipeline, as I want to cache $GOPATH/pkg/mod.

Edit: Or is there better ways to do this with vendoring? Would really appreciate some help using this plugin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest-accepted v1.4.0 Issues for v1.4.0 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable absolute path mode
9 participants