Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(site): update agent status to include the lifecycle #5835

Merged
merged 4 commits into from
Jan 24, 2023

Conversation

BrunoQuaresma
Copy link
Collaborator

@BrunoQuaresma BrunoQuaresma commented Jan 24, 2023

Updating the FE, specifically the component to handle the new agent's lifecycles.

Refs: #5749

@BrunoQuaresma BrunoQuaresma self-assigned this Jan 24, 2023
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice job @BrunoQuaresma! I tried it out locally and it looks like the behavior is on-point.

The only comment I have is that visually the "red" for error isn't very noticeable for me (not sure if my slight color blindness plays a role), but the warning color is much more noticeable/full, and the red looks faded (almost gray/pink).

Warning:
image
Error:
image

<StartErrorLifecycle agent={agent} />
</Cond>
<Cond>
<StartingLifecycle />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will catch both early created and starting states, so this is fine! In the future we'll have states for shutting down as well.

site/src/i18n/en/agent.json Outdated Show resolved Hide resolved
@mafredri
Copy link
Member

mafredri commented Jan 24, 2023

@BrunoQuaresma @kylecarbs @bpmct should we label this as a breaking release?

Once this is deployed, and users update to provider v0.6.7+, users will start to see that agents time out during start (default 5 minutes). If they're using startup script to launch a service synchronously, then they'll run into it.

(PS. Even if they don't update provider, agent will remain in "starting" state indefinitely which doesn't hamper usage but might be weird.)

@kylecarbs
Copy link
Member

Could you post a screenshot of the hover over the icon?

I think breaking is alright if we provide some good documentation to fix this, but not if we don't. FWIW we could tell users to use screen for long-running processes in the meantime, and it'll have roughly the same effect as before.

@mafredri
Copy link
Member

@kylecarbs

image

image

We definitely want to improve documentation around this, we already mention checking logs @ the end of that troubleshooting link, but we can more explicitly mention the states and what log is relevant.

@kylecarbs
Copy link
Member

I think it's bad to break unless we explicitly state that the startup script is taking too long to complete. We can also mention that we broke this in X release, and read the docs here to migrate.

@mafredri
Copy link
Member

mafredri commented Jan 24, 2023

Sure, let's improve the wording and perhaps add a second link 👍🏻. This is mostly a soft-break, though, as the experience is basically the same except for this visual indication here.

In the CLI this is going to be basically opt-in by upgrading provider and setting delay_login_until_ready = true.

(We could btw use the same property, delay login, for UI feature enabling.)

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
@BrunoQuaresma
Copy link
Collaborator Author

@mafredri about the colors, it is a known issue. I'm going to try to fix that in a next PR.

@@ -284,65 +280,4 @@ describe("WorkspacePage", () => {
})
})
})

describe("Resources", () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really think tests like these should live in Storybook. Integration tests should be used for user interactions IMO.

@BrunoQuaresma BrunoQuaresma changed the title refactor: update agent status to include the lifecycle refactor(site): update agent status to include the lifecycle Jan 24, 2023
@BrunoQuaresma BrunoQuaresma merged commit bef9e72 into main Jan 24, 2023
@BrunoQuaresma BrunoQuaresma deleted the bq/update-agent-status branch January 24, 2023 17:48
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants