feat: expose service module through package exports (#1539)#1542
Conversation
✅ Deploy Preview for endearing-brigadeiros-63f9d0 canceled.
|
|
|
f81915a to
002903d
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1542 +/- ##
==========================================
- Coverage 90.65% 90.62% -0.03%
==========================================
Files 69 69
Lines 5690 5694 +4
Branches 985 985
==========================================
+ Hits 5158 5160 +2
- Misses 514 516 +2
Partials 18 18 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @andypols @kriswest @jescalada, @Andreybest, dear @git-proxy-maintainers, Could you please prioritize a review of this PR #1542 “feat: expose service module through package exports (#1539)”? This change is critical for us because we need the service module to be available through package exports in order to validate our migration path to the 2.0.0 release. If anything needs adjustment from our side, we can respond quickly. Thank you for your help and for maintaining the project, |
Signed-off-by: Juan Escalada <97265671+jescalada@users.noreply.github.com>
jescalada
left a comment
There was a problem hiding this comment.
LGTM, thanks for the contribution @rajeevr-g! It'll need an extra review, however, as I fixed merge conflicts in the latest commit 👍🏼
|
Hi @andypols @kriswest, dear @git-proxy-maintainers, Could you please help prioritize the review of PR #1542: This change is important for us because we need the service module to be exposed through package exports to validate our migration path for the 2.0.0 release and ensure our integration works successfully. If any adjustments or updates are needed from our side, we’ll be happy to address them promptly. Thank you for your time and for maintaining the project. Best regards, |
kriswest
left a comment
There was a problem hiding this comment.
I don't have a problem with this being exposed, however, it could be handled in a way that's more consistent with the exposure of other parts of the config, via a get* function. I don't like the fact that this part of the config sets defaults differently and that we can't set many of these settings from a config file (with the exception of GIT_PROXY_COOKIE_SECRET which can be set in config and overridden by an ENV var).
Personally, I think this should be refactored and made consistent with the rest of the config handling and worry that directly exporting it will lock in the current, inconsistent design.
@jescalada could you take another look? Is there an advantage to us only setting some of these thrings through env vars or using the defaults? Why not have config variables and defaults (set via the same approach as all others) for some of these critical settings?
kriswest
left a comment
There was a problem hiding this comment.
To avoid locking in the technical debt relating to env.ts / serverConfig, it should not be exported but a get function added to allow access to those settings. Even better would be a quick refactor to allow those settings to come from config in addition to env vars and to move their defaults into proxy.config.json.
GIT_PROXY_COOKIE_SECRET is the one variable that is currently settable from both config file and environment variable and can be used as an example:
see:
Lines 187 to 190 in ffd6937
and:
Lines 301 to 309 in ffd6937
I'm fine with the rest of this PR!
|
I've created issue #1553 to describe whats needed to fix the server config env variables properly. |
kriswest
left a comment
There was a problem hiding this comment.
LGTM, as far as it goes.
Description
Exposes the service module through package exports and updates configuration exports to support service module accessibility.
General changes:
src/config/index.tsto expose the required configuration exportsRelated Issue
Resolves #1539
Checklist
General
Documentation
Configuration
If configuration schema (
config.schema.json) was modified:npm run generate-config-types)npm run gen-schema-doc)Tests
npm test)npm run lintandnpm run format:check)npm run check-types)