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

backend: use device returned in ExposeVolume response #61

Merged
merged 1 commit into from
Dec 7, 2024

Conversation

adityamaru
Copy link

@adityamaru adityamaru commented Dec 7, 2024

Important

Use device from ExposeVolume response in main.ts instead of hardcoded path.

  • Behavior:
    • Use device from ExposeVolume response instead of hardcoded /dev/vdb.
    • Update getStickyDisk() to return device and expose_id.
    • Modify startBuildkitd() and writeBuildkitdTomlFile() to accept device as a parameter.
  • Functions:
    • Update getStickyDisk() to return {expose_id, device}.
    • Modify startBuildkitd() and writeBuildkitdTomlFile() to include device parameter.
    • Update getBuilderAddr() to handle device from getStickyDisk().
  • Misc:
    • Remove unused device constant.

This description was created by Ellipsis for edc01b3. It will automatically update as commits are pushed.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to 52a75cf in 44 seconds

More details
  • Looked at 86 lines of code in 1 files
  • Skipped 2 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. src/main.ts:235
  • Draft comment:
    Consider adding error handling for cases where both expose_id and device are empty. This will help in identifying issues early if the ExposeVolume response does not return the expected values.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The function getStickyDisk returns an object with empty strings for expose_id and device if they are not set. The comment suggests adding error handling for this case, which could be useful to identify issues early. However, the current implementation already handles this by returning empty strings, which might be the intended behavior.
    The comment assumes that returning empty strings is not sufficient error handling, but it might be the intended behavior. Without more context on how this function is used, it's hard to say if additional error handling is necessary.
    The comment could be useful if the empty strings are not the intended behavior and could lead to issues elsewhere in the code. However, without evidence that this is the case, the comment might not be necessary.
    The comment suggests adding error handling for empty expose_id and device, but the current implementation already returns empty strings, which might be intended. Without evidence that this is an issue, the comment should be deleted.
2. src/main.ts:439
  • Draft comment:
    Consider adding validation for the device variable to ensure it is not empty or invalid before using it in operations like maybeFormatBlockDevice and mounting.
  • Reason this comment was not posted:
    Marked as duplicate.
3. src/main.ts:232
  • Draft comment:
    Consider adding error handling for cases where device is missing or invalid to prevent issues in subsequent operations.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_qmtRGO7cZBzNRbli


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

src/main.ts Show resolved Hide resolved
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on edc01b3 in 19 seconds

More details
  • Looked at 89 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. src/main.ts:443
  • Draft comment:
    The error message 'No device returned from ExportVolume request' should be more specific, such as including the response data for better debugging.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The error message should be more specific to help with debugging.

Workflow ID: wflow_JtVamPALjbhiyMps


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@adityamaru adityamaru merged commit 96821d6 into master Dec 7, 2024
1 check passed
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.

1 participant