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

Copy .git in deploysource provider #5442

Merged
merged 1 commit into from
Dec 24, 2024
Merged

Conversation

Warashi
Copy link
Contributor

@Warashi Warashi commented Dec 23, 2024

What this PR does:

This PR partially reverts #5412.

Why we need it:

In #5412, I implemented that the piped does not copy .git in the deploysource provider's copy method.
This made a breaking change on the SCRIPT_RUN stage.
Before #5412, we can use the git command to retrieve manifest repository information.
After #5412, we cannot do that because there is not .git.
In #5412, I implemented the git client to use git worktree to clone from the locally cached git repository, so it's a small cost to copy the .git because it's a small text file.

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

  • How are users affected by this change:
  • Is this breaking change:
  • How to migrate (if breaking change):

Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
@Warashi
Copy link
Contributor Author

Warashi commented Dec 23, 2024

With this PR, we can use git command in the SCRIPT_RUN stage.
image

@Warashi Warashi marked this pull request as ready for review December 23, 2024 06:44
Copy link

codecov bot commented Dec 23, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 26.26%. Comparing base (bcdba1f) to head (f82406a).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
pkg/app/piped/deploysource/deploysource.go 0.00% 1 Missing ⚠️
pkg/app/pipedv1/deploysource/deploysource.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5442   +/-   ##
=======================================
  Coverage   26.25%   26.26%           
=======================================
  Files         452      452           
  Lines       48860    48842   -18     
=======================================
  Hits        12827    12827           
+ Misses      35008    34990   -18     
  Partials     1025     1025           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ffjlabo
Copy link
Member

ffjlabo commented Dec 23, 2024

@Warashi
[Ask] Is it possible to get the right output for git log inside the dir in which .git file is placed ?
It means that can we do git log inside project_root_dir/hoge?

.git
project_root_dir/hoge

The script run stage executes commands on the app dir, which is not necessarily the project root.

@Warashi
Copy link
Contributor Author

Warashi commented Dec 23, 2024

@ffjlabo
Yes. Do you consider we can use git without changing the directory like cd .. in the SCRIPT_RUN stage? We can do this. Here is the screenshot.
image

@ffjlabo
Copy link
Member

ffjlabo commented Dec 23, 2024

@Warashi
Thanks, that's what I want to confirm.

Copy link
Member

@ffjlabo ffjlabo left a comment

Choose a reason for hiding this comment

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

👍

@Warashi Warashi enabled auto-merge (squash) December 23, 2024 07:21
@Warashi Warashi merged commit 9b9fd28 into master Dec 24, 2024
17 of 18 checks passed
@Warashi Warashi deleted the make-source-cloner-copying-git branch December 24, 2024 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants