Skip to content

[Integration][Servicenow] Servicenow selector propagation#2994

Open
melodyogonna wants to merge 11 commits intomainfrom
task_tboepy/servicenow_selector_propagation
Open

[Integration][Servicenow] Servicenow selector propagation#2994
melodyogonna wants to merge 11 commits intomainfrom
task_tboepy/servicenow_selector_propagation

Conversation

@melodyogonna
Copy link
Copy Markdown
Contributor

Description

What - Selector and Kind propagation for service now

Why -

How -

Type of change

Please leave one option from the following and delete the rest:

  • [ x ] Non-breaking change (fix of existing functionality that will not change current behavior)

All tests should be run against the port production environment(using a testing org).

Core testing checklist

  • Integration able to create all default resources from scratch
  • Resync finishes successfully
  • Resync able to create entities
  • Resync able to update entities
  • Resync able to detect and delete entities
  • Scheduled resync able to abort existing resync and start a new one
  • Tested with at least 2 integrations from scratch
  • Tested with Kafka and Polling event listeners
  • Tested deletion of entities that don't pass the selector

Integration testing checklist

  • Integration able to create all default resources from scratch
  • Completed a full resync from a freshly installed integration and it completed successfully
  • Resync able to create entities
  • Resync able to update entities
  • Resync able to detect and delete entities
  • Resync finishes successfully
  • If new resource kind is added or updated in the integration, add example raw data, mapping and expected result to the examples folder in the integration directory.
  • If resource kind is updated, run the integration with the example data and check if the expected result is achieved
  • If new resource kind is added or updated, validate that live-events for that resource are working as expected
  • Docs PR link here

Preflight checklist

  • Handled rate limiting
  • Handled pagination
  • Implemented the code in async
  • Support Multi account

Screenshots

Include screenshots from your environment showing how the resources of the integration will look.

API Documentation

Provide links to the API documentation used for this integration.

@melodyogonna melodyogonna requested a review from a team as a code owner March 19, 2026 15:52
Copilot AI review requested due to automatic review settings March 19, 2026 15:52
@qodo-code-review
Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Fix selector and kind propagation for ServiceNow resources
✨ Enhancement

Grey Divider

Walkthroughs

Description
• Add selector and kind propagation for ServiceNow resources
• Create resource-specific config classes with typed kind fields
• Support custom resource kinds via allow_custom_kinds flag
• Improve API query parameter documentation with titles
Diagram
flowchart LR
  A["Generic ResourceConfig"] -->|"Replace with typed configs"| B["IncidentResourceConfig"]
  A -->|"Replace with typed configs"| C["UserGroupResourceConfig"]
  A -->|"Replace with typed configs"| D["ServiceCatalogResourceConfig"]
  A -->|"Replace with typed configs"| E["VulnerabilityResourceConfig"]
  A -->|"Replace with typed configs"| F["ReleaseProjectResourceConfig"]
  A -->|"Support custom kinds"| G["CustomResource"]
  B -->|"Enable propagation"| H["ResourceSelector with APIQueryParams"]
  C -->|"Enable propagation"| H
  D -->|"Enable propagation"| H
  E -->|"Enable propagation"| H
  F -->|"Enable propagation"| H
  G -->|"Enable propagation"| H
Loading

Grey Divider

File Changes

1. integrations/servicenow/integration.py ✨ Enhancement +61/-6

Add typed resource configs and selector propagation

• Add ClassVar import for class variable support
• Add title fields to all APIQueryParams for better UI documentation
• Replace generic ServiceNowResourceConfig with resource-specific config classes
 (IncidentResourceConfig, UserGroupResourceConfig, ServiceCatalogResourceConfig,
 VulnerabilityResourceConfig, ReleaseProjectResourceConfig)
• Add CustomResource class to support arbitrary ServiceNow table kinds
• Update ServiceNowPortAppConfig.resources to accept all resource config types and enable
 allow_custom_kinds

integrations/servicenow/integration.py


2. integrations/servicenow/main.py 🐞 Bug fix +4/-4

Fix selector extraction and improve logging

• Change import from ServiceNowResourceConfig to ResourceSelector
• Update selector extraction to directly access event.resource_config.selector instead of casting
 to resource config
• Add str() conversion for kind logging to ensure proper string formatting

integrations/servicenow/main.py


3. integrations/servicenow/CHANGELOG.md 📝 Documentation +8/-0

Document version 0.3.34 release

• Add version 0.3.34 release notes documenting selector and kind propagation fix

integrations/servicenow/CHANGELOG.md


View more (1)
4. integrations/servicenow/pyproject.toml ⚙️ Configuration changes +1/-1

Update project version

• Bump version from 0.3.33 to 0.3.34

integrations/servicenow/pyproject.toml


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown
Contributor

qodo-code-review bot commented Mar 19, 2026

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Custom kind resync crash🐞 Bug ≡ Correctness
Description
on_resources_resync() unconditionally accesses selector.api_query_params, but
ServiceNowPortAppConfig allows resources to be parsed as the base ResourceConfig whose selector type
is Selector (no api_query_params). If a resource is configured with a kind outside the explicit
literals (i.e., custom kind), resync will raise AttributeError and fail.
Code

integrations/servicenow/main.py[R35-37]

+    selector = cast(ResourceSelector, event.resource_config.selector)
if selector.api_query_params:
  api_query_params = selector.api_query_params.generate_request_params()
Evidence
The resync handler assumes ResourceSelector, but the config union still contains the framework
ResourceConfig (which defines selector as the base Selector). Because CustomResource (which
correctly sets selector: ResourceSelector for custom kinds) is defined but not included in the
resources union, custom kinds will be parsed as ResourceConfig and therefore lack api_query_params,
causing a crash when accessed.

integrations/servicenow/main.py[24-42]
integrations/servicenow/integration.py[112-129]
port_ocean/core/handlers/port_app_config/models.py[111-130]
port_ocean/core/handlers/port_app_config/base.py[63-76]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
ServiceNow resync assumes every `event.resource_config.selector` is a `ResourceSelector` and reads `api_query_params`, but `ServiceNowPortAppConfig.resources` still allows the base `ResourceConfig` (selector is only `Selector`). This breaks resync for any resource parsed as `ResourceConfig` (notably custom kinds) with an `AttributeError`.
### Issue Context
- `CustomResource` already exists and correctly defines `selector: ResourceSelector` for `kind: str`, but it is not included in the `resources` union.
- The resync handler should also be defensive in case a resource config without `api_query_params` slips through (misconfig/backward compat).
### Fix Focus Areas
- integrations/servicenow/integration.py[112-128]
- integrations/servicenow/main.py[34-37]
### Suggested changes
1. Replace `| ResourceConfig` in `ServiceNowPortAppConfig.resources` with `| CustomResource` (do **not** include both, since both have `kind: str`).
2. Make `on_resources_resync` robust:
- Avoid an unconditional cast; use `selector = event.resource_config.selector` and `api_qp = getattr(selector, "api_query_params", None)`.
- Only call `generate_request_params()` when `api_qp` is present (and not `None`).
3. (Optional) Add/adjust a small unit test for parsing a custom kind resource with `apiQueryParams` and ensuring resync does not crash.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the ServiceNow integration’s configuration models to better propagate kind and selector-related configuration into the resync flow.

Changes:

  • Bumped ServiceNow integration version to 0.3.34 and added a changelog entry.
  • Refactored ServiceNow config models into per-kind ResourceConfig subclasses and introduced a ResourceSelector with apiQueryParams.
  • Updated resync logic to read selector config directly from event.resource_config.selector.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
integrations/servicenow/pyproject.toml Version bump to 0.3.34.
integrations/servicenow/main.py Reads ResourceSelector from the current resource config to build API query params for resync.
integrations/servicenow/integration.py Adds typed ResourceSelector + per-kind resource config classes; enables custom kinds.
integrations/servicenow/CHANGELOG.md Release note for 0.3.34 describing selector/kind propagation fix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Copy link
Copy Markdown
Contributor

@eriport eriport left a comment

Choose a reason for hiding this comment

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

looks good to me, one small comment only 🙏

@qodo-code-review
Copy link
Copy Markdown
Contributor

CI Feedback 🧐

A test triggered by this PR failed. Here is an AI-generated analysis of the failure:

