Skip to content

Commit

Permalink
remove unnecessary log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
brettfo authored and randhircs committed Dec 6, 2024
1 parent fa7a4d0 commit da69715
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 27 deletions.
1 change: 0 additions & 1 deletion nuget/lib/dependabot/nuget/file_fetcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def fetch_files
credentials: credentials
)

NativeDiscoveryJsonReader.debug_report_discovery_files(error_if_missing: false)
discovery_json_reader.dependency_file_paths.map do |p|
relative_path = Pathname.new(p).relative_path_from(directory).to_path
fetch_file_from_host(relative_path)
Expand Down
1 change: 0 additions & 1 deletion nuget/lib/dependabot/nuget/file_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def parse
sig { returns(T::Array[Dependabot::Dependency]) }
def dependencies
@dependencies ||= T.let(begin
NativeDiscoveryJsonReader.debug_report_discovery_files(error_if_missing: true)
directory = source&.directory || "/"
discovery_json_reader = NativeDiscoveryJsonReader.run_discovery_in_directory(
repo_contents_path: T.must(repo_contents_path),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,6 @@ def self.testonly_clear_discovery_files
FileUtils.rm_rf(discovery_directory)
end

sig { params(error_if_missing: T::Boolean).void }
def self.debug_report_discovery_files(error_if_missing:)
if File.exist?(discovery_map_file_path)
Dependabot.logger.info("Discovery map file (#{discovery_map_file_path}) contents: " \
"#{File.read(discovery_map_file_path)}")
Dependabot.logger.info("Discovery files: #{Dir.glob(File.join(discovery_directory, '*'))}")
elsif error_if_missing
Dependabot.logger.error("discovery map file missing")
end
end

# Runs NuGet dependency discovery in the given directory and returns a new instance of NativeDiscoveryJsonReader.
# The location of the resultant JSON file is saved.
sig do
Expand Down
14 changes: 0 additions & 14 deletions nuget/script/run
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,5 @@ echo "NuGet native updater experiment value: $nuget_experiment_value"
if echo "$nuget_experiment_value" | grep -q 'true'; then
pwsh "$DEPENDABOT_HOME/dependabot-updater/bin/main.ps1" $*
else
operation=$1
dot_dependabot_directory="$DEPENDABOT_HOME/.dependabot"
discovery_map_path="$dot_dependabot_directory/discovery_map.json"

# ensure discovery file exists before running update
if [[ "$operation" == "update_files" && ! -f $discovery_map_path ]]; then
echo "ERROR running update_files without discovery_map.json"
fi

"$DEPENDABOT_HOME/dependabot-updater/bin/run-original" $*

# ensure discovery file exists after running fetch
if [[ "$operation" == "fetch_files" && ! -f $discovery_map_path ]]; then
echo "ERROR ran fetch_files without producing discovery_map.json"
fi
fi

0 comments on commit da69715

Please sign in to comment.