Skip to content

Conversation

SATYAsasini
Copy link
Contributor

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes https://github.com/devtron-labs/sprint-tasks/issues/2416

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?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

@github-actions github-actions bot added the PR:Ready-to-Review PR:Ready-to-Review label Jul 1, 2025
Copy link

sonarqubecloud bot commented Jul 1, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube Cloud

@AbhishekA1509 AbhishekA1509 requested a review from Copilot July 1, 2025 12:12
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates static compression from gzip to brotli, updating both the application build configuration and the deployment environment. Key changes include updating the compression algorithm in Vite configuration, adding brotli configuration in nginx, and adjusting the Dockerfile to use an nginx image with brotli support.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
vite.config.mts Changed the compression algorithm to "brotliCompress" to enable brotli.
nginx.conf Added brotli settings for static compression alongside existing gzip config.
Dockerfile Updated build steps and switched the base image to one supporting brotli, with adjustments to environment setup and command execution.
Comments suppressed due to low confidence (2)

nginx.conf:32

  • Consider adding a clarifying comment explaining why dynamic brotli compression is turned off, ensuring it's clear that only pre-compressed static files will be served.
    brotli off;

vite.config.mts:187

  • Verify that the 'brotliCompress' algorithm is supported by the deployment environment and any related infrastructure components.
                algorithm: 'brotliCompress',

ENTRYPOINT ["/bin/bash", "-c"]

CMD ["./env.sh && nginx -g 'daemon off;'"]
Copy link
Preview

Copilot AI Jul 1, 2025

Choose a reason for hiding this comment

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

[nitpick] Use consistent quoting in the CMD instruction to prevent potential shell interpretation issues; consider using double quotes uniformly.

Suggested change
CMD ["./env.sh && nginx -g 'daemon off;'"]
CMD ["./env.sh && nginx -g \"daemon off;\""]

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR:Ready-to-Review PR:Ready-to-Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant