-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add Test Case for Object Lock Configuration API: Year and Day Duration Calculation #512
Comments
cc @amwolff |
Do you think that's really true? S3's documentation is vague and the retention periods are coarse. I think that is intentional to prevent having to deal will all the complexities mentioned in this issue. If it's roughly the same as s3 I suspect most customers will be happy with that. |
minio just does whatever Go's
|
I feel like one extra day (the lack of it) might be a big deal in some cases. I don't know. But as Sean mentioned, if we use standard library's time handling, we'll be safe. |
Based on my testing, S3 does not define a year as strictly 365 days. For leap years, it becomes 366 days. On 2024-10-01, I set a default retention configuration with a duration of 4 years, encompassing the next leap day on 2028-02-29. This gave uploaded objects a retention period expiration date of 2028-10-01. I then changed the default retention duration to 1460 days (365 * 4), and the retention period expiration date of objects uploaded thereafter was 2028-09-30. These dates would be the same if a year and 365 days were considered equivalent quantities by S3. |
Description:
We need to add a test case for the PutObjectLockConfiguration API to verify the calculation of the duration specified in years and days. The API requires users to provide the number of years and days, and this duration is used to lock object versions. Given potential variations such as leap years, leap seconds, and time zone changes, it's critical to ensure that the duration calculations align with S3's standards.
Acceptance Criteria:
The text was updated successfully, but these errors were encountered: