microsoft / microsoft/DacFx

sqlpackage deployment script is recognized differently due to CR/LF.

Open
#588 7 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
460
Forks
29
Avg merge
4d 9h
Merged PRs (30d)
7

Description

  • SqlPackage or DacFx Version: SqlPackage 162.5.57.1
  • .NET Framework (Windows-only) or .NET Core: .NET Frameworkd and .NET Core
  • Environment (local platform and source/target platforms): Windows and Linux(docker)

Steps to Reproduce:
I am developing a deployment pipeline using SqlPackage. The build (creating a Nuget package) is done on a Windows server. The deployment is executed on a Linux container. When I generate a deployment script using the Action:Script command in SqlPackage, it recognizes that the versions are different due to the CR/LF problem, and recognizes it as a new version even though there are no changes.

  1. Create Nuget on Windows
    msbuild.exe" "${{ inputs.projectFile }}" /p:Configuration=Release /p:platform="any cpu" /p:OutputPath="${{ env.releasePath }})

  2. Create deploy script on Linux (Conteriner)
    sqlpackage /action:script
    /sf: DB.dacpac
    /pr:DB.publish.xml
    /op:output.sql
    /tsn:TARGET_SERVER_DOMAIN
    /tdn:TARGET_DB_NAME
    /tu:TARGET_USER_ID /ttsc:true
    /tp:TARGET_USER_PWD \

Did this occur in prior versions? If not - which version(s) did it work in?

(DacFx/SqlPackage/SSMS/Azure Data Studio)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior with the supplied SqlPackage /action:script command, using DB.dacpac and DB.publish.xml built on Windows and run in the Linux container. Compare output.sql and investigate how deployment script generation handles CR/LF differences; done when an unchanged database does not produce a new version solely because of line endings.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, sql
Domain
databases, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.