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.
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
feat: adapt build plugin implementation to new API #319
feat: adapt build plugin implementation to new API #319
Changes from 7 commits
9487eac
0a61dc3
c4cec26
50dc7cb
2aebf78
da588aa
3209c18
505c0b9
be3436f
483a108
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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
hasTask
impl has ensured that a postgres build task is only executed if a postgres database is used according to the effective cds configuration. E.g. asqlite
database might have been configured for thedevelopment
profile.Of course, this might be an edge case, but on the other hand the check is simple and ensures that users don't get surprised if cds build is executed with
development
profile ;-)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.
Yes, unfortunately I also don't see another way to make it work properly w/ the profile technique where you switch between HANA/Postgres based on config profiles. I re-added the
hasTask
again.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.
...unfortunately? - I think this is a perfect solution :)
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 it's close to perfect, but ideally the plugin doesn't handle what the plugin orchestrator in
cap/cds
should do, deciding which plugins to pull.I'd rather have an opt-out mechanism like this instead, which is then also combinable with profiles:
Opting out in non-centralized places like the build plugin introduces inconsistent behavior, e.g. the plugin will still show up as loaded with
DEBUG=plugins
.Also, it reduces the number of functions you have to implement from 2 to 1, which is huge imo.
@danjoa What's your take on 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.
But isn't this more a question of different lifecycles for
cds plugin
versuscds build task
. Loading thecds plugin
does not necessarily mean that a correspondingbuild task
respectively itsBuildPlugin
counterpart will get executed.I think the
cds add plugin
would behave similar. Acds plugin
will be loaded, but the concretecds facet
implementation might not, as this is determined using the concretecds add
command line parameters or some other facet dependencies.