Action: Check Version & Changelog Updates

Failed stage: Check integrations for version and changelog updates [❌]

Failed test name: Version and Changelog Check

Failure summary:

The action failed because the version and changelog check detected that the servicenow integration
was not properly updated:
- servicenow: Version not bumped in pyproject.toml (the version in the PR
branch matches the version on the main branch)

The CI script checks all modified integrations to ensure that:
1. The version field in
pyproject.toml has been incremented compared to the main branch.
2. The CHANGELOG.md file has been
updated.

The servicenow integration's pyproject.toml version was not bumped, causing the script to exit with
code 1.

Relevant error logs:
1:  ##[group]Runner Image Provisioner
2:  Hosted Compute Agent
...

84:  ##[endgroup]
85:  ##[group]Fetching the repository
86:  [command]/usr/bin/git -c protocol.version=2 fetch --prune --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/* +8cd92a02995c2764b3b895e40ef882d3161eed38:refs/remotes/pull/2994/merge
87:  From https://github.com/port-labs/ocean
88:  * [new branch]          DIGCS-192-ADO-oauth-integration -> origin/DIGCS-192-ADO-oauth-integration
89:  * [new branch]          DIGCS-40                -> origin/DIGCS-40
90:  * [new branch]          Github-tj-actions-bug-fix -> origin/Github-tj-actions-bug-fix
91:  * [new branch]          PORT-000-DOCKERFILE-UNPRIVILEGED-USER -> origin/PORT-000-DOCKERFILE-UNPRIVILEGED-USER
92:  * [new branch]          PORT-10639-add-memray-to-jira-integration -> origin/PORT-10639-add-memray-to-jira-integration
93:  * [new branch]          PORT-10680-Add-default-actions-for-Jira-integration -> origin/PORT-10680-Add-default-actions-for-Jira-integration
94:  * [new branch]          PORT-10680-Add-default-actions-for-PagerDuty-integration -> origin/PORT-10680-Add-default-actions-for-PagerDuty-integration
95:  * [new branch]          PORT-10776-Default-Action-for-Snyk-Ocean-Integration -> origin/PORT-10776-Default-Action-for-Snyk-Ocean-Integration
96:  * [new branch]          PORT-10933-bug-snyk-ingesting-vulnerabilities-from-wrong-org -> origin/PORT-10933-bug-snyk-ingesting-vulnerabilities-from-wrong-org
97:  * [new branch]          PORT-11183-fix-starlette-denial-of-service-do-s-via-multipart-form-data -> origin/PORT-11183-fix-starlette-denial-of-service-do-s-via-multipart-form-data
98:  * [new branch]          PORT-11220-automate-git-tag-when-pushing-a-new-commit-to-main -> origin/PORT-11220-automate-git-tag-when-pushing-a-new-commit-to-main
99:  * [new branch]          PORT-11682-ocean-handle-and-log-errors-of-client-timeouts-when-interacting-with-port-api-upserting-etc -> origin/PORT-11682-ocean-handle-and-log-errors-of-client-timeouts-when-interacting-with-port-api-upserting-etc
100:  * [new branch]          PORT-12105-Bug-Pagination-logic-error-in-the-SonarQube-integration -> origin/PORT-12105-Bug-Pagination-logic-error-in-the-SonarQube-integration
101:  * [new branch]          PORT-123-use-organizations-by-default -> origin/PORT-123-use-organizations-by-default
...

115:  * [new branch]          PORT-13991-Bug-Pagerduty-live-events-fails-on-service -> origin/PORT-13991-Bug-Pagerduty-live-events-fails-on-service
116:  * [new branch]          PORT-14108-ocean-azure-multi-subscription-integration -> origin/PORT-14108-ocean-azure-multi-subscription-integration
117:  * [new branch]          PORT-14408-Add-Support-For-OAuth2-Authentication -> origin/PORT-14408-Add-Support-For-OAuth2-Authentication
118:  * [new branch]          PORT-14435              -> origin/PORT-14435
119:  * [new branch]          PORT-14512              -> origin/PORT-14512
120:  * [new branch]          PORT-14554-Prepare-A-Script-To-Remove-Dangling-Entities -> origin/PORT-14554-Prepare-A-Script-To-Remove-Dangling-Entities
121:  * [new branch]          PORT-14640-shutting-down-gracefully-on-ocean-resync-exception -> origin/PORT-14640-shutting-down-gracefully-on-ocean-resync-exception
122:  * [new branch]          PORT-14655-PARALLEL-LIVE-INGEST -> origin/PORT-14655-PARALLEL-LIVE-INGEST
123:  * [new branch]          PORT-15045-add-support-for-merged-merged-requests -> origin/PORT-15045-add-support-for-merged-merged-requests
124:  * [new branch]          PORT-15246              -> origin/PORT-15246
125:  * [new branch]          PORT-15302              -> origin/PORT-15302
126:  * [new branch]          PORT-15309              -> origin/PORT-15309
127:  * [new branch]          PORT-15370-new-cursor-rule-for-issues-and-pr-context -> origin/PORT-15370-new-cursor-rule-for-issues-and-pr-context
128:  * [new branch]          PORT-15402              -> origin/PORT-15402
129:  * [new branch]          PORT-15478              -> origin/PORT-15478
130:  * [new branch]          PORT-15495-fixed-KindNotImplementedException-causing-Pickle-load-error -> origin/PORT-15495-fixed-KindNotImplementedException-causing-Pickle-load-error
131:  * [new branch]          PORT-15516              -> origin/PORT-15516
132:  * [new branch]          PORT-15636              -> origin/PORT-15636
133:  * [new branch]          PORT-15691-bug-name-or-service-not-known-error-failing-resyncs -> origin/PORT-15691-bug-name-or-service-not-known-error-failing-resyncs
134:  * [new branch]          PORT-15917-Implement-ECS-Cluster-Kind -> origin/PORT-15917-Implement-ECS-Cluster-Kind
135:  * [new branch]          PORT-15918-Implement-EC2-Instance-Kind -> origin/PORT-15918-Implement-EC2-Instance-Kind
136:  * [new branch]          PORT-15948-bug-bitbucket-integration-not-handling-pagination-correctky -> origin/PORT-15948-bug-bitbucket-integration-not-handling-pagination-correctky
137:  * [new branch]          PORT-15973-Implement-Account-Kind -> origin/PORT-15973-Implement-Account-Kind
138:  * [new branch]          PORT-16008              -> origin/PORT-16008
139:  * [new branch]          PORT-16052-bug-wiz-Integration-have-too-much-errors -> origin/PORT-16052-bug-wiz-Integration-have-too-much-errors
140:  * [new branch]          PORT-16156              -> origin/PORT-16156
...

158:  * [new branch]          PORT-16768-bug-github-ocean-can-be-changed-from-app-auth-to-pat-when-using-oauth -> origin/PORT-16768-bug-github-ocean-can-be-changed-from-app-auth-to-pat-when-using-oauth
159:  * [new branch]          PORT-16779-Bug-Github-ocean-fail-to-fetch-data-for-personal-org-using-OAuth -> origin/PORT-16779-Bug-Github-ocean-fail-to-fetch-data-for-personal-org-using-OAuth
160:  * [new branch]          PORT-16790              -> origin/PORT-16790
161:  * [new branch]          PORT-16795-helm-repos-default-mapping -> origin/PORT-16795-helm-repos-default-mapping
162:  * [new branch]          PORT-16805-SNOW-oauth-integration -> origin/PORT-16805-SNOW-oauth-integration
163:  * [new branch]          PORT-16868-fix-ocean-cache-merging-cached-chunks -> origin/PORT-16868-fix-ocean-cache-merging-cached-chunks
164:  * [new branch]          PORT-16948              -> origin/PORT-16948
165:  * [new branch]          PORT-16951              -> origin/PORT-16951
166:  * [new branch]          PORT-17006-Bug-integration-resync-gets-stuck -> origin/PORT-17006-Bug-integration-resync-gets-stuck
167:  * [new branch]          PORT-17087              -> origin/PORT-17087
168:  * [new branch]          PORT-17163              -> origin/PORT-17163
169:  * [new branch]          PORT-17173-customizable-rate-limiter-to-Gitlab-v2 -> origin/PORT-17173-customizable-rate-limiter-to-Gitlab-v2
170:  * [new branch]          PORT-17222-dont-use-group-search-api -> origin/PORT-17222-dont-use-group-search-api
171:  * [new branch]          PORT-17325-Custom-Integration-URL-query-params-fix -> origin/PORT-17325-Custom-Integration-URL-query-params-fix
172:  * [new branch]          PORT-17325-Custom-Integration-URL-query-params-stripped -> origin/PORT-17325-Custom-Integration-URL-query-params-stripped
173:  * [new branch]          PORT-17348-JQ-selector-evaluation-throws-errors -> origin/PORT-17348-JQ-selector-evaluation-throws-errors
174:  * [new branch]          PORT-17364-region-missing-resources -> origin/PORT-17364-region-missing-resources
175:  * [new branch]          PORT-17375              -> origin/PORT-17375
176:  * [new branch]          PORT-17405-bug-git-hub-enterprise-installation-tokens-return-401-and-403-despite-successful-generation -> origin/PORT-17405-bug-git-hub-enterprise-installation-tokens-return-401-and-403-despite-successful-generation
177:  * [new branch]          PORT-17406-bug-armor-code-integration-429-rate-limiting-on-large-finding-datasets -> origin/PORT-17406-bug-armor-code-integration-429-rate-limiting-on-large-finding-datasets
178:  * [new branch]          PORT-17563-NextLinkPagination-strips-URL-query-param -> origin/PORT-17563-NextLinkPagination-strips-URL-query-param
179:  * [new branch]          PORT-17567              -> origin/PORT-17567
180:  * [new branch]          PORT-17576              -> origin/PORT-17576
181:  * [new branch]          PORT-17605-bug-jira-integration-aborts-on-401-during-issue-sync-when-using-o-auth -> origin/PORT-17605-bug-jira-integration-aborts-on-401-during-issue-sync-when-using-o-auth
182:  * [new branch]          PORT-4308-ocean-support-pydantic-v-2 -> origin/PORT-4308-ocean-support-pydantic-v-2
183:  * [new branch]          PORT-8504-add-configurable-limit-for-wiz-import-issues -> origin/PORT-8504-add-configurable-limit-for-wiz-import-issues
184:  * [new branch]          PORT-8596-add-the-ability-to-ingest-ami-images-and-acm-certificate-from-aws-new-integration-into-port -> origin/PORT-8596-add-the-ability-to-ingest-ami-images-and-acm-certificate-from-aws-new-integration-into-port
185:  * [new branch]          PORT-8788-Add-deployment-method-requirements-field -> origin/PORT-8788-Add-deployment-method-requirements-field
186:  * [new branch]          PORT-9072               -> origin/PORT-9072
187:  * [new branch]          PORT-9097-ocean-icons-are-not-synced -> origin/PORT-9097-ocean-icons-are-not-synced
188:  * [new branch]          PORT-9326-bug-sonarqube-integration-throws-errors -> origin/PORT-9326-bug-sonarqube-integration-throws-errors
189:  * [new branch]          PORT-9612-add-sonar-project-properties-file-to-ocean-integration-code-base -> origin/PORT-9612-add-sonar-project-properties-file-to-ocean-integration-code-base
...

358:  * [new branch]          fix-wf-usages           -> origin/fix-wf-usages
359:  * [new branch]          fix/items-to-parse-oom-prevention -> origin/fix/items-to-parse-oom-prevention
360:  * [new branch]          fix/strip-app-host      -> origin/fix/strip-app-host
361:  * [new branch]          fixes-failing-CI-due-to-new-secret-key-for-github-token -> origin/fixes-failing-CI-due-to-new-secret-key-for-github-token
362:  * [new branch]          forbid-additional-props-in-port-app-config-model -> origin/forbid-additional-props-in-port-app-config-model
363:  * [new branch]          format_url_types        -> origin/format_url_types
364:  * [new branch]          ft/fileKind             -> origin/ft/fileKind
365:  * [new branch]          ft/jfrog                -> origin/ft/jfrog
366:  * [new branch]          gitlab-param-change     -> origin/gitlab-param-change
367:  * [new branch]          gitlab-v2               -> origin/gitlab-v2
368:  * [new branch]          gunicorn-dynamic-adjust -> origin/gunicorn-dynamic-adjust
369:  * [new branch]          improvement/file-search-infake-person -> origin/improvement/file-search-infake-person
370:  * [new branch]          incident16-1-26/revert-metrics -> origin/incident16-1-26/revert-metrics
371:  * [new branch]          jira-oauth-support      -> origin/jira-oauth-support
372:  * [new branch]          jortegac/main           -> origin/jortegac/main
373:  * [new branch]          jq_next-assertion-error -> origin/jq_next-assertion-error
374:  * [new branch]          label-prs               -> origin/label-prs
375:  * [new branch]          launchdarkly-segment-integration -> origin/launchdarkly-segment-integration
376:  * [new branch]          main                    -> origin/main
377:  * [new branch]          mapping_rule_schema_fix -> origin/mapping_rule_schema_fix
378:  * [new branch]          mult-org                -> origin/mult-org
379:  * [new branch]          new_base_image          -> origin/new_base_image
380:  * [new branch]          oauth-token-refresh-by-error-mode -> origin/oauth-token-refresh-by-error-mode
381:  * [new branch]          oauth2-support-in-bitbucket-integration -> origin/oauth2-support-in-bitbucket-integration
...

651:  * [new branch]          task_t56zd7/custom_ocean_integration_for_n8n -> origin/task_t56zd7/custom_ocean_integration_for_n8n
652:  * [new branch]          task_t6p48h/skip_saas_validation -> origin/task_t6p48h/skip_saas_validation
653:  * [new branch]          task_t6p48h/skip_saas_validation_2 -> origin/task_t6p48h/skip_saas_validation_2
654:  * [new branch]          task_t8rv1y/support_dynamic_since_until_in_pd_incidents_selector_api_params -> origin/task_t8rv1y/support_dynamic_since_until_in_pd_incidents_selector_api_params
655:  * [new branch]          task_t8sl9h/add_support_for_empty_provisioning_in_ocean -> origin/task_t8sl9h/add_support_for_empty_provisioning_in_ocean
656:  * [new branch]          task_t8t3vh/implement_authentication_logic_in_ocean_with_locks -> origin/task_t8t3vh/implement_authentication_logic_in_ocean_with_locks
657:  * [new branch]          task_t94e2m/restructure_custom_ocean_integration_to_properly_separate_concerns -> origin/task_t94e2m/restructure_custom_ocean_integration_to_properly_separate_concerns
658:  * [new branch]          task_t9y972-allow-custom-config-file-names -> origin/task_t9y972-allow-custom-config-file-names
659:  * [new branch]          task_taie6e/port_app_config_breakage_detection_workflow -> origin/task_taie6e/port_app_config_breakage_detection_workflow
660:  * [new branch]          task_talpce/custom_ocean_support_for_nested_dynamic_query_parameters -> origin/task_talpce/custom_ocean_support_for_nested_dynamic_query_parameters
661:  * [new branch]          task_tayf9a/remove_stack_trace_in_ocean_logs_2 -> origin/task_tayf9a/remove_stack_trace_in_ocean_logs_2
662:  * [new branch]          task_tayqed/fix_github_ocean_multiprocess_retry_mechanism -> origin/task_tayqed/fix_github_ocean_multiprocess_retry_mechanism
663:  * [new branch]          task_tayqed/fix_github_ocean_multiprocess_retry_mechanism_2 -> origin/task_tayqed/fix_github_ocean_multiprocess_retry_mechanism_2
664:  * [new branch]          task_tayqed/fix_github_ocean_rate_limits -> origin/task_tayqed/fix_github_ocean_rate_limits
665:  * [new branch]          task_tayqed/github_ocean_retry_mechanism_fix -> origin/task_tayqed/github_ocean_retry_mechanism_fix
666:  * [new branch]          task_tbadjo/ocean_logging_standardization_context_fields_etl_phases_error_visibility -> origin/task_tbadjo/ocean_logging_standardization_context_fields_etl_phases_error_visibility
667:  * [new branch]          task_tbadjo/ocean_logging_standardization_first_phase -> origin/task_tbadjo/ocean_logging_standardization_first_phase
...

1058:  HEAD is now at 8cd92a029 Merge 2abadb8977ca628b417f5c8d326391817ba24368 into 8f033efaa04d630649741cfbd5f20e10dffb5728
1059:  ##[endgroup]
1060:  [command]/usr/bin/git log -1 --format=%H
1061:  8cd92a02995c2764b3b895e40ef882d3161eed38
1062:  ##[group]Run if [ "main" != "" ]; then
1063:  �[36;1mif [ "main" != "" ]; then�[0m
1064:  �[36;1m  echo "base=main" >> $GITHUB_OUTPUT�[0m
1065:  �[36;1melse�[0m
1066:  �[36;1m  echo "base=main" >> $GITHUB_OUTPUT�[0m
1067:  �[36;1mfi�[0m
1068:  shell: /usr/bin/bash -e {0}
1069:  ##[endgroup]
1070:  ##[group]Run set -e
1071:  �[36;1mset -e�[0m
1072:  �[36;1mBASE_BRANCH="main"�[0m
1073:  �[36;1mERRORS=()�[0m
1074:  �[36;1m�[0m
...

1099:  �[36;1m    BASE_VERSION=$(git show origin/${BASE_BRANCH}:${PYPROJECT_FILE} 2>/dev/null | grep -E '^version = ".*"' | cut -d'"' -f2 || echo "")�[0m
1100:  �[36;1m    if [ -n "$BASE_VERSION" ] && [ "$CURRENT_VERSION" != "$BASE_VERSION" ]; then�[0m
1101:  �[36;1m      VERSION_CHANGED=true�[0m
1102:  �[36;1m    fi�[0m
1103:  �[36;1m  else�[0m
1104:  �[36;1m    # New integration - skip version check�[0m
1105:  �[36;1m    VERSION_CHANGED=true�[0m
1106:  �[36;1m  fi�[0m
1107:  �[36;1m�[0m
1108:  �[36;1m  # Check if CHANGELOG.md was updated�[0m
1109:  �[36;1m  CHANGELOG_UPDATED=false�[0m
1110:  �[36;1m  if git diff --name-only origin/${BASE_BRANCH}...HEAD | grep -q "^${CHANGELOG_FILE}$"; then�[0m
1111:  �[36;1m    CHANGELOG_UPDATED=true�[0m
1112:  �[36;1m  fi�[0m
1113:  �[36;1m�[0m
1114:  �[36;1m  # Fail if version or changelog not updated�[0m
1115:  �[36;1m  if [ "$VERSION_CHANGED" = "false" ]; then�[0m
1116:  �[36;1m    ERRORS+=("❌ ${INTEGRATION_NAME}: Version not bumped in pyproject.toml")�[0m
1117:  �[36;1m  fi�[0m
1118:  �[36;1m�[0m
1119:  �[36;1m  if [ "$CHANGELOG_UPDATED" = "false" ]; then�[0m
1120:  �[36;1m    ERRORS+=("❌ ${INTEGRATION_NAME}: CHANGELOG.md not updated")�[0m
1121:  �[36;1m  fi�[0m
1122:  �[36;1mdone�[0m
1123:  �[36;1m�[0m
1124:  �[36;1mif [ ${#ERRORS[@]} -gt 0 ]; then�[0m
1125:  �[36;1m  echo "::error::Version and Changelog Check Failed"�[0m
1126:  �[36;1m  printf '%s\n' "${ERRORS[@]}"�[0m
1127:  �[36;1m  exit 1�[0m
1128:  �[36;1mfi�[0m
1129:  �[36;1m�[0m
1130:  �[36;1mecho "✅ All integrations have version bumps and changelog updates"�[0m
1131:  shell: /usr/bin/bash -e {0}
1132:  ##[endgroup]
1133:  ##[error]Version and Changelog Check Failed
1134:  ❌ servicenow: Version not bumped in pyproject.toml
1135:  ##[error]Process completed with exit code 1.
1136:  Post job cleanup.

Copy link
Copy Markdown
Contributor

@raskinmaya raskinmaya left a comment

Choose a reason for hiding this comment

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

Please enable formMappingEnabled in spec.yaml to prevent another version bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants