Skip to content

feat: add project create event#2348

Merged
migmartri merged 8 commits into
chainloop-dev:mainfrom
migmartri:2347-add-events
Aug 12, 2025
Merged

feat: add project create event#2348
migmartri merged 8 commits into
chainloop-dev:mainfrom
migmartri:2347-add-events

Conversation

@migmartri

@migmartri migmartri commented Aug 11, 2025

Copy link
Copy Markdown
Member

Adds ProjectCreated and VersionCreated events that are triggered during the attestation process

Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
@migmartri migmartri marked this pull request as draft August 11, 2025 22:28
migmartri and others added 6 commits August 12, 2025 10:43
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
Add ProjectVersionCreated audit event that triggers when a new project version is created during the attestation process. This provides audit trail for version creation similar to the existing project creation events.

Changes:
- Add ProjectVersionCreated event structure with version ID, version string, and prerelease flag
- Update WorkflowRunRepo interface to track version creation during workflow run creation
- Add auditor support to WorkflowRunUseCase to dispatch version creation events
- Update wire dependency injection to pass auditor to WorkflowRunUseCase
- Add comprehensive tests for the new event

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
@migmartri migmartri marked this pull request as ready for review August 12, 2025 09:56
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>

# Restrict organization creation to role:instance:admin
restrict_org_creation: true
restrict_org_creation: false

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I am fixing this on purpose


payload, err := auditor.GenerateAuditEvent(entry, opts...)
if err != nil {
uc.log.Error("failed to generate audit event", "error", err)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

and the system was not logging auditing errors

@migmartri migmartri merged commit 80b52e4 into chainloop-dev:main Aug 12, 2025
13 checks passed
@migmartri migmartri deleted the 2347-add-events branch August 12, 2025 11:00
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