Skip to content

Conversation

@jbern0rd
Copy link
Contributor

@jbern0rd jbern0rd commented Nov 5, 2025

No description provided.

@jbern0rd jbern0rd self-assigned this Nov 5, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 5, 2025

@jbern0rd jbern0rd marked this pull request as ready for review November 6, 2025 09:52
@jbern0rd jbern0rd requested review from Natchica, Copilot, nabil-Tounarti and thewhitewizard and removed request for Natchica November 6, 2025 09:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors error handling in TEE services configuration by moving validation logic from PreComputeService to TeeServicesPropertiesService. The key change is that retrieveTeeServicesProperties now returns a list of WorkflowError instead of throwing exceptions, enabling better error propagation and handling.

  • Enclave configuration validation (null checks, validity checks, heap size validation) is moved from PreComputeService.runTeePreCompute() to TeeServicesPropertiesService.retrieveTeeServicesProperties()
  • Method getTeeServicesProperties now returns cached properties or null, while retrieveTeeServicesProperties performs validation and caching
  • Exception-based error handling replaced with WorkflowError return values for better error flow control

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
TeeServicesPropertiesService.java Refactored to perform enclave validation and return WorkflowError list instead of throwing exceptions; properties now cached only on success
TeeService.java Updated to call retrieveTeeServicesProperties and return its error list directly instead of catching exceptions
PreComputeService.java Removed enclave configuration validation logic that was moved to TeeServicesPropertiesService
TeeSconeServiceTests.java Updated tests to match new API (returns List<WorkflowError> instead of throwing exceptions); consolidated two test cases into one parameterized test
TeeServicesPropertiesServiceTests.java Updated tests to validate new error-returning behavior instead of exception-throwing behavior; added new test cases for heap size validation
PreComputeServiceTests.java Removed tests for enclave validation logic that was moved to TeeServicesPropertiesService

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jbern0rd jbern0rd merged commit 7c11687 into main Nov 6, 2025
9 checks passed
@jbern0rd jbern0rd deleted the feature/check-app-enclave-configuration-early branch November 6, 2025 13:55
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.

5 participants