projectanalysis

package
v0.3.0-20261120180237-... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Project analysis

Project analysis consumes request IDs after terminal build analysis has retained all final build issues. A missing terminal-analysis completion is an invalid handoff, not a reason to poll.

The controller materializes both directions of each issue/project association and records attribution completion before resolving project statuses and recording their facts and lookup entries. Each step retains its own event after its writes. Once both steps finish, the controller records project_analysis_completed, updates the request-summary completion timestamp, publishes project.analysis.completed, and queues repository recording. Project-fact and attribution events do not set that timestamp; attribution queries still require the successful attribution event.

Retries adopt immutable facts and repair missing lookup entries. A completed request skips provider calls, repairs its summary if needed, and retries hook publication followed by the recording handoff. Empty results still record completion. Cancelled requests bypass project analysis; superseded requests require no work.

Completion hook

The project.analysis.completed payload contains only queue and request_id. Consumers resolve project counts from the request summary and project details from the retained facts and associations. Completion is published even when no projects are affected. Cancelled, superseded, abandoned, and incomplete analyses do not publish this hook.

Publication follows the durable completion log and its summary projection, and precedes the recording handoff. The event ID hashes the queue/request identity and the timestamp comes from the retained completion log. A failed publication is retried without calling providers again. Delivery is at least once; consumers performing external side effects must durably deduplicate by event ID.

Recovery

DLQ recovery leaves existing facts and association rows untouched. If project_analysis_completed was already recorded, it repairs the summary. Otherwise it records project_analysis_abandoned, without calling either provider or marking attribution complete. Recovery never publishes hooks or queues repository recording. If normal publication exhausts retries, the completion notification may be lost. History and summary repairs are safe to retry.

Normal redeliveries also recognize abandonment, repair its summary, and stop. An already-running delivery may still finish immutable writes; abandonment does not roll them back or make a partial association set complete.

Documentation

Overview

Package projectanalysis records project statuses and issue attribution after build analysis.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func NewController

func NewController(
	logger *zap.SugaredLogger,
	scope tally.Scope,
	stores storage.Factory,
	requestLogMaterializer requestlog.Materializer,
	resolvers projectstatus.ResolverFactory,
	attributers projectissues.AttributerFactory,
	registry consumer.TopicRegistry,
	topicKey consumer.TopicKey,
	consumerGroup string,
) *Controller

func (*Controller) ConsumerGroup

func (c *Controller) ConsumerGroup() string

func (*Controller) Name

func (c *Controller) Name() string

func (*Controller) Process

func (c *Controller) Process(ctx context.Context, delivery consumer.Delivery) (retErr error)

func (*Controller) TopicKey

func (c *Controller) TopicKey() consumer.TopicKey

type DLQController

type DLQController struct {
	// contains filtered or unexported fields
}

DLQController retains incomplete project analysis without repeating provider calls.

func NewDLQController

func NewDLQController(
	logger *zap.SugaredLogger,
	scope tally.Scope,
	stores storage.Factory,
	requestLogMaterializer requestlog.Materializer,
	topicKey consumer.TopicKey,
	consumerGroup string,
) *DLQController

func (*DLQController) ConsumerGroup

func (c *DLQController) ConsumerGroup() string

func (*DLQController) Name

func (c *DLQController) Name() string

func (*DLQController) Process

func (c *DLQController) Process(ctx context.Context, delivery consumer.Delivery) (retErr error)

Process acknowledges unusable messages and retries failures retaining history or repairing summaries.

func (*DLQController) TopicKey

func (c *DLQController) TopicKey() consumer.TopicKey

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL