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

feat: Implements remote config support and config reload feature #14

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dcoric
Copy link
Collaborator

@dcoric dcoric commented Feb 12, 2025

This pull request introduces enhancements to the GitProxy configuration management, including the ability to reload configurations dynamically without restarting the service, and support for multiple configuration sources. The key changes are:

  • Added support for multiple configuration sources in config.schema.json and proxy.config.json, including file, HTTP, and Git sources
  • Introduced a new ConfigLoader class in src/config/ConfigLoader.js to handle loading and merging configurations from different sources, with support for periodic reloads.
  • Updated src/config/index.js to use the new ConfigLoader for managing configuration updates and reloading.
  • Added a new reload-config command to the CLI in packages/git-proxy-cli/index.js to trigger configuration reloads.
  • Introduced a new admin-only API endpoint in src/service/index.js to reload the configuration and restart services.

@dcoric dcoric force-pushed the denis-coric/remote-config branch from df0f681 to f8ba062 Compare February 27, 2025 23:49
Copy link

github-actions bot commented Feb 27, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
npm/env-paths 2.2.1 🟢 4.2
Details
CheckScoreReason
Code-Review⚠️ 2Found 7/28 approved changesets -- score normalized to 2
Packaging⚠️ -1packaging workflow not detected
Maintained⚠️ 00 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Binary-Artifacts🟢 10no binaries found in the repo
Security-Policy🟢 10security policy file detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Vulnerabilities🟢 100 existing vulnerabilities detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/env-paths ^2.2.1 🟢 4.2
Details
CheckScoreReason
Code-Review⚠️ 2Found 7/28 approved changesets -- score normalized to 2
Packaging⚠️ -1packaging workflow not detected
Maintained⚠️ 00 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Binary-Artifacts🟢 10no binaries found in the repo
Security-Policy🟢 10security policy file detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Vulnerabilities🟢 100 existing vulnerabilities detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0

Scanned Files

  • package-lock.json
  • package.json

@dcoric dcoric force-pushed the denis-coric/remote-config branch from f8ba062 to d9b5b5f Compare February 28, 2025 09:24
@dcoric dcoric self-assigned this Mar 5, 2025
@dcoric dcoric force-pushed the denis-coric/remote-config branch from 72fb681 to b6737c9 Compare March 5, 2025 13:10
@dcoric dcoric changed the title Implements remote config support and config reload feature feat: Implements remote config support and config reload feature Mar 5, 2025
@dcoric dcoric force-pushed the denis-coric/remote-config branch 2 times, most recently from 2a66b4a to aa0283d Compare March 10, 2025 11:56
@dcoric dcoric force-pushed the denis-coric/remote-config branch from aa0283d to 8d161a6 Compare March 25, 2025 13:57
@dcoric dcoric force-pushed the denis-coric/remote-config branch from 7dea019 to 55ce8ee Compare April 2, 2025 14:37
dcoric added 2 commits April 8, 2025 20:48
fix: config loader clone command issue

fix: adds input validation, uses array arguments, prevented shell spawn

fix: adds failsafe checking for directory location and structure

fix: env-paths change to v2.2.1 which support require and minor code fix

fix: improves test coverage

Adds additional tests for better cove

fix: fixed creating cache directory
@dcoric dcoric force-pushed the denis-coric/remote-config branch from 7f0a5cf to a73338d Compare April 8, 2025 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow for the configuration to be sourced externally and updated at runtime
1 participant