sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Add `run_command_async`

Open justindbaur opened this issue 1 year ago â€ĸ 4 comments

đŸŽŸī¸ Tracking

📔 Objective

  • Bumps .NET to 8 (latest LTS)
  • Uses [LibraryImport] for auto-marshalling of function
  • Adds run_command_async method in bitwarden-c that allows for a non-blocking call that can notify the caller when the action is completed.
  • Task-ifies one of the C# SDK calls into the SDK.
    • This only updates one method to be async for now but all of them can be changed
    • This is a breaking change so would be a good idea before a 1.0.0 release.

📸 Screenshots

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

đŸĻŽ Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or â„šī¸ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or âš ī¸ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or â™ģī¸ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

justindbaur avatar Aug 23 '24 17:08 justindbaur

Logo Checkmarx One – Scan Summary & Details – 378e25fb-523f-4a8a-8b9c-2bc6f067f609

Great job, no security vulnerabilities found in this Pull Request

github-actions[bot] avatar Aug 23 '24 17:08 github-actions[bot]

Codecov Report

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

Project coverage is 9.68%. Comparing base (81dc653) to head (16fde2c). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crates/bitwarden-c/src/c.rs 0.00% 39 Missing :warning:
crates/bitwarden-json/src/client.rs 0.00% 15 Missing :warning:
crates/bitwarden-json/src/command.rs 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff            @@
##             main    #993      +/-   ##
=========================================
- Coverage   10.17%   9.68%   -0.49%     
=========================================
  Files          19      19              
  Lines        1101    1156      +55     
=========================================
  Hits          112     112              
- Misses        989    1044      +55     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Aug 23 '24 17:08 codecov[bot]

I added support for CancellationToken which will cancel an ongoing call to rust. To ensure I did this correctly I added some debug only commands. I also converted all the C# methods to be Task returning and to optionally take a CancellationToken.

justindbaur avatar Sep 05 '24 01:09 justindbaur

I added SM as reviewers, we should try and get this in before the 1.0 release of the C# sdk.

Hinton avatar Sep 09 '24 09:09 Hinton