Skip to content

Add support for CDEvents notifications#18853

Open
afrittoli wants to merge 2 commits into
goharbor:mainfrom
afrittoli:cdevents
Open

Add support for CDEvents notifications#18853
afrittoli wants to merge 2 commits into
goharbor:mainfrom
afrittoli:cdevents

Conversation

@afrittoli

@afrittoli afrittoli commented Jun 26, 2023

Copy link
Copy Markdown

Comprehensive Summary of your change

Introduce a new notifier format "CDEvents", as described in the CDEvents proposal.

The CDEvents formatter, for now, supports only PUSH_ARTIFACT events.
If other events are selected in the UI, they raise an error in the logs and no event is sent.

The PR is made of two commits:

  • add the new notification format to Harbor code
  • add the CDEvents option in the format dropdown in the UI

Issue being fixed

Fixes #community/225

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/ignore-for-release, release-note/new-feature, release-note/update, release-note/enhancement, release-note/community, release-note/breaking-change, release-note/docs, release-note/infra, release-note/deprecation"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

@afrittoli afrittoli requested a review from a team as a code owner June 26, 2023 11:17
@afrittoli

Copy link
Copy Markdown
Author

/label release-note/new-feature

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
@chlins

chlins commented Jul 3, 2023

Copy link
Copy Markdown
Member

@afrittoli Hi, thanks for your work! Please update to resolve the conflict.

@chlins chlins added the release-note/new-feature New Harbor Feature label Jul 3, 2023
@codecov

codecov Bot commented Jul 3, 2023

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 44.71%. Comparing base (b822952) to head (5ffc9bd).
⚠️ Report is 870 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #18853   +/-   ##
=======================================
  Coverage   44.71%   44.71%           
=======================================
  Files         235      235           
  Lines       13083    13083           
  Branches     2671     2671           
=======================================
  Hits         5850     5850           
- Misses       6938     6939    +1     
+ Partials      295      294    -1     
Flag Coverage Δ
unittests 44.71% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...al/src/app/base/project/webhook/webhook.service.ts 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

// Only TopicPullArtifact is supported for now.
// Other event types are not striclty a failure (they are missing by design),
// but we still report them upstream as unknown types
if he.EventType != event.TopicPushArtifact {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yep, I agreed that other event types are not a failure case, user can subscribe other event types from UI but can only receive PUSH events, IMO the better solution is that extend the capability to support limit the event types.

@github-actions

github-actions Bot commented Sep 1, 2023

Copy link
Copy Markdown

This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days.

@github-actions github-actions Bot added the Stale label Sep 1, 2023
@github-actions

github-actions Bot commented Oct 2, 2023

Copy link
Copy Markdown

This PR was closed because it has been stalled for 30 days with no activity. If this PR is still relevant, please re-open a new PR against main.

@github-actions github-actions Bot closed this Oct 2, 2023
@afrittoli

Copy link
Copy Markdown
Author

I would like to continue working on this - is it an option to re-open? If not I will open a new PR.

@OrlinVasilev

Copy link
Copy Markdown
Member

@afrittoli reopen :) please excuse the automation :D

@github-actions github-actions Bot removed the Stale label Oct 3, 2023
@Vad1mo Vad1mo added the never-stale Do not stale label Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

never-stale Do not stale release-note/new-feature New Harbor Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants