Skip to content

Conversation

@shaohuzhang1
Copy link
Contributor

fix: The parameter extraction node does not display input parameters in the execution details

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Oct 22, 2025

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Oct 22, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

'request': self.context.get('request'),
'result': self.context.get('result'),
'status': self.status,
'err_message': self.err_message
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, there are two issues. You forgot to add 'self' before calling methods on workflow_manage. The second issue is that you're trying to access keys from self.context that don't exist when they should be set.

Here's the corrected code:

@@ -88,8 +88,10 @@ def save_context(self, details, workflow_manage):
     for key, value in details.get('result').items():
         self.context[key] = value
     self.context['result'] = details.get('result')
  •    self.context['request'] = details.get('request', '')
    

    def execute(self, input_variable, variable_list, model_params_setting, model_id, **kwargs) -> NodeResult:

  •    # Make sure context request doesn't error out when it shouldn't.
    
  •    self.request = kwargs.get('request') if isinstance(input_variable, dict) and 'request' in input_variable else ''
           
       if model_params_setting is None:
           model_params_setting = get_default_model_params_setting(model_id)
       workspace_id = self.workflow_manage.get_body().get('workspace_id')
    

@@ -106,6 +108,7 @@ def get_details(self, index: int, **kwargs):
"index": index,
'run_time': self.context.get('run_time'),
'type': self.node.type,

  •        'request': self.context.get('request'), # Corrected this line
           'result': self.context.get('result'),
           'status': self.status,
           'err_message': self.err_message
    

'request': self.context.get('request'),
'result': self.context.get('result'),
'status': self.status,
'err_message': self.err_message
Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. In the save_context method, adding 'request' to the context dictionary ensures that all necessary data is stored.
  2. It's a good practice to initialize all variables used within methods before they are accessed.
  3. Consider using more descriptive variable names to improve code readability.
  4. Adding logging could be beneficial during debugging.

@shaohuzhang1 shaohuzhang1 merged commit 7b3c1c7 into v2 Oct 22, 2025
4 of 6 checks passed
@shaohuzhang1 shaohuzhang1 deleted the pr@v2@fix_workflow branch October 22, 2025 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants