Skip to content

SQLAction DriftReport fails to execute #166

@JoshFieldstad

Description

@JoshFieldstad

Problem description/replication steps

When sql-action is invoked like below:

      - name: Generate Drift Report
        uses: azure/sql-action@v2
        with:
          connection-string: ${{ secrets.BAR_CONNECTIONSTRING }}
          path: foo\bar.dacpac
          action: 'DriftReport'
          arguments: "/OutputPath:'${{ github.workspace }}/driftreport'"

The below error is given:

'SourceFile' is not a valid argument for the 'DriftReport' action.

To resolve this, I attempted to remove the path parameter from the azure/sql-action invocation. This throws the below error.

Error: Input required and not supplied: path

Microsoft documentation does not contain a /SourceFile: parameter for the sql package driftreport action. https://learn.microsoft.com/en-us/sql/tools/sqlpackage/sqlpackage-deploy-drift-report?view=sql-server-ver16#driftreport-action-parameters

It looks like this could be resolved by modifying this case statement to only add /SourceFile: for Publish, Script, and Deploy report. https://github.com/Azure/sql-action/blob/master/src/AzureSqlAction.ts#:~:text=case%20SqlPackageAction.,break%3B

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions