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

Gitcloner recurses submodules #2557

Merged
merged 1 commit into from
Jun 27, 2024
Merged

Gitcloner recurses submodules #2557

merged 1 commit into from
Jun 27, 2024

Conversation

manno
Copy link
Member

@manno manno commented Jun 26, 2024

Refers to #2492

Pull request content for Rancher QA verification.

Additional QA

Problem

Since switching to go-git, Fleet would no longer clone submodules.

Solution

According to the go-git documentation this is how to enable submodule cloning.

Testing

Engineering Testing

Manual Testing

Tested with fleet-test-data submodule in https://github.com/manno/fleet-experiments

kind: GitRepo
apiVersion: fleet.cattle.io/v1alpha1
metadata:
  name: crd-experiment
spec:
  repo: https://github.com/manno/fleet-experiments
  branch: main
  paths:
    - fleet-test-data/simple-chart
  targets:
    - clusterSelector: {}
    

Automated Testing

QA Testing Considerations

We would need another repo like rancher/fleet-test-data to include as a submodule.

Regressions Considerations

Too many nested repos are a problem for performance.

@manno manno requested a review from a team as a code owner June 26, 2024 15:27
Copy link
Contributor

@weyfonk weyfonk left a comment

Choose a reason for hiding this comment

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

Do we want tests for this, eg. integration tests? This would help us detect any regression here.

Otherwise LGTM.

@manno manno force-pushed the recurse-submodules branch from 3560500 to f222577 Compare June 26, 2024 16:22
@manno
Copy link
Member Author

manno commented Jun 27, 2024

Do we want tests for this, eg. integration tests? This would help us detect any regression here.

We would need another git repo, so we have one with a submodule. I though about adding fleet-example to fleet-test-data, but that would increase the clone time for all tests 🤷
I guess, I could argue the actual cloning is done by go-git and our unit tests make sure we pass the right parameter to go-git.

@manno manno merged commit 3df9b4a into main Jun 27, 2024
8 checks passed
@manno manno deleted the recurse-submodules branch June 27, 2024 12:07
@weyfonk
Copy link
Contributor

weyfonk commented Jun 28, 2024

the actual cloning is done by go-git and our unit tests make sure we pass the right parameter to go-git.

This is good enough for me 👍

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