GithubHelp home page GithubHelp logo

autorest-ci's People

Contributors

olydis avatar

Watchers

 avatar

autorest-ci's Issues

Architecture proposal (to myself) - WIP

Goal:

  • no race conditions (multiple workers stealing same job, swallowed PR update), but also no heuristical race condition checks
  • immediate CI icon appearance
  • requesting CI restart

Solution: two jobs

  1. Watcher/Scheduler
  • run exactly on instance, centrally
  • keeps STATE about repos.
    • TODO: draw state machine
    • hammers through all repos and PRs and classifies, e.g. "pending":"[assign {SESSION UID}] New PR", "pending":"[assign {SESSION UID}] Updated PR", "pending":"[assign {SESSION UID}] Previous worker looks dead"
    • if in state "[assign]" and sees "[assign_me {SESSION UID} {WORKER ID}]" => set "[launch {SESSION UID} {WORKER ID}]"
    • if in state "[launch]" and see message not by "{SESSION ID}", hammer over it with "[launch]". Leave this state (into "observant {WID} {SID}" state) only if message by expected session seen.
    • waits for status by worker indicating success/failures => transition into such state, strip away "[...]" and actually send that status (and continue to do so if anyone overwrites)
  1. Worker
  • only ever sends "pending" status!
  • iterates PRs and checks for:
    • [assign {SESSION UID}] => [assign_me {SESSION UID} {WORKER ID}]
    • [launch {MY WORKER ID} {SESSION ID}] => while running [running {MY WORKER ID} {SESSION ID}] status

TODO: create Coq proofs for properties:

  • new/updated/stalled PRs lead to assignment phase
  • for each PR, if pending => if worker exists, worker will be assigned
  • at most 1 worker working on PR

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.