-
Notifications
You must be signed in to change notification settings - Fork 233
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
(PE-28877, PE-28941) Add option to compile-ast endpoint to load bolt types #2332
(PE-28877, PE-28941) Add option to compile-ast endpoint to load bolt types #2332
Conversation
Orch changes: https://github.com/puppetlabs/orchestrator/pull/1340 |
Do we usually mention PE stuff in FOSS commit messages? I know the puppet repo doesn't like non-PUP tickets, but not sure if we have a similar policy here. |
fwiw, I had these two concerns about this approach that I outlined here: #2329 (comment) I was fine merging the current approach in since we were trying to make the 6.15.0 deadline. I'm curious, since we didn't make that deadline, can we attempt those approaches now? |
b0ad596
to
494358f
Compare
Regarding the two questions raised in the old PR
I agree we should clean this up. I'm not sure whether that should happen with immediately on as part of Puppet 7. I'm still concerned about the time crunch with the LTS approaching but doing this immediately post-LTS will definitely increase the maintenance burden of the LTS. I also don't know how stable PAL needs to be. Should we set up a meeting to figure this out?
We could extract the boltlib module with it's PCore types pretty easily but some of the ruby implementations are used without PAL so that would be messier. I think the question of whether to load the bolt gem into puppet-server is a question of how we want to scale plans in general. Long term we need to horizontally scale all of bolt in pe not just catalog compilation. Do we want to set up a new service for scaling plan execution and ssh/winrm or put it in puppet-server to keep our footprint simple? It seems like ssh and winrm probably do belong in puppet-server so we have a single "edge server" for users to install in network partitions which will mean pulling bolt in anyway. |
494358f
to
e0d8940
Compare
e0d8940
to
3393955
Compare
@donoghuc If this is ready from your perspective, can you remove the DO NOT MERGE label? This seems sane to me, but I'd like someone with more puppetserver experience to take a look. |
Is DO NOT MERGE lable discouraging review? I added it because this is still blocked on getting the pse bits merged/promoted. It is also dependent on some orchestrator changes. |
oh, I thought this was one of the ones you said was ready. if it's still blocked, you can leave the label. 😊 |
To be clear, It is ready for review, we just need to be thoughtful on merge order. |
src/clj/puppetlabs/services/legacy_routes/legacy_routes_service.clj
Outdated
Show resolved
Hide resolved
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.
This looks fine, pending Molly's comments. At some point I'd kind of like us to make a decision about the non-Bolt code path here. If no use case for it comes up, I think it should ultimately get deleted.
3393955
to
71cf1ed
Compare
Previously when the compile endpoint was asked to compile AST with references to Bolt objects the compile would fail. This commit updates the compiler to accept serialized pcore and to deserialize it for compilation. This adds the requirement of some Bolt library code (and some supporting gems [logging, addressable, public_suffix]) as well as the boltlib module. Part of making the serialized types perform as expected the compiler now creates specialized bolt inventory to back operations on bolt Target options. This work depends on two new additions to the `jruby-puppet` configuration section for pe-puppetserver. The first is appending the path to the bolt library code in the `ruby-load-path` array. The second is a new setting called `boltlib-path` which is an array pointing to the path of any bolt modules to prepend to the modulepath for compilation. The compile request now accepts an option to load bolt types. The default behavior is to *not* attempt to load bolt types.
Previously the `Puppet::Server::Master#convert_java_args_to_ruby` method would not travserse array elements when converting from Clojure/java to ruby. This commit adds a helper method to perform complete travseral of data nested in arrays.
71cf1ed
to
ddcee8c
Compare
No. If the code being there ever gets annoying we can revisit it. |
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 know this was pretty arduous, I really appreciate all the work you have done on this.
Previously when the compile endpoint was asked to compile AST with references to Bolt objects the compile would fail. This commit updates the compiler to accept serialized pcore and to deserialize it for compilation. This adds the requirement of some Bolt library code (and some supporting gems [addressable, public_suffix]) as well as the boltlib module. Part of making the serialized types perform as expected the compiler now creates specialized bolt inventory to back operations on bolt Target options. This work depends on two new additions to the
jruby-puppet
configuration section for pe-puppetserver. The first is appending the path to the bolt library code in theruby-load-path
array. The second is a new setting calledboltlib-path
which is an array pointing to the path of any bolt modules to prepend to the modulepath for compilation. The compile request now accepts an option to load bolt types. The default behavior is to not attempt to load bolt types.