Uploaded image for project: 'Apache YuniKorn'
  1. Apache YuniKorn
  2. YUNIKORN-186

clean up events in k8shim

    XMLWordPrintableJSON

Details

    Description

      The events in the shim use a complex structure with functions declared. However one of the functions is hardcoded to always return nil, one is used to pass a the ID of the object it is called on around which we can also get in the handler and the last one is to get the wrapped event. The event can be simplified a lot.
      The state machine and events are declared in separate files. They should be moved into one file to show the dependency between the two and make sure they are aligned.
      States are maintained disconnected from the state machine and events. State, events and the state machine should all be in the same location

      We can simplify this structure similar to what we use in the core:

      • no large object passed around
      • make the event type an int, implement using an iota
      • implement a string() function on the state and type
      • split the state type into a state per object and not one global list

      Attachments

        Issue Links

          Activity

            People

              steinsgateted Ted Lin
              wilfreds Wilfred Spiegelenburg
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: