Skip to content

feat: add precise pre-deployment workflow readiness checks#923

Draft
mertilginoglu wants to merge 1 commit intostagingfrom
feat/precise-pre-deployment-readiness
Draft

feat: add precise pre-deployment workflow readiness checks#923
mertilginoglu wants to merge 1 commit intostagingfrom
feat/precise-pre-deployment-readiness

Conversation

@mertilginoglu
Copy link
Contributor

Motivation

Description

Testing Instructions

Prerequisites:

  • GitHub Account without having any additional access-rights (e.g. admin, owner)
  • ...

Flow:

  1. Log in to Helios as a Developer
  2. Navigate to Settings
  3. ...

Screenshots

Checklist

General

Server

  • Code is performant and follows best practices
  • I documented the Java code using JavaDoc style.

Client

  • I documented the TypeScript code using JSDoc style.
  • I added multiple screenshots/screencasts of my UI changes.
  • I translated all newly inserted strings into English and German.

@codacy-production
Copy link

codacy-production bot commented Mar 20, 2026

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.73% (target: -1.00%) 84.13%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (437fcaa) 8387 2715 32.37%
Head commit (8ee086f) 8509 (+122) 2817 (+102) 33.11% (+0.73%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#923) 126 106 84.13%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

String branch, String headSha, Long repositoryId);

Optional<WorkflowRun>
findFirstByWorkflow_IdAndRepository_RepositoryIdAndHeadBranchAndHeadShaOrderByCreatedAtDesc(

Choose a reason for hiding this comment

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

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.naming.MethodNameCheck> reported by reviewdog 🐶
Method name 'findFirstByWorkflow_IdAndRepository_RepositoryIdAndHeadBranchAndHeadShaOrderByCreatedAtDesc' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.


Workflow deploymentWorkflow = environment.getDeploymentWorkflow();
if (deploymentWorkflow != null) {
Set<Long> requiredWorkflowIds = workflows.stream().map(Workflow::getId).collect(Collectors.toSet());

Choose a reason for hiding this comment

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

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck> reported by reviewdog 🐶
Line is longer than 100 characters (found 106).

Environment environment =
environmentRepository
.findById(environmentId)
.orElseThrow(() -> new EntityNotFoundException("Environment not found with ID: " + environmentId));

Choose a reason for hiding this comment

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

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck> reported by reviewdog 🐶
Line is longer than 100 characters (found 111).

.toList();

boolean hasFailed = workflowStatuses.stream()
.anyMatch(status -> status.status() == EnvironmentDeploymentReadinessDto.WorkflowStatus.FAILED);

Choose a reason for hiding this comment

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

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck> reported by reviewdog 🐶
Line is longer than 100 characters (found 104).

boolean hasFailed = workflowStatuses.stream()
.anyMatch(status -> status.status() == EnvironmentDeploymentReadinessDto.WorkflowStatus.FAILED);
boolean hasWaiting = workflowStatuses.stream()
.anyMatch(status -> status.status() == EnvironmentDeploymentReadinessDto.WorkflowStatus.WAITING);

Choose a reason for hiding this comment

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

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck> reported by reviewdog 🐶
Line is longer than 100 characters (found 105).

import jakarta.persistence.JoinColumn;
import jakarta.persistence.JoinTable;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.ManyToMany;

Choose a reason for hiding this comment

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

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck> reported by reviewdog 🐶
Wrong lexicographical order for 'jakarta.persistence.ManyToMany' import. Should be before 'jakarta.persistence.ManyToOne'.

Exception exception =
assertThrows(
EnvironmentException.class,
() -> environmentService.updateEnvironment(1L, EnvironmentDto.fromEnvironment(environment)));

Choose a reason for hiding this comment

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

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck> reported by reviewdog 🐶
Line is longer than 100 characters (found 105).

when(environmentRepository.findById(1L)).thenReturn(Optional.of(environment));
when(
workflowRunRepository
.findFirstByWorkflow_IdAndRepository_RepositoryIdAndHeadBranchAndHeadShaOrderByCreatedAtDesc(

Choose a reason for hiding this comment

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

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck> reported by reviewdog 🐶
Line is longer than 100 characters (found 109).

when(environmentRepository.findById(1L)).thenReturn(Optional.of(environment));
when(
workflowRunRepository
.findFirstByWorkflow_IdAndRepository_RepositoryIdAndHeadBranchAndHeadShaOrderByCreatedAtDesc(

Choose a reason for hiding this comment

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

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck> reported by reviewdog 🐶
Line is longer than 100 characters (found 109).

when(environmentRepository.findById(1L)).thenReturn(Optional.of(environment));
when(
workflowRunRepository
.findFirstByWorkflow_IdAndRepository_RepositoryIdAndHeadBranchAndHeadShaOrderByCreatedAtDesc(

Choose a reason for hiding this comment

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

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck> reported by reviewdog 🐶
Line is longer than 100 characters (found 109).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant