Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

|OTTER] Status filter not working for "any error"



  • Hi,
    Just to report a small bug and and an observation
    The bug :
    In the server section, the status filter is not working for "any error"

    The observation:
    The filter list
    ffed0a4e-5569-4d7e-bc07-d9b848f367e7-image.png

    is not consistant with existing status
    875dbeea-7026-4283-8680-4ce4679c58c1-image.png

    65b84700-89b4-4506-b0d0-2a06dba4c883-image.png

    Otter last docker version
    Best regards
    PhilippeC.


  • inedo-engineer

    Thanks for the bug report @philippe-camelio_3885 !

    I logged as OT-508 , and we'll target it an upcoming maintenance release :)


  • inedo-engineer

    Hi @philippe-camelio_3885 ,

    I looked at this one more closely, and it's behaving as expected.

    "any error" means AgentError, CollectionError, or RemediationError. There are many other statuses, and the page doesn't filter on all of them (including NoRoles or Unknown).

    The status scenario is complex 😫

    If you are curious to the logic

    string getStatus()
    {
        if (!server.Active_Indicator)
            return Disabled;
        
        if (server.HasNullAgent())
            return Unknown;
        if (!server.HasLocalAgent())
        {
            if (server.AgentStatus_Code == Domains.AgentStatusCode.Error)
                return AgentError;
            if (server.AgentStatus_Code == Domains.AgentStatusCode.Updating)
                return AgentUpdating;
            if (server.AgentStatus_Code == Domains.AgentStatusCode.Unknown)
                return Unknown;
        }
    
        if (server.RoutineConfigurationUsage_Code == Domains.ServerRoutineConfigurationUsage.None)
            return NoCollection;
        if (!server.HasRoles_Indicator)
            return NoRoles;
        if (server.LatestCollection_Execution_Id == null)
            return Unknown;
        if (server.LatestCollection_ExecutionRunState_Code == Domains.ExecutionRunState.Executing)
            return Collecting;
        if (server.LatestCollection_ExecutionStatus_Code == Domains.ExecutionStatus.Error)
            return CollectionError;
    
        if (server.LatestRemediation_ExecutionRunState_Code == Domains.ExecutionRunState.Executing)
            return Collecting;
        if (server.PendingRemediation_Indicator)
            return PendingRemediation;
        if (server.LatestRemediation_ExecutionStatus_Code == Domains.ExecutionStatus.Error)
            return RemediationError;
    
        if (server.ConfigurationState_Code == Domains.ConfigurationState.Current)
            return Current;
    
        if (server.ConfigurationState_Code == Domains.ConfigurationState.Drifted)
            return Drifted;
    
        return Unknown;
    }
    

    Of course it could be improved, but perhaps another day 🤷

    Best,
    Alana



  • @atripp 😂
    Thanks for the update


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation