Skip to content

refactor:reduced code repetition across inputs - #55

Merged
edro15 merged 13 commits into
mainfrom
major-code-refactor
Nov 9, 2026
Merged

edro15 merged 13 commits into
mainfrom
major-code-refactor

Conversation

@edro15

@edro15 edro15 commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

👉 Please ensure your pull request (PR) adheres to our Contribution Guidelines 👈

Pull Request Checklist

Please check if your PR fulfills the following requirements:

  • Testing of all the changes has been performed (for bug fixes / features)
  • The docs/* have been reviewed and updated if needed (for bug fixes / features)
  • Provide release notes as part of the PR submission which describe high level points about the changes
  • Verify all checks are passing
  • Do NOT use the main branch of the forked repo. Create separate feature branch for raising the PR

Pull Request Type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Documentation
  • Other (please describe):

Security Considerations (REQUIRED)

  • If you are adding a new modular input to the add-on
    • Please document in the docs/ConfigureGenesysCloud/index.md permissions and OAuth scopes needed to fetch data from the integrated endpoint(s)
    • Please add opportune tests and update the vendor mock

Release Notes (REQUIRED)

  • Major refactoring to reduce code repetitions across all inputs
  • Moved actions_metrics results processing into a module
  • Added 2 Genesys Cloud regions (Singapore and Mexico)

Thanks for contributing! ❤️

@Arthur-10-coder Arthur-10-coder left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed all 28 changed files. The refactor is solid overall — I verified functional equivalence on the high-risk parts: sourcetypes (16/16 identical), API endpoints (no changes), and the extracted ProxyHandler/client/models match main. Nice reduction of duplication.

Two things worth addressing before merge (details in inline comments):

  1. watchdog is unpinned (blocking). It resolves transitively to 7.x, which imports StrEnum (Python 3.11+) and crashes every modular input on Splunk 9.3/9.4 (Python 3.9) with ImportError: cannot import name 'StrEnum'. Verified on a local 9.3.8 container. Fix belongs in package/lib/requirements.txt (e.g. watchdog>=5.0.0,<7). Not in this PR's diff, so it couldn't be a suggestion — but it's the one real blocker.

  2. _to_epoch edge case (minor). Stricter than main's datetime.fromtimestamp (rejects int). Normal flow is unaffected (all consumers store float), but an int checkpoint would raise TypeError. Applicable suggestion left inline, plus a note on adding unit tests for the new pure helpers.

Not blocking from my side beyond the watchdog pin.

@edro15
edro15 merged commit 3880b59 into main Nov 9, 2026
9 checks passed
@edro15
edro15 deleted the major-code-refactor branch November 9, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants