microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.54k stars 898 forks source link

Wrong objects included in script due to not including SqlProcs #6192

Closed glittle closed 3 years ago

glittle commented 5 years ago

Issue Type: Bug

I did a comparison and ended up with changes to 3 views and lots of stored procedures.

I deselected all items except for one view.

When I clicked to "Generate Script", that view was included in the script (as expected), but the LAST stored procedure in the list was also included in the script, even though it was NOT selected to "Include".

Azure Data Studio version: azuredatastudio 1.8.0 (96e214593190071f0b520439929b218f9fa673de, 2019-06-06T01:59:30.203Z) OS version: Windows_NT x64 10.0.17763

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (12 x 3192)| |GPU Status|2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|31.84GB (18.85GB free)| |Process Argv|| |Screen Reader|no| |VM|0%|
adsbot[bot] commented 5 years ago

Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

glittle commented 5 years ago

No, this is not related to issue 556.

glittle commented 5 years ago

This is for the Schema Compare extension.

udeeshagautam commented 5 years ago

Seems like a DacFx issue - failing to exclude SqlProcs (was able to repro on SSDT too)

esben2000 commented 5 years ago

I have the same problem, also with other objects. It seems like the 'Include' checkboxes is not respected very well.

kisantia commented 3 years ago

@glittle @esben2000 is this still happening? We made a fix(https://github.com/microsoft/azuredatastudio/pull/8042) last year to make it more clear when an object can't be excluded. Previously, the schema compare differences table wouldn't get updated if an exclude request failed due to included dependencies, which could be why objects looked like they were excluded but still showed up in the generated script.