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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues with upload blob, blob url and snapshots #282

Merged
merged 4 commits into from
Nov 2, 2021

Conversation

FabioRosado
Copy link
Contributor

I've seeing some weird things locally and going through each bit is taking a bit too long 馃槥

This new PR fixes issues with the blob - I also add to add the Storage Blob Contributor role in order to get the objects inside a storage bucket.

Getting the signed URL was also broken so I fixed it in this PR. Creating a snapshot from a volume wasn't working anymore because create_or_update expects you to pass a snapshot class. This PR adds the Disk object to the API, but there are some issues, for example, I didn't yet figure out how to get the new tag into the snapshot so our fetching will be broken 馃槥

A note on the AzureBucketObject, when we are listing the objects, Azure returns a BlobProperties, but when we are getting it returns the blobclient. The easiest way to handle this was to add self._blob_properties to the class and use that instead

@nuwang
Copy link
Contributor

nuwang commented Oct 12, 2021

Thanks for continuing to hack away at this @FabioRosado. I got my institutional Azure credentials sorted out a few days ago, so I'm hoping to join the fray in the next couple of days. Will keep you posted.

@FabioRosado
Copy link
Contributor Author

No worries happy to 馃槃

Today I spent some time looking into the Azure API but couldn't figure out how to replace the tag in a single command, so I am calling update_snapshot_tags when calling create_snapshot and confirmed tha the new snapshot will have the right tag. Still feels a bit hacky though 馃槥

One thing that I think might be worth mentioning. I've ran a bunch of tests manually (or my understanding of the crud ones) and manually they all work fine. But when running them with tox they keep erroring with the error 'resource not found'. I suspect the reason for this, is because Azure actually takes a long time to create things like network resources, firewalls, etc.

Do you think the issue could be timing and perhaps we need to wait for the resource to be created? 馃 Haven't dug much into the tests yet tbh.

On an unrelated note, would you be open to adding the hacktoberfest topic to the project? I'm okay if you prefer not, I still have nightmares from last year spam PRs haha

@nuwang
Copy link
Contributor

nuwang commented Oct 17, 2021

@FabioRosado I think the two step process sounds fine if there's no way to do it in one go any more.

Regarding the resource group wait, that does sound plausible. I thought there was a wait, but perhaps the new API needs a manual wait.

Have added the hacktoberfest topic to the project, let me know whether that looks right.

@nuwang nuwang merged commit fd12674 into CloudVE:update_azure_09_21 Nov 2, 2021
@FabioRosado FabioRosado deleted the fr/azure branch November 3, 2021 14:37
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.

None yet

2 participants