GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Coverage files not mapped after upgrade to cli 3.1.7 · Issue #162 · utPLSQL/utPLSQL-cli

Coverage files not mapped after upgrade to cli 3.1.7 #162

New issue
Copy link
New issue
Copy link
Closed
utPLSQL/utPLSQL-java-api
#90
utPLSQL/utPLSQL-java-api#90
Closed
Coverage files not mapped after upgrade to cli 3.1.7#162
utPLSQL/utPLSQL-java-api
#90
Copy link
Assignees
pesse
Labels
bug

Description

@jgebal
jgebal
opened on Jul 14, 2019
Issue body actions

While trying new build pipeline with Azure on out uPLSQL-demo-project, I've decided to switch to latest utPLSQL-cli.
It was then, when I've noticed that coverage is not getting reported on project files.

At first I thought that it's related to build configuration itself but after a bit of unsuccessful debugging I've decided to switch to utPLSQL-cli v3.1.6

On utPLSQL-cli v 3.1.6 coverage is generated without issues.

The reason for missing coverage is missing/invalid files mapping.

Seems like regression in v3.1.7.

Worth noting is that utPLSQL-core is using files-mapping to narrow the scope of coverage.
When file names are passed in incorrect form, the result of mapping will be empty.

I suspect that either:

  • the file mappings are getting passed in a different way (maybe swapped?)
  • one of regex_expression, type_mapping, owner/type/name/subexpression is not passed correctly

The difference in behavior can be seen here:

  • in test run with 3.1.7, coverage is empty and the sonar test_results.xml contains DB object_name as file_name.
  • in test run with 3.1.6 coverage is populated and the sonar test_results.xml contains expected file_names.

