Skip to content

Replace BucketReader.ObjectSize() with .Attributes()#2613

Merged
pracucci merged 6 commits intothanos-io:masterfrom
pracucci:add-attributes-to-objstore-clients
May 21, 2020
Merged

Replace BucketReader.ObjectSize() with .Attributes()#2613
pracucci merged 6 commits intothanos-io:masterfrom
pracucci:add-attributes-to-objstore-clients

Conversation

@pracucci
Copy link
Contributor

@pracucci pracucci commented May 15, 2020

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

As first step to address #2585, in this PR I've replaced BucketReader.ObjectSize() with Attributes() in order to also be able to read the object last modified timestamp via the BucketReader.

/cc @pstibrany

Verification

Unit tests.

Copy link
Member

@povilasv povilasv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing! Tiny comments only and LGTM (: 💪

Copy link
Member

@GiedriusS GiedriusS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good modulo the current comments/suggestions

pracucci added 6 commits May 21, 2020 09:48
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
@pracucci pracucci force-pushed the add-attributes-to-objstore-clients branch from c95fd62 to 001bbf7 Compare May 21, 2020 07:54
@pracucci pracucci merged commit 48c80d1 into thanos-io:master May 21, 2020
@pracucci pracucci deleted the add-attributes-to-objstore-clients branch May 21, 2020 08:38
@pstibrany
Copy link
Contributor

pstibrany commented Jun 30, 2020

This PR has changed chunk_object_size_ttl (Thanos 0.13) to chunk_object_attrs_ttl (on master) in cache config, which is a user-visible change, not mentioned in the changelog.

@pracucci
Copy link
Contributor Author

This PR has changed chunk_object_size_ttl (Thanos 0.13) to chunk_object_attrs_ttl (on master) in cache config, which is a user-visible change, not mentioned in the changelog.

Thanks for the heads up. I'm going to open a PR to fix it.

@SabaPing
Copy link
Contributor

SabaPing commented Jul 21, 2020

The method clientutil.ParseLastModified failed when called by oss.Attributes.

Aliyun oss api returns Last-Modified header in RFC1123 format. But the method clientutil.ParseLastModified parses all timestamp in RFC3339 format.

See oss api doc
image

This bug cause the store fails to load buckets from aliyun oss.

Could I submit a PR to fix this?

Thanks.

@bwplotka
Copy link
Member

Yes please @SabaPing ❤️

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.

6 participants