turboFei opened a new pull request, #7320:
URL: https://github.com/apache/kyuubi/pull/7320

   ### Why are the changes needed?
   
   In the previous commit [KYUUBI #7313], when a k8s application is pending, we 
audit the app diagnostics to record the pending reason. This information is 
eventually updated to the `engineError` field in the metadata store via the 
`updateMetadata` method.
   
   However, when the application transitions from pending to finished 
successfully, if there is no error (i.e., `engineError` is `None`), the old 
pending reason remains in the metadata, causing confusion.
   
   ### What are the changes?
   
   Modified `JDBCMetadataStore.updateMetadata()` to always update the 
`engineError` field:
   - Previously: Only updated when `engineError` was `Some(error)`
   - Now: Always updates, setting to `null` when `engineError` is `None`
   
   This ensures that pending reasons are properly cleared when the application 
state changes.
   
   ### How was this patch tested?
   
   - Added unit test `update engineError to null when it becomes None` in 
`JDBCMetadataStoreSuite`
   - The test verifies that:
     1. Setting engineError to a pending reason works correctly
     2. Updating engineError to None clears the value in the database
   
   ### Was this patch authored or co-authored using generative AI tooling?
   <!--
   If a generative AI tooling has been used in the process of authoring this 
patch, please include
   phrase 'Generated-by: ' followed by the name of the tool and its version.
   If no, write 'No'.
   Please refer to the [ASF Generative Tooling 
Guidance](https://www.apache.org/legal/generative-tooling.html) for details.
   -->
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to