Activity

  1. jgebal commented on Jul 14, 2019

    @jgebal
    jgebal
    on Jul 14, 2019
    MemberAuthor
    More actions

    I did a bit of debug on utPLSQL itself to capture what is passed from cli.
    Here are the outputs from invocations:

    utPLSQL-cli v3.1.7

    a_file_paths	<UT_VARCHAR2_LIST>
      <VARCHAR2>source\api\be_between.syn</VARCHAR2>
      <VARCHAR2>source\api\be_empty.syn</VARCHAR2>
    ...
      <VARCHAR2>source\uninstall_objects.sql</VARCHAR2>
      <VARCHAR2>source\uninstall_synonyms.sql</VARCHAR2>
    </UT_VARCHAR2_LIST>
    a_file_to_object_type_mapping	<UT_KEY_VALUE_PAIRS/>
    l_file_to_object_type_mapping	<UT_KEY_VALUE_PAIRS/>
    a_regex_pattern=	
    a_object_owner_subexpression=	
    a_object_name_subexpression=	
    a_object_type_subexpression=	
    a_file_paths	<UT_VARCHAR2_LIST>
      <VARCHAR2>test\common_helper\utplsql.pkb</VARCHAR2>
      <VARCHAR2>test\common_helper\utplsql.pks</VARCHAR2>
    ...
      <VARCHAR2>test\ut3_user\test_user.pkb</VARCHAR2>
      <VARCHAR2>test\ut3_user\test_user.pks</VARCHAR2>
    </UT_VARCHAR2_LIST>
    a_file_to_object_type_mapping	<UT_KEY_VALUE_PAIRS/>
    l_file_to_object_type_mapping	<UT_KEY_VALUE_PAIRS/>
    a_regex_pattern=	
    a_object_owner_subexpression=	
    a_object_name_subexpression=	
    a_object_type_subexpression=	
    

    utPLSQL-cli v3.1.6

    a_file_paths	<UT_VARCHAR2_LIST>
      <VARCHAR2>source\api\be_between.syn</VARCHAR2>
      <VARCHAR2>source\api\be_empty.syn</VARCHAR2>
    ...
      <VARCHAR2>source\uninstall_objects.sql</VARCHAR2>
      <VARCHAR2>source\uninstall_synonyms.sql</VARCHAR2>
    </UT_VARCHAR2_LIST>
    a_file_to_object_type_mapping	
    l_file_to_object_type_mapping	<UT_KEY_VALUE_PAIRS>
      <UT_KEY_VALUE_PAIR>
        <KEY>fnc</KEY>
        <VALUE>FUNCTION</VALUE>
      </UT_KEY_VALUE_PAIR>
      <UT_KEY_VALUE_PAIR>
        <KEY>prc</KEY>
        <VALUE>PROCEDURE</VALUE>
      </UT_KEY_VALUE_PAIR>
      <UT_KEY_VALUE_PAIR>
        <KEY>tpb</KEY>
        <VALUE>TYPE BODY</VALUE>
      </UT_KEY_VALUE_PAIR>
      <UT_KEY_VALUE_PAIR>
        <KEY>pkb</KEY>
        <VALUE>PACKAGE BODY</VALUE>
      </UT_KEY_VALUE_PAIR>
      <UT_KEY_VALUE_PAIR>
        <KEY>bdy</KEY>
        <VALUE>PACKAGE BODY</VALUE>
      </UT_KEY_VALUE_PAIR>
      <UT_KEY_VALUE_PAIR>
        <KEY>trg</KEY>
        <VALUE>TRIGGER</VALUE>
      </UT_KEY_VALUE_PAIR>
    </UT_KEY_VALUE_PAIRS>
    a_regex_pattern=	
    a_object_owner_subexpression=	
    a_object_name_subexpression=	
    a_object_type_subexpression=	
    a_file_paths	<UT_VARCHAR2_LIST>
      <VARCHAR2>test\common_helper\utplsql.pkb</VARCHAR2>
      <VARCHAR2>test\common_helper\utplsql.pks</VARCHAR2>
    ...
      <VARCHAR2>test\ut3_user\test_user.pkb</VARCHAR2>
      <VARCHAR2>test\ut3_user\test_user.pks</VARCHAR2>
    </UT_VARCHAR2_LIST>
    a_file_to_object_type_mapping	
    l_file_to_object_type_mapping	<UT_KEY_VALUE_PAIRS>
      <UT_KEY_VALUE_PAIR>
        <KEY>fnc</KEY>
        <VALUE>FUNCTION</VALUE>
      </UT_KEY_VALUE_PAIR>
      <UT_KEY_VALUE_PAIR>
        <KEY>prc</KEY>
        <VALUE>PROCEDURE</VALUE>
      </UT_KEY_VALUE_PAIR>
      <UT_KEY_VALUE_PAIR>
        <KEY>tpb</KEY>
        <VALUE>TYPE BODY</VALUE>
      </UT_KEY_VALUE_PAIR>
      <UT_KEY_VALUE_PAIR>
        <KEY>pkb</KEY>
        <VALUE>PACKAGE BODY</VALUE>
      </UT_KEY_VALUE_PAIR>
      <UT_KEY_VALUE_PAIR>
        <KEY>bdy</KEY>
        <VALUE>PACKAGE BODY</VALUE>
      </UT_KEY_VALUE_PAIR>
      <UT_KEY_VALUE_PAIR>
        <KEY>trg</KEY>
        <VALUE>TRIGGER</VALUE>
      </UT_KEY_VALUE_PAIR>
    </UT_KEY_VALUE_PAIRS>
    a_regex_pattern=	
    a_object_owner_subexpression=	
    a_object_name_subexpression=	
    a_object_type_subexpression=	
    

    It seems that in 3.1.7, the parameter a_file_to_object_type_mapping is passed as empty array.
    utPLSQL-core is using default object_type mapping when the passed argument is null.

    Since empty array is not a valid value, we could treat empty array the same way we treat null and replace it with default mapping in utPLSQL-core.
    This doesn't change the fact that for backward compatibility utPLSQL-cli needs to be fixed.

  2. jgebal
    added
    bug
    on Jul 14, 2019
  3. pesse
    self-assigned this
    on Jul 15, 2019
  4. pesse commented on Jul 15, 2019

    @pesse
    pesse
    on Jul 15, 2019
    Member
    More actions

    Okay, got it - we call it now as empty array but should pass as null when not set.
    That somewhat contradicts my goals to become more immutable 🤪

    Question: Is an empty mapping array ever a valid option? I don't think so but would be sure.
    If not, I'll handle this in the api, so we don't rely on any client to distinguish between empty/null.

  5. jgebal commented on Jul 15, 2019

    @jgebal
    jgebal
    on Jul 15, 2019
    MemberAuthor
    More actions

    Empty array is not a valid input as it will never cause a proper mapping.
    Null/missing parameter is identified as "use defaults" directive for framework, just like with many other parameters.

  6. pesse
    added a commit that references this issue on Jul 16, 2019

    Default TypeMapping is used on NULL and also empty typeMap parameter

    952d344
  7. pesse
    closed this as completedin utPLSQL-java-api#90on Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @pesse
    pesse

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.