Skip to content

Fix: TIPCommon - Added SOAR API for Job Save Or Update Job Data#574

Open
adarshtwy wants to merge 4 commits intomainfrom
tipcommon_rest_save_or_upadate_job
Open

Fix: TIPCommon - Added SOAR API for Job Save Or Update Job Data#574
adarshtwy wants to merge 4 commits intomainfrom
tipcommon_rest_save_or_upadate_job

Conversation

@adarshtwy
Copy link

Added SOAR API for Job Save Or Update Job Data

We wanted to have a method in TIPCommon rest API calls which would handle the save or update Job Data for a particular job. As part of the change we have implemented both legacy and 1P Endpoint calls.

@adarshtwy adarshtwy requested a review from a team as a code owner February 19, 2026 12:24
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @adarshtwy, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the TIPCommon library by integrating a new SOAR API capability for managing job data. It provides a unified method to either save new jobs or update existing ones, catering to both legacy and modern One Platform environments. This addition streamlines job lifecycle management within the Google SecOps Marketplace ecosystem.

Highlights

  • New SOAR API for Job Management: Introduced a new save_or_update_job function in the TIPCommon library to handle saving or updating job data via the SOAR API.
  • Dual API Support: Implemented support for both legacy and One Platform (1P) endpoints for the new job save/update functionality, ensuring broad compatibility.
  • API Client Extension: Extended the SOARAPIClient interface with an abstract save_or_update_job method, which is then implemented by specific legacy and 1P API clients.
  • Version Update: Incremented the TIPCommon package version from 2.3.1 to 2.3.2 to reflect the new feature addition.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • packages/tipcommon/TIPCommon/pyproject.toml
    • Updated package version from 2.3.1 to 2.3.2.
  • packages/tipcommon/TIPCommon/src/TIPCommon/rest/soar_api.py
    • Added save_or_update_job function to expose job data management.
  • packages/tipcommon/TIPCommon/src/TIPCommon/rest/soar_platform_clients/api_client_factory.py
    • Declared save_or_update_job as an abstract method in the base API client.
  • packages/tipcommon/TIPCommon/src/TIPCommon/rest/soar_platform_clients/legacy_soar_api.py
    • Implemented save_or_update_job for the legacy SOAR API.
  • packages/tipcommon/TIPCommon/src/TIPCommon/rest/soar_platform_clients/one_platform_soar_api.py
    • Implemented save_or_update_job for the One Platform SOAR API, including robust validation for job data.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request introduces the save_or_update_job method to the SOAR API, supporting both legacy and 1P platforms. While the overall structure is sound, there are some issues in the 1P implementation regarding endpoint parsing logic and minor formatting/documentation details that should be addressed to ensure correctness and adherence to the style guide.

[project]
name = "TIPCommon"
version = "2.3.1"
version = "2.3.2"
Copy link
Contributor

Choose a reason for hiding this comment

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

run command uv Sync after version upgrade, also needs to update integration_testing version and whl file.

Copy link
Author

@adarshtwy adarshtwy Feb 26, 2026

Choose a reason for hiding this comment

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

uv sync - done - updated the lock file
update integration_testing version - Need clarification on what steps needs to be done here.
tipcommon whl file updated after fixing the review comments.

@github-actions github-actions bot added the Stale label Mar 20, 2026
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.

3 participants