Fix Issue #14: Return success information from SubmitConfig.Run()#35
Open
kallal79 wants to merge 1 commit intoveraison:mainfrom
Open
Fix Issue #14: Return success information from SubmitConfig.Run()#35kallal79 wants to merge 1 commit intoveraison:mainfrom
kallal79 wants to merge 1 commit intoveraison:mainfrom
Conversation
…un() - Change Run() method signature from error to (*SubmitSession, error) - Allow callers to access success status, expiry time, and details - Update pollForSubmissionCompletion() to return session information - Update all tests to handle new API signature - Add comprehensive tests demonstrating success info access - Update documentation to reflect API changes This addresses GitHub Issue veraison#14 by providing callers with rich success information that can be displayed to users upon successful CoRIM submission. Breaking change: Method signature changed but directly resolves the issue. Fixes veraison#14 Signed-off-by: Kallal Mukherjee <ritamukherje62@gmail.com>
Author
|
sir @thomas-fossati sir @setrofim sir @yogeshbdeshpande |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Reference
Fixes: #14 - Investigate whether Provisioning API Client Return Code on Success
Problem Description
The original
SubmitConfig.Run()method only returned anerror, providing no success information to callers when CoRIM submission succeeded. This made it impossible for applications to display meaningful success messages or status information to users.Solution
Changed the API signature to return both success information and errors:
Before:
After:
Benefits
Files Changed
provisioning/provisioning.go- UpdatedRun()andpollForSubmissionCompletion()methodsprovisioning/doc.go- Updated package documentationprovisioning/provisioning_test.go- Updated all tests + added success info demonstration testsTesting
New Tests Added:
TestSubmitConfig_Run_success_info_returned- Demonstrates synchronous success info accessTestSubmitConfig_Run_async_success_info_returned- Demonstrates asynchronous success info accessTest Results:
Usage Example
Breaking Change Notice
This is a breaking API change, but it directly addresses the core issue #14.
Migration Path: