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

Implement a trigger system #28

Closed
ctron opened this Issue Feb 3, 2016 · 2 comments

Comments

Projects
None yet
1 participant
@ctron
Contributor

ctron commented Feb 3, 2016

As of now Package Drone's channels can be enhanced by using "aspects". These alter the state of a channel but work more like a passive element during the whole process.

Sometimes it is necessary to execute actions triggered be certain conditions. These actions are executed at a specific time and do not necessarily alter the state of a channel.

A trigger is more like "if this, then that". While an aspect Always transforms the channel in the same way, there is no operation involved.

There are two classic examples in Package Drone which failed this idea. The "Tycho Cleaner" and the "Cleanup" aspect. Those were implemented as an aspect (due to the missing trigger system back then) but did not produce the same channel state when removing and re-adding those aspects.

Also can aspects only be added once to a channel, leading to the trouble of only having a single cleanup configuration (see also issue ctron/package-drone#94).

There should be a trigger system which allows:

  • To be fired by various conditions (internal and external)
  • To hook up actions for each trigger
  • To support different trigger context (pre add, post add)
  • To configuration additional trigger instances (like timer, URL action)
  • To have factories for Triggers and Actions

@ctron ctron added the enhancement label Feb 3, 2016

@ctron ctron self-assigned this Feb 3, 2016

@ctron

This comment has been minimized.

Show comment
Hide comment
@ctron

ctron Feb 3, 2016

Contributor
Contributor

ctron commented Feb 3, 2016

@ctron ctron added this to the v0.13.0.m1 milestone Feb 3, 2016

ctron added a commit that referenced this issue Feb 3, 2016

#28: add initial trigger system for internal triggers
This change does implement the first part of a trigger system. It does
provide internal triggers, actions/processors and an API and Web UI
to configure those.

Missing from this change is the implementation of the "configurable
triggers".

ctron added a commit that referenced this issue Feb 8, 2016

#28: provide an "adding" trigger point
implement a new trigger point "adding", which is being fired after
the pre-add trigger, after the meta data has been extracted but
before the artifact is added to the channel.

ctron added a commit that referenced this issue Feb 10, 2016

#28: implement two triggers
This change implements two triggers. One example trigger (foo bar) and
one which will ensure the uniqueness of artifacts based on its
configuration.

ctron added a commit that referenced this issue Feb 16, 2016

#28: implement configurable triggers
The change sums up several changes for implementing configurable
triggers. It is possible to configure triggers in addition to the
built-in triggers, which get instantiated by factories.

For testing an "HTTP endpoint" trigger as added which gets fired
when then configured HTTP endpoint is called.

ctron added a commit that referenced this issue Mar 2, 2016

#28: refactor the cleanup aspect to work with the new trigger system
This change will refactor common parts of the cleanup aspect to a
common bundle and will then implement both the existing cleanup aspect
and the new cleanup processor based on this common base.

The new cleanup processors works exactly the same as the cleanup aspect
but now it is possible to have multiple instances of the cleanup
functionality, in different configuration and being able to execute
those at different times.

@ctron ctron modified the milestones: v0.13.0.m2, v0.13.0.m1 Mar 2, 2016

ctron added a commit that referenced this issue Mar 2, 2016

@ctron

This comment has been minimized.

Show comment
Hide comment
@ctron

ctron Apr 18, 2016

Contributor

will be in version 0.13.0

Contributor

ctron commented Apr 18, 2016

will be in version 0.13.0

@ctron ctron closed this Apr 18, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment