Skip to content

Commit

Permalink
tosquash
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Nov 27, 2024
1 parent ce864ad commit 4822605
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
15 changes: 0 additions & 15 deletions lib/datadog/ci/git/local_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,10 @@ def self.git_commits
end

def self.git_commits_rev_list(included_commits:, excluded_commits:)
p "git_commits_rev_list"
Telemetry.git_command(Ext::Telemetry::Command::GET_OBJECTS)
included_commits = filter_invalid_commits(included_commits).join(" ")
excluded_commits = filter_invalid_commits(excluded_commits).map! { |sha| "^#{sha}" }.join(" ")

p "included: #{included_commits}"
p "excluded: #{excluded_commits}"

res = nil

duration_ms = Core::Utils::Time.measure(:float_millisecond) do
Expand All @@ -216,29 +212,19 @@ def self.git_commits_rev_list(included_commits:, excluded_commits:)
)
end

p "result: #{res}"

Telemetry.git_command_ms(Ext::Telemetry::Command::GET_OBJECTS, duration_ms)

res
rescue => e
p "error!!!!!!!!!!"
p e
log_failure(e, "git commits rev list")
telemetry_track_error(e, Ext::Telemetry::Command::GET_OBJECTS)
nil
end

def self.git_generate_packfiles(included_commits:, excluded_commits:, path:)
p "git_generate_packfiles"
p "path: #{path}"
p "included_commits: #{included_commits}"
p "excluded_commits: #{excluded_commits}"
return nil unless File.exist?(path)

commit_tree = git_commits_rev_list(included_commits: included_commits, excluded_commits: excluded_commits)
p "commit_tree"
p commit_tree
return nil if commit_tree.nil?

basename = SecureRandom.hex(4)
Expand All @@ -255,7 +241,6 @@ def self.git_generate_packfiles(included_commits:, excluded_commits:, path:)

basename
rescue => e
p e
log_failure(e, "git generate packfiles")
telemetry_track_error(e, Ext::Telemetry::Command::PACK_OBJECTS)
nil
Expand Down
8 changes: 0 additions & 8 deletions lib/datadog/ci/git/packfiles.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ def self.generate(included_commits:, excluded_commits:)
path: tmpdir
)

p "PREFIX!!!!!!!!!!!!"
p prefix

if prefix.nil?
# git pack-files command fails if tmpdir is mounted on
# a different device from the current process directory
Expand All @@ -37,11 +34,7 @@ def self.generate(included_commits:, excluded_commits:)
path: current_process_tmp_folder
)

p "PREFIX"
p prefix

if prefix.nil?
p "failed twice, exit"
Datadog.logger.debug("Packfiles generation failed twice, aborting")
break
end
Expand All @@ -51,7 +44,6 @@ def self.generate(included_commits:, excluded_commits:)

packfiles = Dir.entries(tmpdir) - %w[. ..]
if packfiles.empty?
p "empty packfiles"
Datadog.logger.debug("Empty packfiles list, aborting process")
break
end
Expand Down

0 comments on commit 4822605

Please sign in to comment.