Skip to content

Commit e0445a7

Browse files
Merge pull request #743 from bruin-data/fix/env-in-fill-from-db
refactor: enhance environment handling in BruinPanel and AssetGeneral
2 parents 344ec93 + 0d71947 commit e0445a7

5 files changed

Lines changed: 20 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Changelog
2+
## [0.79.4] - [2026-03-23]
3+
- Fixed "Fill from DB" to use the selected environment instead of the default environment.
4+
- Fixed start date input to remain enabled when "Full Refresh" is selected.
5+
26
## [0.79.3] - [2026-03-18]
37
- Added ability to select text in the SQL editor and run the selection directly in Query Preview for debugging.
48

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ Bruin is a unified analytics platform that enables data professionals to work en
7070
## Release Notes
7171

7272
### Recent Update
73+
- **0.79.4**: Fixed "Fill from DB" to use selected environment; fixed start date input on full refresh.
74+
- **0.79.3**: Added ability to select and run SQL text directly in Query Preview.
7375
- **0.79.2**: Added cancel button for export query operations, allowing users to stop long-running exports.
7476
- **0.79.1**: Fixed SQL Editor syntax highlighting.
7577
- **0.79.0**: Added copy results as CSV, TSV, or JSON to the Query Preview.
76-
- **0.78.2**: Fixed a bug where editing a connection would incorrectly overwrite existing values with default field values.
77-
- **0.78.1**: Added lock environment toggle in Query Preview.
7878

7979
For a full changelog, see Bruin Extension [Changelog](https://github.com/bruin-data/bruin-vscode/blob/main/CHANGELOG.md).

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "bruin",
33
"displayName": "Bruin",
44
"description": "Manage your Bruin data assets from within VS Code.",
5-
"version": "0.79.3",
5+
"version": "0.79.4",
66
"engines": {
77
"vscode": "^1.87.0"
88
},

src/panels/BruinPanel.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,10 @@ export class BruinPanel {
787787
getBruinExecutablePath(),
788788
assetWorkspaceDir
789789
);
790-
await fillDependencies.fillDependencies(assetPath);
790+
const fillDependenciesFlags = this._currentEnvironment
791+
? ["--environment", this._currentEnvironment]
792+
: [];
793+
await fillDependencies.fillDependencies(assetPath, { flags: fillDependenciesFlags });
791794

792795
return;
793796

@@ -846,7 +849,10 @@ export class BruinPanel {
846849
getBruinExecutablePath(),
847850
assetWorkspaceDirFillColumn
848851
);
849-
await fillColumns.fillColumns(assetPathFillColumn);
852+
const fillColumnsFlags = this._currentEnvironment
853+
? ["--environment", this._currentEnvironment]
854+
: [];
855+
await fillColumns.fillColumns(assetPathFillColumn, { flags: fillColumnsFlags });
850856
parseAssetCommand(this._lastRenderedDocumentUri);
851857
return;
852858

@@ -860,8 +866,7 @@ export class BruinPanel {
860866
break;
861867
case "bruin.setSelectedEnvironment":
862868
const envData = message.payload;
863-
console.log("Setting selected environment :", envData);
864-
869+
865870
// Store the environment for metadata calls
866871
this._currentEnvironment = envData;
867872

webview-ui/src/components/asset/AssetGeneral.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ const language = ref("");
10311031
const code = ref(null);
10321032
onMounted(() => {
10331033
if (props.selectedEnvironment) {
1034-
selectedEnv.value = props.selectedEnvironment;
1034+
setSelectedEnv(props.selectedEnvironment);
10351035
}
10361036
const persistedState = vscode.getState() as {
10371037
checkboxState?: { [key: string]: boolean };
@@ -1086,7 +1086,9 @@ onMounted(() => {
10861086
watch(
10871087
() => props.selectedEnvironment,
10881088
(newValue) => {
1089-
selectedEnv.value = newValue;
1089+
if (newValue) {
1090+
setSelectedEnv(newValue);
1091+
}
10901092
}
10911093
);
10921094

0 commit comments

Comments
 (0)