Skip to content

Conversation

@lhoupert
Copy link
Contributor

@lhoupert lhoupert commented Dec 10, 2025

Updates the storage tier change script and its documentation to use OVH Cloud storage class naming conventions instead of AWS, clarifies storage class mapping, and improves performance and reporting.

Key changes:

Storage class naming and validation:

  • The script now uses OVH Cloud storage class names (STANDARD, STANDARD_IA, EXPRESS_ONEZONE) for validation, replacing AWS-specific names like GLACIER.

Performance improvements:

  • The script optimizes S3 API usage by retrieving storage class information during the initial object listing, avoiding extra API calls for objects already at the target storage class, and providing detailed progress and summary output. Documentation now highlights these performance improvements with example timings and expected results. [1] [2]

Code changes for object listing and filtering:

  • The list_objects function now returns both object keys and their storage classes, enabling smarter filtering and reporting.
  • The filter_paths function is updated to operate on (key, storage_class) tuples, allowing filtering logic to consider storage class and improving accuracy in reporting which objects are included or excluded. [1] [2]

Documentation updates and clarifications:

  • The documentation (README_storage_tier.mdREADME_change_storage_tier.md) is updated throughout to use OVH storage class names (e.g., STANDARD_IA instead of GLACIER), corrects example STAC URLs, and clearly explains the mapping between AWS and OVH storage classes. It now includes a dedicated section detailing the mapping and supported classes, and all usage examples have been updated accordingly. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Contributes to implementation of the 2nd phase 2. Storage Tier Transitions of https://github.com/EOPF-Explorer/coordination/issues/182, as discussed in ADR https://github.com/EOPF-Explorer/coordination/pull/179

@lhoupert lhoupert marked this pull request as ready for review December 10, 2025 22:33
Copy link

Copilot AI left a 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 storage tier change script to use OVH Cloud storage class naming conventions (STANDARD_IA) instead of AWS-specific names (GLACIER), implements performance optimizations by retrieving storage class information during initial object listing to avoid extra API calls, and updates all documentation and tests accordingly.

Key changes:

  • Replaces AWS storage class GLACIER with OVH-compatible STANDARD_IA throughout the codebase
  • Optimizes S3 API usage by including storage class in list_objects response, eliminating unnecessary head_object calls
  • Enhances reporting with storage class distribution before/after changes and progress tracking

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
tests/unit/test_change_storage_tier.py Updates all test cases to use STANDARD_IA instead of GLACIER, modifies tests to work with tuple-based object representation (key, storage_class), and adjusts mock responses to include storage class information
scripts/change_storage_tier.py Changes valid storage classes constant to use STANDARD_IA, refactors list_objects to return tuples with storage class, updates filter_paths to work with tuples, modifies change_object_storage_class to accept current storage class parameter, and adds detailed progress reporting
scripts/README_change_storage_tier.md Updates all examples to use STANDARD_IA instead of GLACIER, corrects STAC URLs to use staging collection, adds comprehensive storage class mapping table, documents performance optimizations, and provides detailed example outputs
Comments suppressed due to low confidence (2)

scripts/README_change_storage_tier.md:279

  • The example output shows inconsistent information. At line 279, it states "Target storage class: STANDARD" but the command on line 272 specifies "--storage-class STANDARD_IA". The output should show "Target storage class: STANDARD_IA" to match the command being executed.
    scripts/README_change_storage_tier.md:292
  • The example output shows "0 already have target storage class STANDARD" at line 292, but this should say "STANDARD_IA" to be consistent with the target storage class specified in the command (line 272). This inconsistency between the command and its example output could confuse users.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI commented Dec 11, 2025

@lhoupert I've opened a new pull request, #66, to work on those changes. Once the pull request is ready, I'll request review from you.

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