Skip to content
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

mssql liquibase 4.20.0 - IndexSnapshotGenerator.snapshotObject raises NPE at row 269 #3976

Open
2 tasks done
alexandru-prigoreanu opened this issue Mar 18, 2023 · 3 comments
Labels
good first issue This issue is an easy starter project for new contributors.

Comments

@alexandru-prigoreanu
Copy link

alexandru-prigoreanu commented Mar 18, 2023

Search first

  • I searched and no similar issues were found

Description

hello! thank you for this api and for your time.

mssql liquibase 4.20.0 - IndexSnapshotGenerator.snapshotObject raises NPE at row 269

            if ((database instanceof MSSQLDatabase) && (Boolean) row.get("IS_INCLUDED_COLUMN")) {
                List<String> includedColumns = returnIndex.getAttribute("includedColumns", List.class);
                if (includedColumns == null) {
                    includedColumns = new ArrayList<>();
                    returnIndex.setAttribute("includedColumns", includedColumns);
                }
                includedColumns.add(columnName);
            }

row 269 is the first one in the aforementioned code

the NPE prevents the application from starting

Steps To Reproduce

it happens with changesets similar to

<changeSet id="someId" author="someAuthor">
    <preConditions onFail="MARK_RAN">
        <indexExists indexName="IDX_TABLENAME_TIME"/>
    </preConditions>
    <dropIndex tableName="TABLENAME" indexName="IDX_TABLENAME_TIME"/>
</changeSet>

Expected/Desired Behavior

we expect the application to start.

Liquibase Version

4.20.0

Database Vendor & Version

mssql 19

Liquibase Integration

spring boot

Liquibase Extensions

No response

OS and/or Infrastructure Type/Provider

mac m1, mssql 19 docker image

Additional Context

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR (Thank you!)
@nvoxland
Copy link
Contributor

Is it the row object that's null? It doesn't seem like it could be, since it's used earlier?

If you are able to add whatever needed check gets your update to pass and send it as a PR, that would be greatly appreciated.

@nvoxland nvoxland added the good first issue This issue is an easy starter project for new contributors. label Mar 23, 2023
@alexandru-prigoreanu
Copy link
Author

@nvoxland hello! looks like the NPE was fixed by 57a1779.
we may close / reject this. thank you!

@precoder
Copy link

We are also getting the same error with the 4.19.0 version of the Liquibase and updated to 4.20.0 but is is also available on the latest version. I have seen that the issue is fixed on the master.

Do you have a release plan for 4.20.1 with this fix or do you have any snapshot builds that we can use until fix is released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue This issue is an easy starter project for new contributors.
Projects
Status: Open Issues
Development

No branches or pull requests

3 participants