#ShamelessTechShaming

Jesper Stemann Andersenstemann
2025-05-03

So, why is involved in the blame for CLI upload to blob storage being weird?

Due to how computes an MD5, and returns an array of 16 bytes (the output of `xxd -r -p` in the cautionary tale), instead of the more common hexadecimal string.

learn.microsoft.com/en-us/dotn

An MD5 string is 32 bytes, so saved 16 bytes by making it less easy to get an MD5 string...

Jesper Stemann Andersenstemann
2025-05-03

I imagine it went down like this at the design meeting:

> Microsoft engineer: We should store the MD5 of the content in the blob storage database.

> Senior Microsoft engineer: Let's use (!), and interpret the hexadecimal MD5 (with a newline!) as binary, and then base64 encode it!

They might have saved a couple of bytes... ...👏 ...😬

Jesper Stemann Andersenstemann
2025-05-03

But try uploading a single file to blob storage with the CLI! (and consume it with official API's - which require an MD5 checksum for blobs)

Surely `az storage blob upload --file foo [account] [container] [dst]` is enough?

Wrong! You need `az storage blob upload --file foo --content-md5 $(md5sum foo | cut -d ' ' -f 1 | xxd -r -p | base64) [account] [container] [dst]` 😬

Likely due to doing stuff with

Jesper Stemann Andersenstemann
2025-05-02

@horenmar Ha ha - that's the joke of the day! 🤣

It's amazing that this can happen in a world with .

Suppose an upstream package messes up and releases v4.4 with a breaking change. For some reason (msys2), you need a vcpkg baseline where the package is at v4.5. You need v4.3, and even though v4.3 is in the versions database, you can only get v4.5, because the only versioning constraint available is "version>=": "4", which baseline v4.5 satisfies 🎉🤦‍♂️

Jesper Stemann Andersenstemann
2025-05-02

Surprised with how bad the CLI tool is for batch uploading files to blob storage.

If a file already exists you get a five-line long warning - per file. Fair enough (ish).

There is no command line switch to ignore the warning - and `--overwrite false` changes nothing: You still get thousands of warnings when uploading a set of files (where some may already exist) - and you are left wondering whether it succeeded. Not so fair.

Jesper Stemann Andersenstemann
2025-05-02

@horenmar It certainly features a "unique" design! 😊

> vcpkg has a unique way of handling package versions

learn.microsoft.com/en-us/vcpk

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst