Skip to content

Conversation

@eaydingol
Copy link
Contributor

@eaydingol eaydingol commented Oct 17, 2025

This PR introduces a GitHub Actions workflow that automatically performs text-based analysis to detect potential backward compatibility issues. The workflow analyzes update scripts, UDF function signatures, and GUC changes, then adds comments to flag breaking changes. Note that this provides heuristic detection based on code changes and does not offer comprehensive coverage of all possible breaking changes.

@eaydingol eaydingol marked this pull request as draft October 17, 2025 08:36
@codecov
Copy link

codecov bot commented Oct 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.93%. Comparing base (90f2ab6) to head (092b9a0).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8259      +/-   ##
==========================================
- Coverage   88.94%   88.93%   -0.01%     
==========================================
  Files         287      287              
  Lines       63135    63134       -1     
  Branches     7942     7941       -1     
==========================================
- Hits        56156    56151       -5     
- Misses       4668     4672       +4     
  Partials     2311     2311              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link

Potential Backward Compatibility Issues Detected

This PR contains changes that may break backward compatibility:

  • SQL Migration: Column addition/removal in pg_catalog
    • File: src/backend/distributed/sql/citus--13.2-1--14.0-1.sql
    • Line: ALTER TABLE pg_catalog.pg_dist_transaction ADD COLUMN outer_xid2 xid8;
  • SQL Migration: Permission revocation
    • File: src/backend/distributed/sql/citus--13.2-1--14.0-1.sql
    • Line: REVOKE ALL ON FUNCTION citus_internal.replace_isolation_tester_func FROM PUBLIC;

Please review these changes carefully before merging.

@eaydingol
Copy link
Contributor Author

Potential Backward Compatibility Issues Detected

This PR contains changes that may break backward compatibility:

  • SQL Migration: Column addition/removal in pg_catalog

    • File: src/backend/distributed/sql/citus--13.2-1--14.0-1.sql
    • Line: ALTER TABLE pg_catalog.pg_dist_transaction ADD COLUMN outer_xid2 xid8;
  • SQL Migration: Permission revocation

    • File: src/backend/distributed/sql/citus--13.2-1--14.0-1.sql
    • Line: REVOKE ALL ON FUNCTION citus_internal.replace_isolation_tester_func FROM PUBLIC;

Please review these changes carefully before merging.

The comment is generated when the following lines added to upgrade script for testing, it is reverted.

-- For testing, will be reverted 
REVOKE ALL ON FUNCTION citus_internal.replace_isolation_tester_func FROM PUBLIC;
ALTER TABLE pg_catalog.pg_dist_transaction ADD COLUMN outer_xid2 xid8;

@eaydingol
Copy link
Contributor Author

To test locally:

export BASE_SHA="v11.1.0"
export HEAD_SHA="v11.2.0"
export PR_NUMBER="123"

python3 ci/check-backward-compatibility.py 
cat /tmp/compat-results.json

Sample test results:

v11.2.0 to v11.3.0
  - **SQL Migration**: Column addition/removal in pg_catalog
    - File: `src/backend/distributed/sql/citus--11.2-2--11.3-1.sql`
    - Line: ALTER TABLE pg_catalog.pg_dist_background_task ADD COLUMN nodes_involved int[] DEFAULT NULL;
- **UDF Change**: UDF changed: columnar_ensure_am_depends_catalog
      - File: `src/backend/columnar/sql/udfs/columnar_ensure_am_depends_catalog/latest.sql`
      - Function name changed from citus_internal.columnar_ensure_am_depends_catalog to columnar_internal.columnar_ensure_am_depends_catalog.
v13.0.0 to v13.1.0
 - **SQL Migration**: Column addition/removal in pg_catalog
    - File: `src/backend/distributed/sql/citus--13.0-1--13.1-1.sql`
    - Line: ALTER TABLE pg_catalog.pg_dist_transaction ADD COLUMN outer_xid xid8;
- **SQL Migration**: Permission revocation
      - File: `src/backend/distributed/sql/citus--13.0-1--13.1-1.sql`
      - Line: REVOKE ALL ON FUNCTION citus_internal.find_groupid_for_node FROM PUBLIC;
v13.1.0 to v13.2.0
- **SQL Migration**: Table removal
      - File: `src/backend/distributed/sql/citus--13.1-1--13.2-1.sql`
      - Line: DROP TABLE IF EXISTS columnar_internal.chunk;
- **UDF Change**: UDF changed: worker_last_saved_explain_analyze
      - File: `src/backend/distributed/sql/udfs/worker_last_saved_explain_analyze/latest.sql`
      - Return type changed from TABLE(explain_analyze_output TEXT, execution_duration DOUBLE PRECISION) to TABLE(explain_analyze_output TEXT, execution_duration DOUBLE PRECISION,
        execution_ntuples DOUBLE PRECISION, execution_nloops DOUBLE PRECISION).

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