Skip to content
  • Dato Simó's avatar
    Instance.hs: rename 'tags' to 'exclTags', provide 'allTags' · 2f907bad
    Dato Simó authored
    
    
    The mergeData function in Loader.hs included a step to filter an instance's
    tags to include only the exclusion tags (as specified via the commandline,
    or cluster-level tags). Later on, code in Node.hs assumed Instance.tags to
    contain only tags to be used for exclusion.
    
    Because in the future we will need to access the full list of an instance's
    tags (and not only exclusion tags), this commits deprecates the 'tags'
    field, and introduces Instance.exclTags and Instance.allTags.
    
    Instance.allTags is now populated from the different backends (Text, Luxi,
    Rapi, etc.), and Instance.exclTags is only populated from Loader.mergeData,
    as was done previously. This means that loading tags from e.g. Text or Simu
    and assuming that they'll be used as exclusion tags without going through
    Loader.hs will no longer work; but this was already the case with other
    fields, and 'mergeData' or 'loadExternalData' continue to be the only entry
    points to get a consistent view of the cluster. (Additionally, there were
    no tests that made this assumption that I could find.)
    
    Signed-off-by: default avatarDato Simó <dato@google.com>
    Reviewed-by: default avatarIustin Pop <iustin@google.com>
    2f907bad