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

Change maxParallelSession type to Option<u8> #383

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

div-seungha
Copy link
Contributor

Closes: #382

Copy link

codecov bot commented Jan 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.33%. Comparing base (f7c31d6) to head (81a2a61).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #383   +/-   ##
=======================================
  Coverage   71.33%   71.33%           
=======================================
  Files          67       67           
  Lines       14685    14685           
=======================================
  Hits        10476    10476           
  Misses       4209     4209           

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

@div-seungha div-seungha changed the title Change maxParallelSession type to Option<u32> [WIP] Change maxParallelSession type to Option<u32> Jan 7, 2025
@div-seungha div-seungha force-pushed the div/max-parallel-session-type-fix branch from a5847bc to 2f123f2 Compare January 7, 2025 06:08
@div-seungha div-seungha changed the title [WIP] Change maxParallelSession type to Option<u32> Change maxParallelSession type to Option<i32> Jan 7, 2025
@div-seungha div-seungha changed the title Change maxParallelSession type to Option<i32> [WIP] Change maxParallelSession type to Option<i32> Jan 7, 2025
@sehkone
Copy link
Contributor

sehkone commented Jan 13, 2025

@div-seungha,

Since the corresponding review-database has been updated, I think this PR should proceed. Could you do that?

@div-seungha div-seungha force-pushed the div/max-parallel-session-type-fix branch from 2f123f2 to 7572961 Compare January 13, 2025 07:26
@div-seungha div-seungha changed the title [WIP] Change maxParallelSession type to Option<i32> Change maxParallelSession type to Option<i32> Jan 13, 2025
@div-seungha div-seungha force-pushed the div/max-parallel-session-type-fix branch from 7572961 to e1045b0 Compare January 13, 2025 07:33
@div-seungha
Copy link
Contributor Author

div-seungha commented Jan 13, 2025

@div-seungha,

Since the corresponding review-database has been updated, I think this PR should proceed. Could you do that?

I have rebased on the latest main branch and replaced the previously used and_thenand try_from with map and from in the relevant code. The new commit has been pushed.

CHANGELOG.md Outdated
@@ -58,6 +58,10 @@ Versioning](https://semver.org/spec/v2.0.0.html).
set to an empty string were not saved to the `config` in the database.
- Fixed an issue where configuration conversion failures were silently ignored,
leading to incorrect None handling.
- Changed `maxParallelSession` in `Account` to `Option<i32>.` Previously,
`maxParallelSession` was returned as a `Option<StringNumber>` type. However,
Copy link
Contributor

Choose a reason for hiding this comment

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

  • I think we need to mention that this changelog entry is related to GraphQL API.
  • Is maxParallelSession in Account changed to Option<i32>. ?
  • I think it would be beneficial to clarify that the field is within the u8 range.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have modified the changelog to contain the meaning more clearly.

@sehkone
Copy link
Contributor

sehkone commented Jan 13, 2025

In addition to mentioning the range in the Changelog, GraphQL documentation should be updated accordingly.

@div-seungha div-seungha force-pushed the div/max-parallel-session-type-fix branch 3 times, most recently from 2622565 to 0a0ec6c Compare January 13, 2025 08:24
@div-seungha
Copy link
Contributor Author

In addition to mentioning the range in the Changelog, GraphQL documentation should be updated accordingly.

Is it correct that the "GraphQL documentation" you mentioned means line 677? If correct, I pushed the revised commit.

CHANGELOG.md Outdated
Comment on lines 61 to 62
- The `maxParallelSession` field in `Account` has been updated to `Option<i32>`,
replacing the previous `Option<StringNumber>` type. In the review-database,
Copy link
Contributor

@sophie-cluml sophie-cluml Jan 13, 2025

Choose a reason for hiding this comment

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

- The `maxParallelSession` field in `Account` has been updated to `Option<i32>`,
  replacing the previous `Option<StringNumber>` type. 

는 지칭하는 것이 잘못되었습니다. 올바르게 적어주세요.

CHANGELOG.md Outdated
Comment on lines 60 to 66
leading to incorrect None handling.
- The `maxParallelSession` field in `Account` has been updated to `Option<i32>`,
replacing the previous `Option<StringNumber>` type. In the review-database,
the `max_parallel_sessions` type has been changed from `Option<u32>` to
`Option<u8>`, with the related code updated accordingly. Since GraphQL does
not support unsigned integers, the type has been replaced with the signed type
`Option<i32>`, which can accommodate the `Option<u8>` values.
Copy link
Contributor

Choose a reason for hiding this comment

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

유저 관점에서, 유저가 알아야 하는 정보를 적어주세요.

@div-seungha div-seungha force-pushed the div/max-parallel-session-type-fix branch from 0a0ec6c to c704d4a Compare January 13, 2025 09:12
CHANGELOG.md Outdated
Comment on lines 61 to 66
- Updated the `maxParallelSessions` field in `Account` to Option<i32>, replacing
the previous `Option<StringNumber>` type. This change aligns with the update
in the review-database, where the `max_parallel_sessions` type was changed
from `Option<u32>` to `Option<u8>`. Since GraphQL does not support unsigned
integers, `Option<i32>` was chosen to ensure compatibility while accommodating
the `Option<u8>` values.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think a quick sync meeting for this might help us, @div-seungha would be up for it for a second?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I revised the commit considering we talked about in a separate communication channel.

@div-seungha div-seungha force-pushed the div/max-parallel-session-type-fix branch 2 times, most recently from b7e1894 to 62d4850 Compare January 14, 2025 03:09
CHANGELOG.md Outdated
- The `account` and related queries such as `accountList` now return
`maxParallelSessions` as an `Int` within the range of `u8`.
- The `insertAccount` and `updateAccount` GraphQL APIs remain unchanged in
their interfaces but now only accept `maxParallelSessions` parameters within
Copy link
Contributor

Choose a reason for hiding this comment

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

Does updateAccount have maxParallelSessions parameter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but now only accept parameters related to max parallel sessions within the range of u8.

No, It was my mistake. I have just modified the sentence.

@div-seungha div-seungha force-pushed the div/max-parallel-session-type-fix branch from 62d4850 to 81a2a61 Compare January 14, 2025 04:40
@sehkone sehkone changed the title Change maxParallelSession type to Option<i32> Change maxParallelSession type to Option<u8> Jan 14, 2025
@sehkone sehkone merged commit 355031d into main Jan 14, 2025
10 checks passed
@sehkone sehkone deleted the div/max-parallel-session-type-fix branch January 14, 2025 11:07
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.

Change maxParallelSession return type from StringNumber to integer
3 participants