citus icon indicating copy to clipboard operation
citus copied to clipboard

New workflow

Open eaydingol opened this issue 2 months ago • 4 comments

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 avatar Oct 17 '25 08:10 eaydingol

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: 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              
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Oct 17 '25 08:10 codecov[bot]

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.

github-actions[bot] avatar Oct 17 '25 09:10 github-actions[bot]

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 avatar Oct 17 '25 09:10 eaydingol

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).

eaydingol avatar Oct 17 '25 10:10 eaydingol