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

chore(deps): use github.com/Azure/azure-sdk-for-go/sdk/storage/azblob #1661

Merged
merged 1 commit into from
May 28, 2024

Conversation

MaineK00n
Copy link
Collaborator

@MaineK00n MaineK00n commented Apr 26, 2023

What did you implement:

Since github.com/Azure/azure-sdk-for-go/storage is deprecated in the future, change to use github.com/Azure/azure-sdk-for-go/sdk/storage/azblob.
https://pkg.go.dev/github.com/Azure/azure-sdk-for-go@v68.0.0+incompatible/storage

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

$ docker run --rm -p 10000:10000 mcr.microsoft.com/azure-storage/azurite azurite-blob --blobHost 0.0.0.0
$ curl -I -X PUT "http://127.0.0.1:10000/devstoreaccount1/vuls?restype=container&sv=2023-01-03&ss=b&srt=c&st=2024-05-27T14%3A50%3A03Z&se=2025-05-28T14%3A50%3A00Z&sp=rwdlac&sig=ZA4l6fqhJxKsaPOcuD0oa5TnfPkq0OsZhgWI8WVm4Sw%3D"
HTTP/1.1 201 Created
Server: Azurite-Blob/3.30.0
etag: "0x1C9CEB822450DD0"
last-modified: Mon, 27 May 2024 15:28:37 GMT
x-ms-request-id: d4423362-153e-46a8-8d78-967e26f5e8f9
x-ms-version: 2024-05-04
Date: Mon, 27 May 2024 15:28:37 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Content-Length: 0

$ cat config.toml
...
[azure]
endpoint = "http://devstoreaccount1.blob.localhost:10000/"
accountName = "devstoreaccount1"
accountKey = "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="
containerName = "vuls"
...

$ echo "127.0.0.1 devstoreaccount1.blob.localhost" > ~/.hosts
$ HOSTALIASES=~/.hosts vuls report -to-azure-blob

$ curl -s -X GET "http://127.0.0.1:10000/devstoreaccount1/vuls?restype=container&comp=list&sv=2018-03-28&st=2024-05-27T14%3A55%3A52Z&se=2025-05-28T14%3A55%3A00Z&sr=c&sp=rl&sig=3Sy1CkVPeM%2FjLyMZCWFV8VDaqzeRjMHEWTqoInaHE4o%3D" | xmllint --format -
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<EnumerationResults ServiceEndpoint="http://127.0.0.1:10000/devstoreaccount1" ContainerName="vuls">
  <Prefix/>
  <Marker/>
  <MaxResults>5000</MaxResults>
  <Blobs>
    <Blob>
      <Name>2024-05-25T18:32:16+09:00/vagrant_short.txt</Name>
      <Properties>
        <Creation-Time>Mon, 27 May 2024 15:10:30 GMT</Creation-Time>
        <Last-Modified>Mon, 27 May 2024 15:10:30 GMT</Last-Modified>
        <Etag>0x25B5E6FC61DAD80</Etag>
        <Content-Length>239021</Content-Length>
        <Content-Type>application/octet-stream</Content-Type>
        <Content-MD5>d47FU/sA77w7Fs4ej7j94A==</Content-MD5>
        <BlobType>BlockBlob</BlobType>
        <LeaseStatus>unlocked</LeaseStatus>
        <LeaseState>available</LeaseState>
        <ServerEncrypted>true</ServerEncrypted>
        <AccessTier>Hot</AccessTier>
        <AccessTierInferred>true</AccessTierInferred>
        <AccessTierChangeTime>Mon, 27 May 2024 15:10:30 GMT</AccessTierChangeTime>
      </Properties>
    </Blob>
  </Blobs>
  <NextMarker/>
</EnumerationResults>

Checklist:

You don't have to satisfy all of the following.

  • Write tests
  • Write documentation
  • Check that there aren't other open pull requests for the same issue/feature
  • Format your source code by make fmt
  • Pass the test by make test
  • Provide verification config / commands
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES

Reference

@MaineK00n MaineK00n self-assigned this Apr 26, 2023
@MaineK00n MaineK00n force-pushed the MaineK00n/azure-blob branch 2 times, most recently from 96fca1c to b9826e1 Compare May 27, 2024 15:37
@MaineK00n MaineK00n requested a review from shino May 27, 2024 15:38
@MaineK00n MaineK00n marked this pull request as ready for review May 27, 2024 15:38
Copy link
Collaborator

@shino shino left a comment

Choose a reason for hiding this comment

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

Fabulous!

@MaineK00n MaineK00n merged commit cc9734d into master May 28, 2024
8 checks passed
@MaineK00n MaineK00n deleted the MaineK00n/azure-blob branch May 28, 2024 10:31
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