-
Notifications
You must be signed in to change notification settings - Fork 1
[PR] Download Cache Dependencies #104
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the tool to download replay dependencies instead of maps, changing flag names, directory structures, logging messages, and function names accordingly. Key changes include renaming CLI flags and related variables, updating downloader pipelines and shared state to handle dependencies, and revising documentation to reflect these changes.
Reviewed Changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| utils/flag_utils.go | Renamed and updated CLI flag definitions and help strings. |
| main.go | Updated logging and pipeline invocation for dependencies. |
| dataproc/sc2_map_processing/sc2_map_utils.go | Renamed functions and types for dependency extraction. |
| dataproc/downloader/*.go | Updated pipelines, shared state, and download functions. |
| dataproc/dataproc_pipeline_test.go | Updated test flags and pipeline invocation. |
| README.md | Revised CLI instructions and directory references. |
Files not reviewed (2)
- docker/Dockerfile: Language not supported
- docker/Dockerfile.dev: Language not supported
Comments suppressed due to low confidence (2)
dataproc/downloader/downloader.go:270
- The debug log in downloadSingleDependency still references 'downloadSingleMap'. Please update it to 'downloadSingleDependency' for clarity.
log.Debug("Entered downloadSingleMap()")
dataproc/downloader/downloader.go:227
- The log field key 'mapHashAndExtension' is outdated in the dependency context. Consider renaming it to 'dependencyFilename' for clearer logging.
log.WithField("mapHashAndExtension", filenameAndIsMap).Info("Dependency is being downloaded, adding channel to receive the result.")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new mechanism for downloading replay dependencies instead of maps. Key changes include renaming CLI flags and variables (e.g., only_dependency_download, dependency_directory), adjusting directory creation to use /dependencies with subdirectories for maps and other dependencies, and updating function names and log messages in the downloader, processing, and test pipelines to reflect the new dependency download behavior.
Reviewed Changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| utils/flag_utils.go | Updated CLI flag definitions and log messages for dependency download. |
| main.go | Adjusted log fields and pipeline call to use dependency download. |
| dataproc/sc2_map_processing/sc2_map_utils.go | Renamed types and functions for dependency extraction. |
| dataproc/downloader/map_downloader_pipeline.go | Renamed pipeline functions and updated directory creation for dependencies. |
| dataproc/downloader/downloader.go | Adjusted download dispatch and task functions for dependency context. |
| dataproc/downloader/download_all_maps.go | Updated dependency download logic and log messages. |
| dataproc/dataproc_pipeline_test.go | Updated test flags and function calls with dependency download settings. |
| README.md | Revised documentation to reference the dependency directory and CLI changes. |
Files not reviewed (2)
- docker/Dockerfile: Language not supported
- docker/Dockerfile.dev: Language not supported
Comments suppressed due to low confidence (2)
dataproc/sc2_map_processing/sc2_map_utils.go:127
- The log message still refers to 'map' even though the code now handles dependencies. Consider updating it to 'Dependency is already downloaded, continuing.' for clarity.
log.WithField("map", replayHashExtension).Debug("Map is already downloaded, continuing.")
dataproc/downloader/downloader.go:213
- Update the log field key and message to refer to 'dependencyFilename' rather than 'mapHashAndExtension' to reflect the new dependency context.
log.WithField("mapHashAndExtension", filenameAndIsMap.DependencyFilename).Info("Map name was already processed in mapHashAndExtensionToName, returning.")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors functionality to download cache dependencies instead of maps by renaming CLI flags, updating directory structures, and modifying internal processing pipelines accordingly. Key changes include:
- Renaming of flags and directory variables to use “dependency” terminology
- Refactoring of downloader and processing functions to handle dependencies
- Updates to tests and documentation to reflect the new dependency-based logic
Reviewed Changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| utils/flag_utils.go | Updated CLI flags and directory names from maps to dependency |
| main.go | Adjusted logging and function calls to use dependency download flow |
| dataproc/sc2_map_processing/sc2_map_utils.go | Renamed structs and processing functions from map to dependency and revised goroutine invocation |
| dataproc/downloader/map_downloader_pipeline.go | Renamed pipeline function to DependencyDownloaderPipeline and updated directory creation |
| dataproc/downloader/downloader.go | Modified download task state and functions to handle dependencies instead of maps |
| dataproc/downloader/download_all_maps.go | Updated function name and logging to download dependencies |
| dataproc/dataproc_pipeline_test.go | Adjusted test flags and function calls for dependency download |
| README.md | Revised documentation to reflect dependency download paths and instructions |
Files not reviewed (2)
- docker/Dockerfile: Language not supported
- docker/Dockerfile.dev: Language not supported
Comments suppressed due to low confidence (2)
dataproc/downloader/downloader.go:277
- The error message still refers to 'map' instead of 'dependency'; update the string to 'error downloading in http.Get dependency: %v' for consistency.
fmt.Errorf("error downloading in http.Get map: %v", err)
main.go:88
- [nitpick] The variable 'foreignToEnglishMapping' is now used to store dependency mappings; consider renaming it to 'dependencyMapping' for clarity.
"foreignToEnglishMapping": foreignToEnglishMapping,
Description
Introduces a way to download other cacheHandles, this means that all of the replay dependencies are downloaded. Renamed the CLI argument, and adjusted directory creation to have a
/dependenciesand/dependencies/mapsand/dependencies/other_dependenciesRelated Issues
#103
How Has This Been Tested?
Verified manually.