databricks-cli/libs/dbr
shreyas-goenka 897741f55a
Store DBR version in context (#2438)
## Changes
This PR also starts storing the DBR versions in the context.

Go patch file used:
```
@@
var x expression
@@
-dbr.MockRuntime(x, true)
+dbr.MockRuntime(x, dbr.Environment{IsDbr: true, Version: "15.4"})

@@
var x expression
@@
-dbr.MockRuntime(x, false)
+dbr.MockRuntime(x, dbr.Environment{})
```

ref: https://github.com/uber-go/gopatch

## Why
This localised all DBR version accesses to `libs/dbr`. Relevant comment:
https://github.com/databricks/cli/pull/2432#discussion_r1982878616

## Tests
Exiting tests are modified.
2025-03-06 13:01:43 +00:00
..
context.go Store DBR version in context (#2438) 2025-03-06 13:01:43 +00:00
context_test.go Store DBR version in context (#2438) 2025-03-06 13:01:43 +00:00
detect.go Store DBR version in context (#2438) 2025-03-06 13:01:43 +00:00
detect_test.go Store DBR version in context (#2438) 2025-03-06 13:01:43 +00:00