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

Implement Git repo unshallowing #5434

Merged
merged 8 commits into from
Jun 27, 2023

Conversation

nikita-tkachenko-datadog
Copy link
Contributor

@nikita-tkachenko-datadog nikita-tkachenko-datadog commented Jun 20, 2023

What Does This Do

Implements logic for "unshallowing" a shallow Git repository.
The code checks whether current repo is a shallow one and if so, attempts to refetch the commits data from the server for the past month.

Motivation

CI Visibility's Intelligent Test Runner requires Git data in order to work: the tracer has to upload Git pack files to a backend endpoint.
Many CI providers clone their repositories with a shallow clone, which means there is no commit history. In those cases, sending a packfile to the backend would not be the correct choice since we would generate a packfile with a single commit instead of the necessary payload, therefore polluting the state of the backend.

@nikita-tkachenko-datadog nikita-tkachenko-datadog added the comp: ci visibility Continuous Integration Visibility label Jun 20, 2023
@nikita-tkachenko-datadog nikita-tkachenko-datadog changed the base branch from master to nikita-tkachenko/git-data-upload-components June 20, 2023 17:14
@pr-commenter
Copy link

pr-commenter bot commented Jun 20, 2023

Benchmarks

Parameters

Baseline Candidate
commit 1.17.0-SNAPSHOT~e38d56c3e6 1.17.0-SNAPSHOT~73ee3cfeeb
config baseline candidate
See matching parameters
Baseline Candidate
module Agent Agent
parent None None

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 22 cases.

@nikita-tkachenko-datadog nikita-tkachenko-datadog force-pushed the nikita-tkachenko/git-unshallowing branch 2 times, most recently from 7e873e4 to 93b235c Compare June 20, 2023 18:27
@nikita-tkachenko-datadog nikita-tkachenko-datadog force-pushed the nikita-tkachenko/git-data-upload-components branch from 91f3447 to d9816d4 Compare June 20, 2023 18:39
@nikita-tkachenko-datadog nikita-tkachenko-datadog force-pushed the nikita-tkachenko/git-data-upload-components branch from d9816d4 to c3b7b3a Compare June 22, 2023 15:19
@nikita-tkachenko-datadog nikita-tkachenko-datadog changed the title WIP: Implement Git repo unshallowing Implement Git repo unshallowing Jun 22, 2023
@nikita-tkachenko-datadog nikita-tkachenko-datadog marked this pull request as ready for review June 23, 2023 08:55
Copy link
Contributor

@bantonsson bantonsson left a comment

Choose a reason for hiding this comment

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

Javadoc would be nice...

@nikita-tkachenko-datadog
Copy link
Contributor Author

Javadoc would be nice...

Added Javadoc

Base automatically changed from nikita-tkachenko/git-data-upload-components to master June 27, 2023 10:10
@nikita-tkachenko-datadog nikita-tkachenko-datadog merged commit 2bade29 into master Jun 27, 2023
@nikita-tkachenko-datadog nikita-tkachenko-datadog deleted the nikita-tkachenko/git-unshallowing branch June 27, 2023 19:26
@github-actions github-actions bot added this to the 1.17.0 milestone Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: ci visibility Continuous Integration Visibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants