Skip to content

CU-869d95pzd Connectivity diagnostics and multi-host probes#2

Open
tasselchof wants to merge 2 commits into
mainfrom
CU-869d95pzd-connectivity-diagnostics
Open

CU-869d95pzd Connectivity diagnostics and multi-host probes#2
tasselchof wants to merge 2 commits into
mainfrom
CU-869d95pzd-connectivity-diagnostics

Conversation

@tasselchof
Copy link
Copy Markdown
Contributor

Summary

Adds server-side connectivity diagnostics on OctavaWMS integration settings, probes standard cloud hosts (pro.oawms.com, alpha.orderadmin.eu, api.octavawms.com) plus the configured API base, standalone PHP/shell scripts for SFTP/CLI, and a dedicated `octavawms_connectivity_probe` AJAX action.

Testing

  • `composer check`
  • Run diagnostics button in WooCommerce → Settings → Integrations → OctavaWMS

ClickUp

https://app.clickup.com/t/869d95pzd

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bcdf1229d3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/ConnectService.php
Comment on lines +327 to +331
$report = ConnectivityProbe::buildFullDiagnosticsReport(
$baseUrl,
ConnectivityProbe::DEFAULT_CONNECT_TIMEOUT,
ConnectivityProbe::DEFAULT_MAX_TIME
);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid exhausting PHP time limit in diagnostics AJAX

The diagnostics action runs buildFullDiagnosticsReport with DEFAULT_CONNECT_TIMEOUT 15s and DEFAULT_MAX_TIME 45s for every probed host, and the new report probes up to four hosts with two curl calls each; in a firewall/drop scenario this can take well over typical max_execution_time (often 30s), causing the AJAX request to time out before returning any report. This makes the feature fail in the exact environments where connectivity diagnostics are needed and can hold PHP workers for a long time.

Useful? React with 👍 / 👎.

- Prevent duplicate AJAX action registrations in ConnectService, LabelAjax, and SettingsAjax classes.
- Introduce robust error handling and user feedback for AJAX requests in admin-settings-matrix.js.
- Ensure WooCommerce integrations are only attached once to avoid conflicts during bootstrap.
- Improve the registration of AJAX hooks to handle cases where they may not be set due to load order issues.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant