-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create and use composite actions for code coverage workflow to improve maintainability #2100
Merged
shardgupta
merged 5 commits into
babelfish-for-postgresql:BABEL_3_X_DEV
from
tanscorpio7:BABEL_4602
Dec 11, 2023
Merged
Create and use composite actions for code coverage workflow to improve maintainability #2100
shardgupta
merged 5 commits into
babelfish-for-postgresql:BABEL_3_X_DEV
from
tanscorpio7:BABEL_4602
Dec 11, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tanscorpio7
changed the title
Use pre defined actions in code coverage workflow
Create and use composite actions in code coverage workflow to improve maintainability
Dec 5, 2023
Signed-off-by: Tanzeel Khan <[email protected]>
tanscorpio7
force-pushed
the
BABEL_4602
branch
from
December 5, 2023 14:12
fc03561
to
8d95d1f
Compare
Signed-off-by: Tanzeel Khan <[email protected]>
tanscorpio7
changed the title
Create and use composite actions in code coverage workflow to improve maintainability
Create and use composite actions for code coverage workflow to improve maintainability
Dec 5, 2023
basasairohan
approved these changes
Dec 6, 2023
Signed-off-by: Tanzeel Khan <[email protected]>
Signed-off-by: Tanzeel Khan <[email protected]>
thephantomthief
approved these changes
Dec 11, 2023
shardgupta
approved these changes
Dec 11, 2023
shardgupta
merged commit Dec 11, 2023
507088e
into
babelfish-for-postgresql:BABEL_3_X_DEV
29 checks passed
Sairakan
pushed a commit
to amazon-aurora/babelfish_extensions
that referenced
this pull request
Dec 21, 2023
…e maintainability (babelfish-for-postgresql#2100) Github actions for running jdbc, odbc, python and dotnet were copied from the respective workflow files into code-coverage workflow file. Now any changes in the original action demands a similar change in the code coverage file as well increasing redundant effort. To improve maintainability we move these actions to new composite actions and reuse them in workflows. Also added a new optional variable in build-modified-postgres/action.yml to optionally build postgres with the enable code coverage flag. Issues Resolved [BABEL-4605] Signed-off-by: Tanzeel Khan [email protected]
Sairakan
pushed a commit
to amazon-aurora/babelfish_extensions
that referenced
this pull request
Dec 21, 2023
…e maintainability (babelfish-for-postgresql#2100) Github actions for running jdbc, odbc, python and dotnet were copied from the respective workflow files into code-coverage workflow file. Now any changes in the original action demands a similar change in the code coverage file as well increasing redundant effort. To improve maintainability we move these actions to new composite actions and reuse them in workflows. Also added a new optional variable in build-modified-postgres/action.yml to optionally build postgres with the enable code coverage flag. Issues Resolved [BABEL-4605] Signed-off-by: Tanzeel Khan [email protected]
thephantomthief
added a commit
to thephantomthief/babelfish_extensions
that referenced
this pull request
Dec 22, 2023
* TSQL connection ps status always shows idle. (babelfish-for-postgresql#2107) This causes confusion because it would appear as if there is a memory leak issue because ps status shows idle while memory usage increases. This commit fixes that issue and will set the ps status to active when it is really active. PG engine code resets it back to idle. Task: BABEL-4604 Signed-off-by: Kristian Lejao <[email protected]> * Run MVU tests in release mode (babelfish-for-postgresql#2113) Task: BABEL-4449 Signed-off-by: Nirmit Shah <[email protected]> * Create and use composite actions for code coverage workflow to improve maintainability (babelfish-for-postgresql#2100) Github actions for running jdbc, odbc, python and dotnet were copied from the respective workflow files into code-coverage workflow file. Now any changes in the original action demands a similar change in the code coverage file as well increasing redundant effort. To improve maintainability we move these actions to new composite actions and reuse them in workflows. Also added a new optional variable in build-modified-postgres/action.yml to optionally build postgres with the enable code coverage flag. Issues Resolved [BABEL-4605] Signed-off-by: Tanzeel Khan [email protected] * Fix the issue that inserted table refered in update join will cause crash (babelfish-for-postgresql#2140) Previously when we implement update join, we missed a corner case that one of the join relations can be a named tuple store instead of RTE relation. And it'll lead analyzer to wrongly set resultRelation for the Query. This fix resolved the corner case by add a if condition to exclude RTE_NAMEDTUPLESTORE for being resultRelation. Task: BABEL-4606 Signed-off-by: Zhibai Song <[email protected]> * Fix system procedure sp_pkeys which may fail to return any row if parallel mode is enforced (babelfish-for-postgresql#2147) It is Postgres peculiarity with Hash cond (with operator text = name and text = name) that hash functions being used to hash text and name data type values are totally different, for example, hashtext would consider explicit collation whereas hashname does not care about explicit collation. That is the reason why hash condition would fail every time. (hashtext and hashname may produce different hash value for same input under collation other than "C"). This means that whenever there is such hash condition for Hash join then it would always fail and will not return any row. And optimiser can choose such hash join based on stats. Such issue is observed with helper view sys.sp_pkeys_view which is being used by system procedure sp_pkeys causing procedure to return zero rows when optimiser chooses certain hash join. This commit fixes such issue by casting name data type to appropriate T-SQL data type. Task: BABEL-4603 Signed-off-by: Dipesh Dhameliya [email protected] * Add Support for Uploading Coredumps in Github Actions (babelfish-for-postgresql#2148) In case of crash during the Tests run , if there is a server crash this action will create the text backtrace as well as upload the corefile as an artifact of Github action run. Example of workflow where coredump generated -https://github.com/babelfish-for-postgresql/babelfish_extensions/actions/runs/7194251970 Signed-off-by: Nirmit Shah [email protected] * Unblock test cases blocked due to BABEL-4539 (babelfish-for-postgresql#2047) With engine changes babelfish-for-postgresql/postgresql_modified_for_babelfish#260, we introduced new field in Port data structure to track whether given backend is Babelfish backend or not. This commit changes extension part of code to initialise it properly. Additionally, it also unblocks test cases blocked due to BABEL-4539. Engine changes: babelfish-for-postgresql/postgresql_modified_for_babelfish#260 Task: BABEL-4539 Signed-off-by: Dipesh Dhameliya <[email protected]> * Blocked CS_AS collation for server_collation_name as it is not supported in babelfish (babelfish-for-postgresql#2141) Babelfish currently supports only CI_AS type of collation for server collation and other collations such as CI_AI, CS_AI and CS_AS should be blocked. Currently CI_AI and CS_AI collation for server collation name is blocked but CS_AS is not blocked. It should also be blocked. This changes will block CS_AS collation for server collation name Task: BABEL-4632 Signed-off-by: Rohit Bhagat <[email protected]> * Unblock few more test cases for parallel worker testing (babelfish-for-postgresql#2156) After fixing few jiras related to parallel worker support for Babelfish, some new test cases are now started passing. This commit unblocks all such cases. Issues Resolved Task: BABEL-4392 Signed-off-by: Dipesh Dhameliya [email protected] * Add PR workflow for Static Code Analyzer and fix existing errors and warnings (babelfish-for-postgresql#2143) This commit integrates Static Code Analyzer with PR workflow to improve code quality and catch errors quickly, along with that this commit also fixes the existing errors and warnings. Signed-off-by: Sumit Jaiswal [email protected] * Fixed definition of parsename, session_context and sp_set_session_context (babelfish-for-postgresql#2152) Following is the current definition of PARSENAME, session_context and sp_set_session_context -- parsename CREATE OR REPLACE FUNCTION sys.parsename(object_name sys.VARCHAR, object_piece int) RETURNS sys.SYSNAME AS 'babelfishpg_tsql', 'parsename' LANGUAGE C IMMUTABLE STRICT; -- session_context CREATE OR REPLACE FUNCTION sys.session_context ("@key" sys.sysname) RETURNS sys.SQL_VARIANT AS 'babelfishpg_tsql', 'session_context' LANGUAGE C; GRANT EXECUTE ON FUNCTION sys.session_context TO PUBLIC; -- sp_set_session_context CREATE OR REPLACE PROCEDURE sys.sp_set_session_context ("@key" sys.sysname, "@value" sys.SQL_VARIANT, "@read_only" sys.bit = 0) AS 'babelfishpg_tsql', 'sp_set_session_context' LANGUAGE C; GRANT EXECUTE ON PROCEDURE sys.sp_set_session_context TO PUBLIC; But the correct definitions should be as follows, in these definitions sys.NVARCHAR should be used instead of sys.VARCHAR and sys.NVARCHAR(128) instead of sys.SYSNAME. This commit fixes such issues. --parsename CREATE OR REPLACE FUNCTION sys.parsename(object_name sys.NVARCHAR(128), object_piece int) RETURNS sys.NVARCHAR(128) AS 'babelfishpg_tsql', 'parsename' LANGUAGE C IMMUTABLE STRICT; -- session_context CREATE OR REPLACE FUNCTION sys.session_context ("@key" sys.NVARCHAR(128)) RETURNS sys.SQL_VARIANT AS 'babelfishpg_tsql', 'session_context' LANGUAGE C; GRANT EXECUTE ON FUNCTION sys.session_context TO PUBLIC; -- sp_set_session_context CREATE OR REPLACE PROCEDURE sys.sp_set_session_context ("@key" sys.NVARCHAR(128), "@value" sys.SQL_VARIANT, "@read_only" sys.bit = 0) AS 'babelfishpg_tsql', 'sp_set_session_context' LANGUAGE C; GRANT EXECUTE ON PROCEDURE sys.sp_set_session_context TO PUBLIC; Task: BABEL-4583 Signed-off-by: Rohit Bhagat <[email protected]> * Fix typmod for sys.binary datatype (babelfish-for-postgresql#2037) sys.binary datatype is created as a domain over sys.bbf_binary. In babelfish we assume hex code as varbinary which must then be casted to binary. For casting we fetch rule from hashmap after coercing both source and target to base type. So binary --> bbf_binary && varbinary-->bbf_varbinary This cast is currently defined as binary coercible, that is NO modification needed. https://github.com/babelfish-for-postgresql/babelfish_extensions/blob/c57e8bc7820e1ef697dd9898b3aa433ba504a7ab/contrib/babelfishpg_tsql/src/pltsql_coerce.c#L114 We fix it by adding proper function for varbinary --> binary cast -> The default length for local variables defined for binary and varbinary should be 1 DECLARE @A binary should be equivalent to DECLARE @A binary(1) DECLARE @A varbinary should be equivalent to DECLARE @A varbinary(1) ->Problems during dump and restore done during upgrade. The new function created for the cast may not exists in the source version and the ugrade scripts are run only after pg dump and restore carried out during version upgrade. So ultimately during dump and restore no cast exists for varbinary to binary, which is a necessary requirement or upgrade will fail with error : _"pg_restore: error: could not execute query: ERROR: argument of DEFAULT must be type sys."binary", not type sys.varbinary"_. if we are dumping a procedure with sys.binary arg and a default value -> binary to varbinary we do not need to modify binary to varbinary cast since we have a type modifer defined for base type of sys.varbinary i.e. CAST(sys.bbf_varbiniary as sys.bbf_varbiniary). Task: BABEL-4544 Signed-off-by: Tanzeel Khan <[email protected]> --------- Signed-off-by: Kristian Lejao <[email protected]> Signed-off-by: Nirmit Shah <[email protected]> Signed-off-by: Tanzeel Khan [email protected] Signed-off-by: Zhibai Song <[email protected]> Signed-off-by: Dipesh Dhameliya [email protected] Signed-off-by: Nirmit Shah [email protected] Signed-off-by: Rohit Bhagat <[email protected]> Signed-off-by: Sumit Jaiswal [email protected] Signed-off-by: Tanzeel Khan <[email protected]> Co-authored-by: Kristian Lejao <[email protected]> Co-authored-by: Nirmit Shah <[email protected]> Co-authored-by: Tanzeel Khan <[email protected]> Co-authored-by: Zhibai Song <[email protected]> Co-authored-by: Dipesh Dhameliya <[email protected]> Co-authored-by: Rohit bhagat <[email protected]> Co-authored-by: Sumit Jaiswal <[email protected]>
Sairakan
pushed a commit
to amazon-aurora/babelfish_extensions
that referenced
this pull request
Dec 24, 2023
…e maintainability (babelfish-for-postgresql#2100) Github actions for running jdbc, odbc, python and dotnet were copied from the respective workflow files into code-coverage workflow file. Now any changes in the original action demands a similar change in the code coverage file as well increasing redundant effort. To improve maintainability we move these actions to new composite actions and reuse them in workflows. Also added a new optional variable in build-modified-postgres/action.yml to optionally build postgres with the enable code coverage flag. Issues Resolved [BABEL-4605] Signed-off-by: Tanzeel Khan [email protected]
Sairakan
pushed a commit
to amazon-aurora/babelfish_extensions
that referenced
this pull request
Dec 24, 2023
…e maintainability (babelfish-for-postgresql#2100) Github actions for running jdbc, odbc, python and dotnet were copied from the respective workflow files into code-coverage workflow file. Now any changes in the original action demands a similar change in the code coverage file as well increasing redundant effort. To improve maintainability we move these actions to new composite actions and reuse them in workflows. Also added a new optional variable in build-modified-postgres/action.yml to optionally build postgres with the enable code coverage flag. Issues Resolved [BABEL-4605] Signed-off-by: Tanzeel Khan [email protected]
Sairakan
pushed a commit
to amazon-aurora/babelfish_extensions
that referenced
this pull request
Dec 24, 2023
…e maintainability (babelfish-for-postgresql#2100) Github actions for running jdbc, odbc, python and dotnet were copied from the respective workflow files into code-coverage workflow file. Now any changes in the original action demands a similar change in the code coverage file as well increasing redundant effort. To improve maintainability we move these actions to new composite actions and reuse them in workflows. Also added a new optional variable in build-modified-postgres/action.yml to optionally build postgres with the enable code coverage flag. Issues Resolved [BABEL-4605] Signed-off-by: Tanzeel Khan [email protected]
Sairakan
pushed a commit
to amazon-aurora/babelfish_extensions
that referenced
this pull request
Dec 28, 2023
…e maintainability (babelfish-for-postgresql#2100) Github actions for running jdbc, odbc, python and dotnet were copied from the respective workflow files into code-coverage workflow file. Now any changes in the original action demands a similar change in the code coverage file as well increasing redundant effort. To improve maintainability we move these actions to new composite actions and reuse them in workflows. Also added a new optional variable in build-modified-postgres/action.yml to optionally build postgres with the enable code coverage flag. Issues Resolved [BABEL-4605] Signed-off-by: Tanzeel Khan [email protected]
Sairakan
pushed a commit
to amazon-aurora/babelfish_extensions
that referenced
this pull request
Dec 28, 2023
…e maintainability (babelfish-for-postgresql#2100) Github actions for running jdbc, odbc, python and dotnet were copied from the respective workflow files into code-coverage workflow file. Now any changes in the original action demands a similar change in the code coverage file as well increasing redundant effort. To improve maintainability we move these actions to new composite actions and reuse them in workflows. Also added a new optional variable in build-modified-postgres/action.yml to optionally build postgres with the enable code coverage flag. Issues Resolved [BABEL-4605] Signed-off-by: Tanzeel Khan [email protected]
priyansx
pushed a commit
that referenced
this pull request
Dec 29, 2023
…e maintainability (#2100) Github actions for running jdbc, odbc, python and dotnet were copied from the respective workflow files into code-coverage workflow file. Now any changes in the original action demands a similar change in the code coverage file as well increasing redundant effort. To improve maintainability we move these actions to new composite actions and reuse them in workflows. Also added a new optional variable in build-modified-postgres/action.yml to optionally build postgres with the enable code coverage flag. Issues Resolved [BABEL-4605] Signed-off-by: Tanzeel Khan [email protected]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Github actions for running jdbc, odbc, python and dotnet were copied from the respective workflow files into code-coverage workflow file. Now any changes in the original action demands a similar change in the code coverage file as well increasing redundant effort.
To improve maintainability we move these actions to new composite actions and reuse them in workflows.
Also added a new optional variable in build-modified-postgres/action.yml to optionally build postgres with the enable code coverage flag.
Issues Resolved
[BABEL-4605]
Sign Off
Signed-off-by: Tanzeel Khan [email protected]
Check List
By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.