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

Broken UI when CI env var is set to false #2717

Open
sgrodzicki opened this issue Sep 12, 2024 · 2 comments
Open

Broken UI when CI env var is set to false #2717

sgrodzicki opened this issue Sep 12, 2024 · 2 comments

Comments

@sgrodzicki
Copy link

I've encountered a bug in Nango where the UI becomes dysfunctional when the CI environment variable is set to false. This issue arises when using Flightcontrol for deployments as it automatically sets this variable to false.

I've identified 3 instances of the CI environment variable within Nango's codebase. However, none of these instances involve a direct comparison of the variable's value. Instead, they merely check for its existence. This approach seems suboptimal, as it could lead to unintended consequences in certain scenarios (like a broken UI).

Steps to Reproduce:

  1. Create a Docker Compose file (see below) that sets the CI environment variable to false for the Nango container.
  2. Start the Nango container using the Docker Compose file (docker-compose up).
  3. Access the Nango UI (http://localhost:3003).
# docker-compose.yaml
services:
  nango-db:
    container_name: nango-db
    image: postgres:16
    environment:
      POSTGRES_USER: nango
      POSTGRES_PASSWORD: nango
      POSTGRES_DB: nango
  nango-server:
    container_name: nango-server
    image: nangohq/nango-server:hosted
    platform: linux/amd64
    environment:
      CI: false # That's breaking the UI
      FLAG_AUTH_ENABLED: false
      NANGO_DASHBOARD_USERNAME: nango
      NANGO_DASHBOARD_PASSWORD: nango
      NANGO_DATABASE_URL: postgres://nango:nango@nango-db:5432/nango
    ports:
      - 3003:3003
    depends_on:
      - nango-db

Expected Behavior:

The Nango UI should function normally regardless of the CI environment variable's value (or at least when it's set to anything but true).

Actual Behavior:

The Nango UI displays errors and becomes unresponsive when CI is set to false.

Proposed Solution:

Implement a more robust check for the CI environment variable, comparing its value to ensure correct behavior.

Copy link

linear bot commented Sep 12, 2024

@bastienbeurier bastienbeurier self-assigned this Oct 1, 2024
@bastienbeurier bastienbeurier added the Levity label Oct 1, 2024 — with Linear
@bastienbeurier
Copy link
Member

Sorry for the long delay here, and thanks a lot for reporting this. We'll push a fix within a couple of weeks if that works.

@bastienbeurier bastienbeurier added the Product label Nov 7, 2024 — with Linear
@bastienbeurier bastienbeurier removed their assignment Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants