Skip to content
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 raw methods for error and activity reporting by addons. #457

Merged
merged 3 commits into from
Jul 25, 2023

Conversation

jortel
Copy link
Contributor

@jortel jortel commented Jul 25, 2023

Add raw methods used by addons to report both errors and activity. The reason is to reduce the number of API calls when reporting large numbers.
For example, the addon.command package reports stdout/stderr for failed commands which can be hundreds (or thousands of lines). Calling Activity() hundreds of times result in hundreds of API calls.
Another example is the reported analyzer errors.

Another aspect is to formalize multi-line activity. This PR codifies the convention of:

- This is a list of:
- > One
- > Two
- > Three

and, simplifies the API.

The tackle2-addon command package will need to be updated once this merges to use RawActivity() for stdout/stderr. reporting.
The tackle2-addon-analyzer will need to updated to use both methods in select places as well.

Signed-off-by: Jeff Ortel <[email protected]>
@@ -67,7 +69,6 @@ func (h *Task) Variant() string {
//
// Started report addon started.
func (h *Task) Started() {
h.Load()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved Load() to adapter.Run(). Makes more sense.

Signed-off-by: Jeff Ortel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants