Documentation ¶
Index ¶
- func ProcessRPMWorkflow(ctx workflow.Context, args *mothershippb.ProcessRPMArgs) (*mothershippb.ProcessRPMResponse, error)
- func RetractEntryWorkflow(ctx workflow.Context, name string) (*mshipadminpb.RetractEntryResponse, error)
- func SealBatchWorkflow(ctx workflow.Context, req *mothershippb.SealBatchRequest) (*mothershippb.SealBatchResponse, error)
- type Worker
- func (w *Worker) CreateEntry(args *mothershippb.ProcessRPMArgs) (*mothershippb.Entry, error)
- func (w *Worker) CreateTicket(ctx context.Context, batchName string) error
- func (w *Worker) DeleteEntry(name string) error
- func (w *Worker) ImportRPM(uri string, checksumSha256 string, osRelease string) (*mothershippb.ImportRPMResponse, error)
- func (w *Worker) RetractEntry(name string) (*mshipadminpb.RetractEntryResponse, error)
- func (w *Worker) SealBatch(name string) (*mothershippb.Batch, error)
- func (w *Worker) SetEntryIDFromRPM(entry string, uri string, checksumSha256 string) (*mothershippb.Entry, error)
- func (w *Worker) SetEntryState(entry string, state mothershippb.Entry_State, ...) (*mothershippb.Entry, error)
- func (w *Worker) SetWorkerLastCheckinTime(workerID string) error
- func (w *Worker) UpdateTicketStatus(ctx context.Context, entry *mothershippb.Entry) error
- func (w *Worker) VerifyResourceExists(uri string) error
- func (w *Worker) WaitForEntriesToSettle(ctx context.Context, req *mothershippb.SealBatchRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProcessRPMWorkflow ¶
func ProcessRPMWorkflow(ctx workflow.Context, args *mothershippb.ProcessRPMArgs) (*mothershippb.ProcessRPMResponse, error)
ProcessRPMWorkflow processes an SRPM. Usually a client worker will first initiate an upload to the storage backend, then send a request to the Server `SubmitEntry` method (or send a request then upload the resource).
func RetractEntryWorkflow ¶
func RetractEntryWorkflow(ctx workflow.Context, name string) (*mshipadminpb.RetractEntryResponse, error)
RetractEntryWorkflow retracts an entry. Should be used when an entry debranding is not considered fully complete. (Contains upstream trademarks for example) This will forcefully remove the commit from the git repository and set the entry state to RETRACTED. The same source (for the specific entry) can be re-imported by the client, either by calling DuplicateEntry or calling SubmitEntry with the same SRPM URI.
func SealBatchWorkflow ¶
func SealBatchWorkflow(ctx workflow.Context, req *mothershippb.SealBatchRequest) (*mothershippb.SealBatchResponse, error)
SealBatchWorkflow seals a batch. After a worker finishing submitting their entries, they can seal the batch. Sealing the batch will wait for all entries to reach a "stop" condition. This can mean "ARCHIVED" or "ON_HOLD". If all entries are in a stop condition, a new ticket is created in the ticketing system with the status of each entry. After creating the ticket, the batch is sealed and won't accept any more entries.
Types ¶
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func New ¶
func New(db *base.DB, storage storage.Storage, gpgKeys openpgp.EntityList, forge forge.Forge, bugtracker bugtracker.Bugtracker, rolling bool, publicURI string) *Worker
New creates a new Worker todo(mustafa): This is really ugly, we should probably just use the struct above directly
func (*Worker) CreateEntry ¶
func (w *Worker) CreateEntry(args *mothershippb.ProcessRPMArgs) (*mothershippb.Entry, error)
func (*Worker) CreateTicket ¶
func (*Worker) DeleteEntry ¶
func (*Worker) ImportRPM ¶
func (w *Worker) ImportRPM(uri string, checksumSha256 string, osRelease string) (*mothershippb.ImportRPMResponse, error)
ImportRPM imports an RPM into the database. This is a Temporal activity.
func (*Worker) RetractEntry ¶
func (w *Worker) RetractEntry(name string) (*mshipadminpb.RetractEntryResponse, error)
func (*Worker) SetEntryIDFromRPM ¶
func (w *Worker) SetEntryIDFromRPM(entry string, uri string, checksumSha256 string) (*mothershippb.Entry, error)
SetEntryIDFromRPM sets the entry ID from the RPM. This is a Temporal activity.
func (*Worker) SetEntryState ¶
func (w *Worker) SetEntryState(entry string, state mothershippb.Entry_State, importRpmRes *mothershippb.ImportRPMResponse) (*mothershippb.Entry, error)
func (*Worker) SetWorkerLastCheckinTime ¶
func (*Worker) UpdateTicketStatus ¶
func (*Worker) VerifyResourceExists ¶
VerifyResourceExists verifies that the resource exists. This is a Temporal activity.
func (*Worker) WaitForEntriesToSettle ¶
func (w *Worker) WaitForEntriesToSettle(ctx context.Context, req *mothershippb.SealBatchRequest) error