-
Notifications
You must be signed in to change notification settings - Fork 2
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
Support optional python and r section attributes #2568
Closed
Closed
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
2055497
Update Schema to make attributes inside of R and Python be optional.
sagerb 154df3a
Change to optionally populate R and Python sections during initial co…
sagerb 527c3e2
extract active R and Python paths from API requests
sagerb ce82163
Omit R and Python version from config when empty
sagerb e4a3f16
Pass interpreters in versus creating interpreters within inspect
sagerb 430fe3f
add logging to know what is being passed up in manifest
sagerb 07f2844
update initialization of publishing state to allow the loading of the…
sagerb fbe4a18
Update fromFile to fill in the empty fields into the config object, u…
sagerb 22a9173
update unit tests for agent
sagerb 629eae0
update unused CLI command handlers just to compile...
sagerb dcaf22d
Utilize a TS class to make sure we pass in the proper interpreter (R …
sagerb 998d0c4
Update the UX API signatures to include R & Python
sagerb 6a683a5
Merge remote-tracking branch 'origin/main' into sagerb-optional-pytho…
sagerb 2598b33
update to configuration doc
sagerb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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
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
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
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
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.
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.
Could you elaborate more on why it is required to send an R and Python executables to get a configuration? Shouldn't the configuration response be what the existing file contains?
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.
As a part of keeping this PR as narrow as possible we didn't change the behavior in the API and frontend.
Currently in
main
the defaults are inserted into the response even if the file doesn't have those attributes set (like thepackageFile = 'requirements.txt
settings). Rather than changing both the backend and frontend here we kept the API behavior the same.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 think I understand the reason of having the resulting config in the UI to have some defaults, but it feels confusing the way it is being handled.
This method is one of many that now accepts R and Python executables, but feels out of place, for example the
getPythonPackages
callingconfigurations/{name}/packages/python
also accepts anR
executable, and I find it confusing for future folks to have a method responsible to get python packages to accept an R executable.The
go
methodFromFile
now accepts overriding defaults asactiveRInterpreter
andactivePythonInterpreter
, and we are now having a method that at first look suggests to load the configuration as it is on file, but consumers of it could find surprises from it.My suggestion would be, to take a step back a bit and think how these signatures bring clarity or confusion to future folks working on this, specifically from the point that future folks might not have all the context on how this works or the history behind this.
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.
Great point. The effort here was to avoid making changes on the frontend, but creating confusion by needing to pass in the Python and R executables everywhere is confusing.
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.
To clarify, it's not overriding defaults but actually implementing them. The defaults come from the active interpreters, passed in at the time of the API request. Our current architecture requires all the levels of calls to pass these down into the deepest functions that need it. Unfortunately, that is very deep in this case.
I understand about the confusion. Let me think about this, and I'll signal for another review. Thanks.