Skip to content
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

Forward all presigned_attributes instead of trying to choose which ones to forward #90

Merged
merged 4 commits into from
Oct 16, 2024

Conversation

ChrisLoer
Copy link
Contributor

@ChrisLoer ChrisLoer commented Oct 16, 2024

With the switch to multi-region hosting, uploads from the QGIS plugin broke because we had to change some of the presigned attribute signature keys (specifically adding x-amz-signature). The expectation was that API callers would forward all presigned attributes, but the QGIS plugin tried to pick and choose the ones it thought were necessary. This change just tries to forward the whole block.

We're going to fix this here in the plugin, but we're simultaneously trying to build in some backwards compatibility on the Felt pipeline side so that people with un-upgraded plugins can still upload files (as long as they're talking to the us1 Felt region, which until this week, everyone was)

Test plan:

  • With production plugin, try uploading a layer, see you'll get a connection error when trying to post to s3
  • With this plugin, it'll work!

Copy link

github-actions bot commented Oct 16, 2024

Plugin ready!

A test version of this PR is available for testing here.

(Built from commit 98b8fb7)

Copy link

@axelson axelson left a comment

Choose a reason for hiding this comment

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

Tested it against prod in the default region and an alternative region. Both work 🎉

'x-amz-meta-file-count': self.x_amz_meta_file_count,
'x-amz-security-token': self.x_amz_security_token,
}
return {**self._presigned_attributes}
Copy link

Choose a reason for hiding this comment

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

Is this guaranteed to preserve the order of attributes that we received from the server? If the ordering changes then the signature will be invalid.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah it should preserve order although it would be nice if it were spelled out more explicitly. I added a comment at least.

@ChrisLoer ChrisLoer merged commit 3280ab8 into main Oct 16, 2024
12 checks passed
@ChrisLoer ChrisLoer deleted the cloer/forward_all_presigned branch October 16, 2024 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants