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

Add result struct to activity function signature #881

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

Diogenesoftoronto
Copy link
Contributor

@Diogenesoftoronto Diogenesoftoronto commented Mar 8, 2024

closes #800

@Diogenesoftoronto Diogenesoftoronto changed the title dev/issue-800-add-result-struct Add result struct to activity function signature Mar 8, 2024
Copy link

codecov bot commented Mar 8, 2024

Codecov Report

Attention: Patch coverage is 12.69841% with 55 lines in your changes are missing coverage. Please review.

Project coverage is 47.12%. Comparing base (620f36f) to head (8318770).
Report is 7 commits behind head on main.

❗ Current head 8318770 differs from pull request most recent head cf21f7d. Consider uploading reports for the commit cf21f7d to get more accurate results

Files Patch % Lines
internal/workflow/local_activities.go 0.00% 18 Missing ⚠️
internal/storage/activities/copy.go 0.00% 9 Missing ⚠️
internal/workflow/activities/upload.go 22.22% 7 Missing ⚠️
internal/workflow/activities/storage.go 0.00% 6 Missing ⚠️
internal/workflow/activities/bundle.go 0.00% 5 Missing ⚠️
internal/workflow/activities/cleanup.go 0.00% 4 Missing ⚠️
internal/workflow/activities/delete_original.go 0.00% 2 Missing ⚠️
internal/workflow/activities/dispose_original.go 0.00% 2 Missing ⚠️
internal/workflow/activities/download.go 50.00% 1 Missing ⚠️
internal/workflow/activities/zip.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #881      +/-   ##
==========================================
- Coverage   47.27%   47.12%   -0.15%     
==========================================
  Files          94       94              
  Lines        5096     5135      +39     
==========================================
+ Hits         2409     2420      +11     
- Misses       2466     2492      +26     
- Partials      221      223       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Diogenesoftoronto Diogenesoftoronto self-assigned this Mar 8, 2024
@Diogenesoftoronto Diogenesoftoronto marked this pull request as ready for review March 8, 2024 19:52
Copy link
Collaborator

@djjuhasz djjuhasz left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

Copy link
Contributor

@sevein sevein left a comment

Choose a reason for hiding this comment

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

Your approach is nearly correct; however, I've noticed an oversight. You're returning a nil pointer instead of a pointer to the result struct when there's no error. I'll highlight a few examples, although I've observed this issue in several places.

@Diogenesoftoronto Diogenesoftoronto force-pushed the dev/issue-800-add-result-struct branch 2 times, most recently from 7171ffe to c09bf29 Compare March 12, 2024 22:14
@Diogenesoftoronto
Copy link
Contributor Author

I made the recommend changes in the new commits. I also added some comments with my thoughts as a whole.

@sevein
Copy link
Contributor

sevein commented Mar 13, 2024

Can you rebase? 🙏

@Diogenesoftoronto Diogenesoftoronto force-pushed the dev/issue-800-add-result-struct branch 3 times, most recently from 8318770 to cf21f7d Compare March 13, 2024 19:11
- Change tests so that they expect empty structs and errors as returns.

[skip codecov]
@Diogenesoftoronto Diogenesoftoronto force-pushed the dev/issue-800-add-result-struct branch from cf21f7d to 880c5ec Compare March 14, 2024 16:13
@Diogenesoftoronto Diogenesoftoronto merged commit 880c5ec into main Mar 14, 2024
11 checks passed
@Diogenesoftoronto Diogenesoftoronto deleted the dev/issue-800-add-result-struct branch March 14, 2024 16:14
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.

Problem: some activities only return error
3 participants