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

fix a bug in Cortex XDR - XQL Query Engine - replace 'tenant_ids' with 'tenent_id' #27661

Merged
merged 6 commits into from
Jun 22, 2023

Conversation

RosenbergYehuda
Copy link
Contributor

@RosenbergYehuda RosenbergYehuda commented Jun 22, 2023

Contributing to Cortex XSOAR Content

Make sure to register your contribution by filling the contribution registration form

The Pull Request will be reviewed only after the contribution registration form is filled.

Status

  • In Progress
  • Ready
  • In Hold - (Reason for hold)

Related Issues

fixes: https://jira-hq.paloaltonetworks.local/browse/XSUP-25528

Description

The bug was that the arg name is 'tenant_id', but the code was 'args.get('tenant_ids')'
in order to fix that without BC in case someone is using it with the wrong arg name , we added support for both.

Screenshots

Paste here any images that will help the reviewer

Minimum version of Cortex XSOAR

  • 6.0.0
  • 6.1.0
  • 6.2.0
  • 6.5.0

Does it break backward compatibility?

  • Yes
    • Further details:
  • No

Must have

  • Tests
  • Documentation

@RosenbergYehuda RosenbergYehuda changed the title fix and test fix a bug in Cortex XDR - XQL Query Engine - replace 'tenant_ids' with 'tenent_id' Jun 22, 2023
Copy link
Contributor

@ShacharKidor ShacharKidor left a comment

Choose a reason for hiding this comment

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

Great work!
Added to minor comments.


##### Cortex XDR - XQL Query Engine

- Fixed an issue when using the 'tenant_id' argument in the ***xdr-xql-generic-query*** command.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Fixed an issue when using the 'tenant_id' argument in the ***xdr-xql-generic-query*** command.
- Fixed an issue in the ***xdr-xql-generic-query*** command where the *tenant_id* argument wasn't used.

@@ -351,7 +351,7 @@ def start_xql_query(client: Client, args: Dict[str, Any]) -> str:
time_frame = args.get('time_frame')
if time_frame:
data['request_data']['timeframe'] = convert_timeframe_string_to_json(time_frame)
tenant_ids = argToList(args.get('tenant_ids'))
tenant_ids = argToList(args.get('tenant_id') or args.get('tenant_ids'))
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's a comment saying that tenant_ids is used for maintaining BC.

@RosenbergYehuda RosenbergYehuda merged commit fbcb2c7 into master Jun 22, 2023
@RosenbergYehuda RosenbergYehuda deleted the YR/Cortex-XDR-bug/XSUP-25528 branch June 22, 2023 14:43
MosheEichler pushed a commit that referenced this pull request Jul 2, 2023
…h 'tenent_id' (#27661)

* fix and test

* docker

* RN

* CR
xsoar-bot pushed a commit to xsoar-contrib/content that referenced this pull request Jul 26, 2023
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