Skip to content

Remove commented-out Azure Blob Storage dead code - #61

Merged
oldtopos merged 2 commits into
mainfrom
copilot/check-azure-services-references
Aug 18, 2026
Merged

oldtopos merged 2 commits into
mainfrom
copilot/check-azure-services-references

Conversation

Copilot AI commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

The codebase contained leftover Azure Blob Storage references in create_media (socialmedia/views.py) — fully commented out and never executed. The project has no Azure dependencies and deploys on GCP App Engine.

Changes

  • siteapps/socialmedia/views.py — stripped the following dead code from create_media:
    • BlobServiceClient init with AZURE_STORAGE_ACCOUNT_NAME / DefaultAzureCredential
    • blob_service_client.get_blob_client(container=AZURE_STORAGE_CONTAINER_NAME, ...)
    • blob_client.upload_blob(...)
    • file_cloud_path=blob_client.url assignment (commented as "Azure blob disabled")
    • _ = "MP4" if is_video else "JPEG" — existed solely to compute the blob file extension

Before:

def create_media(media_bytes, content_hash, request, is_video=False):
    _ = "MP4" if is_video else "JPEG"

    # blob_service_client = BlobServiceClient(
    # account_url=f"https://{settings.AZURE_STORAGE_ACCOUNT_NAME}.blob.core.windows.net/",
    # credential=DefaultAzureCredential(),
    # )
    # blob_client = blob_service_client.get_blob_client(
    # container=settings.AZURE_STORAGE_CONTAINER_NAME, blob=f"{content_hash}.{file_extension}"
    # )
    # blob_client.upload_blob(media_bytes, blob_type="BlockBlob")

    return Media.objects.create(
        content_hash=content_hash,
        uploaded_by=request.user,
        is_video=is_video,
        # file_cloud_path=blob_client.url,  # Azure blob disabled
    )

After:

def create_media(media_bytes, content_hash, request, is_video=False):
    return Media.objects.create(
        content_hash=content_hash,
        uploaded_by=request.user,
        is_video=is_video,
    )

Copilot AI changed the title [WIP] Document references to Azure services in code base Remove commented-out Azure Blob Storage dead code Jul 13, 2026
Copilot AI requested a review from oldtopos July 13, 2026 18:16
@oldtopos
oldtopos force-pushed the copilot/check-azure-services-references branch from 48c2f86 to c6511c9 Compare August 16, 2026 16:47
@oldtopos
oldtopos marked this pull request as ready for review August 18, 2026 15:19
Copilot AI lite review requested due to automatic review settings August 18, 2026 15:19
@oldtopos
oldtopos merged commit ad05ee1 into main Aug 18, 2026
2 of 3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Removes long-commented Azure Blob Storage upload code from the socialmedia app’s create_media helper, aligning the web frontend with its current GCP App Engine deployment and eliminating unused, misleading legacy scaffolding.

Changes:

  • Deleted commented Azure Blob Storage client initialization and upload snippets from create_media.
  • Removed a now-pointless media-extension computation that only supported the commented Azure path.
  • Simplified the Media.objects.create(...) call by removing the commented file_cloud_path assignment.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 585 to 589
return Media.objects.create(
content_hash=content_hash,
uploaded_by=request.user,
is_video=is_video,
# file_cloud_path=blob_client.url, # Azure blob disabled
)
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.

Check the code base for any references to azure services

3 participants