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

feat: get build status and trigger builds #3529

Merged
merged 6 commits into from
Feb 27, 2025

Conversation

leafty
Copy link
Member

@leafty leafty commented Feb 13, 2025

PR stack:

Update the UI for session environments created from code repositories.

  • Get the build status and show it in the session offcanvas
  • Allow users with edit permissions on the project to trigger builds and to cancel in-progress builds.

image

/deploy #notest renku=build/session-env-builders renku-data-services=kpack-resources renku-notebooks=leafty/shipwright-buildrun-cache extra-values=dataService.imageBuilders.enabled=true,dataService.imageBuilders.pushSecretName=flora-docker-secret,dataService.imageBuilders.buildRunRetentionAfterFailedSeconds=86400,dataService.imageBuilders.outputImagePrefix=harbor.dev.renku.ch/flora-dev/

@leafty leafty temporarily deployed to renku-ci-ui-3529 February 13, 2025 07:55 — with GitHub Actions Inactive
@RenkuBot
Copy link
Contributor

You can access the deployment of this PR at https://renku-ci-ui-3529.dev.renku.ch

@leafty leafty temporarily deployed to renku-ci-ui-3529 February 13, 2025 08:55 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ui-3529 February 13, 2025 10:58 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ui-3529 February 19, 2025 10:03 — with GitHub Actions Inactive
@leafty leafty force-pushed the leafty/session-env-builders-5 branch from 075a755 to ed5b564 Compare February 19, 2025 10:13
@leafty leafty temporarily deployed to renku-ci-ui-3529 February 19, 2025 10:13 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ui-3529 February 19, 2025 10:50 — with GitHub Actions Inactive
@leafty leafty changed the title wip: get build status and trigger builds feat: get build status and trigger builds Feb 24, 2025
@leafty leafty force-pushed the leafty/session-env-builders-5 branch from cda43c4 to 6fa806d Compare February 24, 2025 12:36
@leafty leafty temporarily deployed to renku-ci-ui-3529 February 24, 2025 12:37 — with GitHub Actions Inactive
@leafty leafty marked this pull request as ready for review February 24, 2025 13:52
@leafty leafty requested a review from a team as a code owner February 24, 2025 13:52
@leafty leafty temporarily deployed to renku-ci-ui-3529 February 24, 2025 13:52 — with GitHub Actions Inactive
Base automatically changed from leafty/session-env-builders-1 to build/session-env-builders February 24, 2025 15:49
Copy link
Member

@lorenzo-cavazzi lorenzo-cavazzi left a comment

Choose a reason for hiding this comment

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

Nice addition!
And the code is already great! I dropped a couple of suggestions/questions inline, only minor details.

Comment on lines +224 to +247
{isLoading ? (
<span>
<Loader className="me-1" inline size={16} />
Loading build status...
</span>
) : error || !builds ? (
<div>
<p className="mb-0">Error: could not load build status</p>
{error && <RtkOrNotebooksError error={error} dismissible={false} />}
</div>
) : lastBuild == null ? (
<span className="fst-italic">
This session environment does not have a build yet.
</span>
) : (
<div className="d-block">
<label className={cx("text-nowrap", "mb-0", "me-2")}>
Last build status:
</label>
<span>
<BuildStatusBadge status={lastBuild.status} />
</span>
</div>
)}
Copy link
Member

Choose a reason for hiding this comment

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

Question: would it make sense to keep the "label + span" pattern to have more consistency? E.G. always <label>Last build</label> and then "loading" | "no builds yet" | badge.
Of course, it doesn't apply in the case of an error.

Copy link
Member Author

Choose a reason for hiding this comment

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

I am not sure I feel a need for consistency here. For example, we can have this:
image

This does not look out-of-place to me.

Also, on another note, <label> outside of a <form> should be forbidden. <label> is an HTML element made to label form inputs and not other things. In this case the <dl> element would be the most fitting (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl).

Copy link
Member

Choose a reason for hiding this comment

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

I'd say consistent is usually better than non-consistent. The content might be easier to parse for users.
However, on the offcanvas, we don't have consistency in other places so this isn't a blocker. Feel free to merge it as-is if you think it's good enough.

@leafty leafty merged commit 6733d65 into build/session-env-builders Feb 27, 2025
12 checks passed
@leafty leafty deleted the leafty/session-env-builders-5 branch February 27, 2025 08:14
@RenkuBot
Copy link
Contributor

Tearing down the temporary RenkuLab deplyoment for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants