[PR #5610] [MERGED] fix: filter undefined values in config and update build files #5281

Closed
opened 2026-03-17 02:44:43 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/5610
Author: @mirarifhasan
Created: 11/24/2025
Status: Merged
Merged: 11/24/2025
Merged by: @mirarifhasan

Base: nextHead: fix/be-dep-bump


📝 Commits (5)

  • 2c30d0e fix: filter undefined values in config and update build files
  • a39bb7d fix: add fallback for DATABASE_URL in Prisma config
  • cfbe6ac build: set default DATABASE_URL in Dockerfile and config
  • 46a15f2 build: et default DATABASE_URL in Dockerfile and config
  • ce3f950 Update packages/hoppscotch-backend/package.json

📊 Changes

3 files changed (+10 additions, -5 deletions)

View changed files

📝 packages/hoppscotch-backend/package.json (+2 -1)
📝 packages/hoppscotch-backend/src/infra-config/infra-config.service.ts (+6 -4)
📝 prod.Dockerfile (+2 -0)

📄 Description

What's changed

This pull request introduces several improvements to the backend configuration and deployment process, focusing on filtering undefined configuration values, enhancing Docker build reliability, and ensuring proper packaging of configuration files. The changes collectively improve robustness and maintainability in both development and production environments.

Configuration and code quality improvements:

  • Updated the InfraConfigService to filter out undefined values when processing configuration entries, preventing unnecessary or invalid entries from being stored.

Build and deployment enhancements:

  • Added the prisma.config.ts file to the files array in package.json to ensure it is included in package distributions, which is important for deployments and builds that rely on this configuration.
  • Set a default DATABASE_URL environment variable in the Dockerfile before running prisma generate, ensuring that Prisma CLI commands do not fail due to missing environment variables during the build process.

Notes to reviewers


Summary by cubic

Prevents invalid config entries by filtering undefined values and stabilizes backend builds by bundling Prisma config and setting a safe default DATABASE_URL for Prisma generation.

  • Bug Fixes

    • Ignore undefined values when creating config entries in InfraConfigService.
  • Build

    • Include prisma.config.ts in package artifacts.
    • Ensure prisma generate succeeds by setting a placeholder DATABASE_URL in both Dockerfile and postinstall.

Written for commit ce3f95053e. Summary will update automatically on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/5610 **Author:** [@mirarifhasan](https://github.com/mirarifhasan) **Created:** 11/24/2025 **Status:** ✅ Merged **Merged:** 11/24/2025 **Merged by:** [@mirarifhasan](https://github.com/mirarifhasan) **Base:** `next` ← **Head:** `fix/be-dep-bump` --- ### 📝 Commits (5) - [`2c30d0e`](https://github.com/hoppscotch/hoppscotch/commit/2c30d0e97a1a460b950a9aa35a6e5f3a1a8fc538) fix: filter undefined values in config and update build files - [`a39bb7d`](https://github.com/hoppscotch/hoppscotch/commit/a39bb7deb144a1e0f9d7bab79ba003682630b16b) fix: add fallback for DATABASE_URL in Prisma config - [`cfbe6ac`](https://github.com/hoppscotch/hoppscotch/commit/cfbe6acc43de0de126cb31b6d2842a11a0c91034) build: set default DATABASE_URL in Dockerfile and config - [`46a15f2`](https://github.com/hoppscotch/hoppscotch/commit/46a15f2fb1a3bac564e9708b3f992849961178cc) build: et default DATABASE_URL in Dockerfile and config - [`ce3f950`](https://github.com/hoppscotch/hoppscotch/commit/ce3f95053edccd7261c845d6feea1a2d34e816fc) Update packages/hoppscotch-backend/package.json ### 📊 Changes **3 files changed** (+10 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-backend/package.json` (+2 -1) 📝 `packages/hoppscotch-backend/src/infra-config/infra-config.service.ts` (+6 -4) 📝 `prod.Dockerfile` (+2 -0) </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> <!-- If this pull request closes an issue, please mention the issue number below --> <!-- Issue # here --> <!-- Add an introduction into what this PR tries to solve in a couple of sentences --> ### What's changed <!-- Describe point by point the different things you have changed in this PR --> This pull request introduces several improvements to the backend configuration and deployment process, focusing on filtering undefined configuration values, enhancing Docker build reliability, and ensuring proper packaging of configuration files. The changes collectively improve robustness and maintainability in both development and production environments. Configuration and code quality improvements: * Updated the `InfraConfigService` to filter out undefined values when processing configuration entries, preventing unnecessary or invalid entries from being stored. Build and deployment enhancements: * Added the `prisma.config.ts` file to the `files` array in `package.json` to ensure it is included in package distributions, which is important for deployments and builds that rely on this configuration. * Set a default `DATABASE_URL` environment variable in the Dockerfile before running `prisma generate`, ensuring that Prisma CLI commands do not fail due to missing environment variables during the build process. <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Notes to reviewers <!-- Any information you feel the reviewer should know about when reviewing your PR --> <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Prevents invalid config entries by filtering undefined values and stabilizes backend builds by bundling Prisma config and setting a safe default DATABASE_URL for Prisma generation. - **Bug Fixes** - Ignore undefined values when creating config entries in InfraConfigService. - **Build** - Include prisma.config.ts in package artifacts. - Ensure prisma generate succeeds by setting a placeholder DATABASE_URL in both Dockerfile and postinstall. <sup>Written for commit ce3f95053edccd7261c845d6feea1a2d34e816fc. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:44:43 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#5281
No description provided.