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

NEXT-37313 - api client reauthentication #17

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

ennasus4sun
Copy link
Contributor

No description provided.

@ennasus4sun ennasus4sun requested a review from MalteJanz July 31, 2024 11:51
@ennasus4sun ennasus4sun force-pushed the next-37313/api-client-reauthentication branch from 1900da8 to f215b59 Compare July 31, 2024 14:15
Copy link
Contributor

@MalteJanz MalteJanz left a comment

Choose a reason for hiding this comment

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

Overall great work 🦀 👍

src/api/mod.rs Outdated Show resolved Hide resolved
src/api/mod.rs Outdated Show resolved Hide resolved
src/api/mod.rs Outdated Show resolved Hide resolved
src/api/mod.rs Outdated Show resolved Hide resolved
src/api/mod.rs Outdated Show resolved Hide resolved
@LarsKemper LarsKemper added the enhancement New feature or request label Aug 1, 2024
@ennasus4sun ennasus4sun force-pushed the next-37313/api-client-reauthentication branch 5 times, most recently from d474f78 to 812728c Compare August 2, 2024 12:44
@LarsKemper LarsKemper changed the title api client reauthentication NEXT-37313 - api client reauthentication Aug 2, 2024
@ennasus4sun ennasus4sun force-pushed the next-37313/api-client-reauthentication branch from 812728c to 7808daa Compare August 8, 2024 06:03
@ennasus4sun
Copy link
Contributor Author

I tested this manually by importing a csv-file with 10.000 manufacturers and setting the expires-time of access_token_ttl in src/Core/Framework/DependencyInjection/Configuration.php to PT1S (1 second).

Copy link
Contributor

@MalteJanz MalteJanz left a comment

Choose a reason for hiding this comment

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

Great that it worked 👍 . I added some smaller suggestions to improve / refactor the implementation a bit further 🙂

src/api/mod.rs Outdated Show resolved Hide resolved
src/api/mod.rs Outdated Show resolved Hide resolved
src/api/mod.rs Outdated Show resolved Hide resolved
@ennasus4sun ennasus4sun force-pushed the next-37313/api-client-reauthentication branch 2 times, most recently from b10cc17 to 06b6b48 Compare August 8, 2024 11:53
Copy link
Member

@LarsKemper LarsKemper left a comment

Choose a reason for hiding this comment

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

LGTM 💪

@ennasus4sun ennasus4sun force-pushed the next-37313/api-client-reauthentication branch 3 times, most recently from e5cc1d3 to c9c394e Compare August 12, 2024 10:12
src/api/mod.rs Show resolved Hide resolved
src/api/mod.rs Outdated Show resolved Hide resolved
@ennasus4sun ennasus4sun force-pushed the next-37313/api-client-reauthentication branch from c9c394e to 8709091 Compare August 12, 2024 12:41
@ennasus4sun ennasus4sun force-pushed the next-37313/api-client-reauthentication branch from 8709091 to cd72daa Compare August 12, 2024 12:43
@ennasus4sun ennasus4sun force-pushed the next-37313/api-client-reauthentication branch from cd72daa to e10f1b2 Compare August 12, 2024 12:55
Copy link

Summary of the total line code coverage for the whole codebase

Total lines Covered Skipped % (pr) % (main)
1902 1070 832 56.26 56.73
Summary of each file (click to expand)
File Total lines Covered Skipped %
src/api/filter.rs 171 168 3 98.25
src/api/mod.rs 311 31 280 9.97
src/cli.rs 43 30 13 69.77
src/config_file.rs 75 55 20 73.33
src/data/export.rs 136 0 136 0.00
src/data/import.rs 137 0 137 0.00
src/data/transform/mod.rs 334 259 75 77.54
src/data/transform/script.rs 263 229 34 87.07
src/data/validate.rs 298 298 0 100.00
src/main.rs 134 0 134 0.00
More details (click to expand)

Download full HTML report

You can download the full HTML report here: click to download
Hint: You need to extract it locally and open the index.html, there you can see which lines are not covered in each file.

You can also generate these reports locally

For that, you need to install cargo-llvm-cov, then you can run:

cargo llvm-cov --all-features --no-fail-fast --open

Hint: There are also other ways to see code coverage in Rust. For example with RustRover, you can execute tests with coverage generation directly in the IDE.

Remember

Your tests should be meaningful and not just be written to raise the coverage.
Coverage is just a tool to detect forgotten code paths you may want to think about, not your instructor to write tests

Copy link
Contributor

@MalteJanz MalteJanz left a comment

Choose a reason for hiding this comment

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

Looks great now 👍 . Sorry for bringing up things while you still worked on it. Maybe we should introduce the same "workflow:development" labels as we have in gitlab 🤷‍♂️ .

Feel free to merge 😉

@ennasus4sun ennasus4sun marked this pull request as draft August 12, 2024 13:27
@ennasus4sun ennasus4sun marked this pull request as ready for review August 12, 2024 13:32
@ennasus4sun ennasus4sun merged commit ef5a438 into main Aug 12, 2024
3 checks passed
@ennasus4sun ennasus4sun deleted the next-37313/api-client-reauthentication branch August 12, 2024 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants