Migration shows successful when only exception stubs are generated due to missing package body in source
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 50/100
Research direction
Start by tracing the migration conversion pipeline, generated PostgreSQL routine stubs, and the migration report for packages whose source body fails to compile. Check how the report counts exception-only stubs and how migration state prevents a rerun. Done means incomplete packages are visibly flagged with a warning or review task, the success rate is not overstated, and rerunning is possible after the source is fixed.
Written by the indexing model from the issue text.
Description
Describe the bug
When a source Oracle package cannot be fully extracted/compiled, the conversion pipeline may generate PostgreSQL function stubs that only raise Oracle-compatible exceptions (ORA-06508 / ORA-04067). However, the migration report still marks the package as Converted with 100% success rate, which overstates migration readiness because the package implementation was not migrated.
observed on ms-ossdata.vscode-pgsql version 1.27.3
To Reproduce
Create a package where body compiles with error in the source (Oracle) and run the migration.
In PostgreSQL the migration create functions like this:
CREATE OR REPLACE FUNCTION _mig_scratch_soe."orderentry$browseproducts"
(
cust_id text,
min_sleep integer,
max_sleep integer
)
RETURNS character varying
LANGUAGE 'plpgsql'
AS $BODY$
BEGIN
-- Oracle raises ORA-04067 + ORA-06508
RAISE EXCEPTION
USING
ERRCODE = 'U6508',
MESSAGE = 'ORA-06508: PL/SQL: could not find program unit being called: ORDERENTRY.BROWSEPRODUCTS',
DETAIL = 'ORA-04067: not executed, package body does not exist';
END;
$BODY$;
And the report shows:
Package Objects
Object Type Extracted Converted Merged Fallback Failed Skipped Success Rate
PACKAGE 1 1 0 0 0 0 100.0%
Total Package
Additionally, when fixing the source (either remove the package because it is not used, or fix it) we cannot re-run the migration:
Expected behavior
I would expect at least a warning when the generated PostgreSQL routine contains a stub with error, not an all-green 100% success in the report, and a review task, with the possibility to re-run when the root cause has been fixed.
- Dominant language
- No language data
- Stars
- 395
- Forks
- 33
- Avg merge
- 1h 46m
- Merged PRs (30d)
- 3
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode-pgsql
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/vscode-pgsql#190 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoft/vscode-pgsql#307 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
microsoft/vscode-pgsql#306 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
microsoft/vscode-pgsql#305 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
microsoft/vscode-pgsql#302 ·
All issues in microsoft/vscode-pgsql
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
use-agent-os/agent-os#3312 ·
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
OpenLiberty/open-liberty#35839 ·
-
affects-9.0 found-by-ai may-affects-25.10 may-affects-26.3 may-affects-26.9 may-affects-7.5 may-affects-8.1 may-affects-8.5 severity/major sig/execution type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100