-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix(config): Add missing handling for envCache
in getKeys()
#46140
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
joshtrichards
added
bug
3. to review
Waiting for reviews
♻️ refactor
Refactor code (not a bug fix, not a feature just refactoring)
labels
Jun 26, 2024
joshtrichards
requested review from
nickvergessen,
icewind1991,
Altahrim,
kesselb and
come-nc
June 26, 2024 14:06
/backport to stable29 |
/backport to stable28 |
Cypress test seems unrelated (but not the usual "just re-run it" Cypress test failure either). |
joshtrichards
force-pushed
the
fix-nc-env-inclusion
branch
from
June 27, 2024 02:44
2102001
to
6ff093d
Compare
come-nc
reviewed
Jun 27, 2024
joshtrichards
force-pushed
the
fix-nc-env-inclusion
branch
2 times, most recently
from
June 27, 2024 15:06
91a5264
to
da697ea
Compare
come-nc
approved these changes
Jul 1, 2024
NC_ env variable overrides were not appearing in the output of `occ config:list system` nor `occ config:system:get xxx`. This was creating nearly impossible to diagnose configuration/ behavior disprepancies. - Refactored readData() so that we aren't saving the entire environment in the envCache anymore (only those prefixed "NC_") and so that we save NC_ provided config values under their real key. - Refactored getValue() to accommodate readData() refactor - Fixed getKeys() to properly return envCache keys too Environment provided config variables now appear in `occ config:list system` as expected. Environment provided config variables now appear when queried via `occ config:system:get KEY` envCache is now free of non-NC stuff. Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
joshtrichards
force-pushed
the
fix-nc-env-inclusion
branch
from
July 8, 2024 20:42
da697ea
to
34a9e48
Compare
Merged
joshtrichards
removed
the
♻️ refactor
Refactor code (not a bug fix, not a feature just refactoring)
label
Aug 19, 2024
icewind1991
approved these changes
Sep 16, 2024
Signed-off-by: Robin Appelman <robin@icewind.nl>
This was referenced Sep 16, 2024
/backport to stable30 |
This was referenced Sep 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context: #3966
config.php
variables (viaNC_*
are not reflected inocc config:system:get
command #36126Summary
NC_
environment variableconfig.php
overrides were not appearing in the output ofocc config:list system
norocc config:system:get xxx
. This was creating nearly impossible to diagnose configuration/ behavior discrepancies.getValue()
was already, of course, returningNC_
provided config values. ButgetKeys()
was not due to (a) it having no handling for theenvCache
; (b) all values inenvCache
being saved underNC_
keys rather than their actual config keys (which needed additional handling to be merged with the non-NC_
keys).readData()
so that:envCache
anymore (only those prefixedNC_
)NC_
provided config values in theenvCache
under their real configuration keygetValue()
to accommodatereadData()
refactorgetKeys()
to now returnenvCache
keys as well in order to be consistent withgetValue()
(in turn, addressing the underlying bugs noted in the opening paragraph)Result:
occ config:list system
as expected.occ config:system:get blah
envCache
is now free of non-NC related environment variablesTODO
Checklist