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
Add server side CoreConfig object #6991
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
2b64353
Fix deprecation warning
vidartf 6a3c034
Add a CoreConfig object to python
vidartf 29a40e0
fix clean
vidartf 849244d
Expose current info on coreconfig
vidartf 64ba1ca
Avoid camelCase in Python
vidartf b937f18
Fix CoreConfig signleton location
vidartf 3c6a864
More fixes for CoreConfig
vidartf 87b8986
Merge branch 'master' into coreconfig
vidartf a99899e
Lint COTRIBUTING.md
vidartf 900b847
Update coreconfig docstrings
vidartf 853a5f5
Tweak and test
vidartf File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, we expect there to be 'engines': 'node' metadata.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The content of
data
is supposed to be a lab internal detail. As an alternative, I could call the method._data
, to underline the fact? Or._get_data_internal()
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C.f. its docstring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, so your custom spin doesn't use our AppHandler, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does, but it only modifies
data
via the methods onCoreConfig
. As such, the internal detail fields likeengine
are left untouched.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm on my phone, but doesn't that metadata still need to be there then? As in, we need to document the minimum fields that need to be present?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the data is originally filled with the data from
staging/package.json
. This public API only allows for modifying the extensions/mimeExtensions/singletons. Thedata
property (getter only) is meant to be used by whoever consumes the core config (internal only). Technically, since we are returning the inner data by reference, a user could modify the content ofdata
in place. The behavior in this case is undefined (by spec), and can be considered similar in nature to monkey patching. We could try to make this harder to do by accident by doing a deepcopy on access, but I'm not sure if that is worth the hassle.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels off to me that they'd have to use our package
json directly as a starting point. I'd rather they had to provide their own metadata that met a certain spec.