sqlmesh 0.184.4.dev12__py3-none-any.whl → 0.184.4.dev14__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sqlmesh/_version.py +2 -2
- sqlmesh/integrations/github/cicd/command.py +3 -3
- sqlmesh/integrations/github/cicd/config.py +7 -0
- sqlmesh/integrations/github/cicd/controller.py +5 -1
- sqlmesh/lsp/main.py +4 -2
- {sqlmesh-0.184.4.dev12.dist-info → sqlmesh-0.184.4.dev14.dist-info}/METADATA +1 -1
- {sqlmesh-0.184.4.dev12.dist-info → sqlmesh-0.184.4.dev14.dist-info}/RECORD +11 -11
- {sqlmesh-0.184.4.dev12.dist-info → sqlmesh-0.184.4.dev14.dist-info}/WHEEL +0 -0
- {sqlmesh-0.184.4.dev12.dist-info → sqlmesh-0.184.4.dev14.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.184.4.dev12.dist-info → sqlmesh-0.184.4.dev14.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.184.4.dev12.dist-info → sqlmesh-0.184.4.dev14.dist-info}/top_level.txt +0 -0
sqlmesh/_version.py
CHANGED
|
@@ -17,5 +17,5 @@ __version__: str
|
|
|
17
17
|
__version_tuple__: VERSION_TUPLE
|
|
18
18
|
version_tuple: VERSION_TUPLE
|
|
19
19
|
|
|
20
|
-
__version__ = version = '0.184.4.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 184, 4, '
|
|
20
|
+
__version__ = version = '0.184.4.dev14'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 184, 4, 'dev14')
|
|
@@ -210,7 +210,7 @@ def _run_all(controller: GithubController) -> None:
|
|
|
210
210
|
has_required_approval = False
|
|
211
211
|
is_auto_deploying_prod = (
|
|
212
212
|
controller.deploy_command_enabled or controller.do_required_approval_check
|
|
213
|
-
)
|
|
213
|
+
) and controller.pr_targets_prod_branch
|
|
214
214
|
if controller.is_comment_added:
|
|
215
215
|
if not controller.deploy_command_enabled:
|
|
216
216
|
# We aren't using commands so we can just return
|
|
@@ -267,7 +267,7 @@ def _run_all(controller: GithubController) -> None:
|
|
|
267
267
|
status=GithubCheckStatus.COMPLETED, conclusion=GithubCheckConclusion.SKIPPED
|
|
268
268
|
)
|
|
269
269
|
deployed_to_prod = False
|
|
270
|
-
if has_required_approval and prod_plan_generated:
|
|
270
|
+
if has_required_approval and prod_plan_generated and controller.pr_targets_prod_branch:
|
|
271
271
|
deployed_to_prod = _deploy_production(controller)
|
|
272
272
|
elif is_auto_deploying_prod:
|
|
273
273
|
if not has_required_approval:
|
|
@@ -292,7 +292,7 @@ def _run_all(controller: GithubController) -> None:
|
|
|
292
292
|
if (
|
|
293
293
|
not pr_environment_updated
|
|
294
294
|
or not prod_plan_generated
|
|
295
|
-
or (has_required_approval and not deployed_to_prod)
|
|
295
|
+
or (has_required_approval and controller.pr_targets_prod_branch and not deployed_to_prod)
|
|
296
296
|
):
|
|
297
297
|
raise CICDBotError(
|
|
298
298
|
"A step of the run-all check failed. See check status for more information."
|
|
@@ -28,6 +28,7 @@ class GithubCICDBotConfig(BaseConfig):
|
|
|
28
28
|
pr_include_unmodified: t.Optional[bool] = None
|
|
29
29
|
run_on_deploy_to_prod: bool = False
|
|
30
30
|
pr_environment_name: t.Optional[str] = None
|
|
31
|
+
prod_branch_names_: t.Optional[str] = Field(default=None, alias="prod_branch_name")
|
|
31
32
|
|
|
32
33
|
@model_validator(mode="before")
|
|
33
34
|
@classmethod
|
|
@@ -42,6 +43,12 @@ class GithubCICDBotConfig(BaseConfig):
|
|
|
42
43
|
|
|
43
44
|
return data
|
|
44
45
|
|
|
46
|
+
@property
|
|
47
|
+
def prod_branch_names(self) -> t.List[str]:
|
|
48
|
+
if self.prod_branch_names_:
|
|
49
|
+
return [self.prod_branch_names_]
|
|
50
|
+
return ["main", "master"]
|
|
51
|
+
|
|
45
52
|
FIELDS_FOR_ANALYTICS: t.ClassVar[t.Set[str]] = {
|
|
46
53
|
"invalidate_environment_after_deploy",
|
|
47
54
|
"enable_deploy_command",
|
|
@@ -76,7 +76,7 @@ class PullRequestInfo(PydanticModel):
|
|
|
76
76
|
return cls(
|
|
77
77
|
owner=owner,
|
|
78
78
|
repo=repo,
|
|
79
|
-
pr_number=pr_number,
|
|
79
|
+
pr_number=int(pr_number),
|
|
80
80
|
)
|
|
81
81
|
|
|
82
82
|
|
|
@@ -444,6 +444,10 @@ class GithubController:
|
|
|
444
444
|
def removed_snapshots(self) -> t.Set[SnapshotId]:
|
|
445
445
|
return set(self.prod_plan_with_gaps.context_diff.removed_snapshots)
|
|
446
446
|
|
|
447
|
+
@property
|
|
448
|
+
def pr_targets_prod_branch(self) -> bool:
|
|
449
|
+
return self._pull_request.base.ref in self.bot_config.prod_branch_names
|
|
450
|
+
|
|
447
451
|
@classmethod
|
|
448
452
|
def _append_output(cls, key: str, value: str) -> None:
|
|
449
453
|
"""
|
sqlmesh/lsp/main.py
CHANGED
|
@@ -119,9 +119,11 @@ class SQLMeshLanguageServer:
|
|
|
119
119
|
# /api/lineage/{model}/{column}
|
|
120
120
|
model_name = urllib.parse.unquote(path_parts[2])
|
|
121
121
|
column = urllib.parse.unquote(path_parts[3])
|
|
122
|
-
|
|
122
|
+
models_only = False
|
|
123
|
+
if hasattr(request, "params"):
|
|
124
|
+
models_only = bool(getattr(request.params, "models_only", False))
|
|
123
125
|
column_lineage_response = column_lineage(
|
|
124
|
-
model_name, column,
|
|
126
|
+
model_name, column, models_only, self.lsp_context.context
|
|
125
127
|
)
|
|
126
128
|
return ApiResponseGetColumnLineage(data=column_lineage_response).model_dump(
|
|
127
129
|
mode="json"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
sqlmesh/__init__.py,sha256=DRovDXI-9D9xeYDP7t8Fq7mI31S2btlN-LHPOK3y7PA,7240
|
|
2
|
-
sqlmesh/_version.py,sha256=
|
|
2
|
+
sqlmesh/_version.py,sha256=ryFfTSmb2qC6iNaBEqsWbakbtFWYm0fiH2M1kEnNjlw,530
|
|
3
3
|
sqlmesh/magics.py,sha256=aeOyTdeNnyGzGtJXECDAbqJ8OAplrV4UAYl0I2hhtig,39670
|
|
4
4
|
sqlmesh/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
sqlmesh/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -152,14 +152,14 @@ sqlmesh/integrations/llm.py,sha256=URgp3JKr06HYv6hGlJ7DQ9m3QCc41xRWK23HzmGpbDI,1
|
|
|
152
152
|
sqlmesh/integrations/slack.py,sha256=nxLxu5WztGbZH3JdqnzyPqmJUMfRdJ_49LQ7zR-u39Q,6801
|
|
153
153
|
sqlmesh/integrations/github/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
154
154
|
sqlmesh/integrations/github/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
155
|
-
sqlmesh/integrations/github/cicd/command.py,sha256=
|
|
156
|
-
sqlmesh/integrations/github/cicd/config.py,sha256=
|
|
157
|
-
sqlmesh/integrations/github/cicd/controller.py,sha256=
|
|
155
|
+
sqlmesh/integrations/github/cicd/command.py,sha256=E3G53jlLEgu1nCHpGW-P7zklIyp6wGWtkJQ-6xJHclI,11415
|
|
156
|
+
sqlmesh/integrations/github/cicd/config.py,sha256=tRhMZaLf1p6AWXvi67n85Q-lptJNGt1Wk_Jr61ytpiM,2104
|
|
157
|
+
sqlmesh/integrations/github/cicd/controller.py,sha256=EXFB_AHR_B4gTXMjX3CE6jZSvlENJ2BiI-Y7Wg6eGq4,41667
|
|
158
158
|
sqlmesh/lsp/api.py,sha256=LJdECSaEZoPbu_Xl4KscVG-WLt7_g4dY-zKGO68dH14,2162
|
|
159
159
|
sqlmesh/lsp/completions.py,sha256=Uo8lUzPBeoB58Eu2642YoAtNI0pgIFWFSvwmuJALTv4,3583
|
|
160
160
|
sqlmesh/lsp/context.py,sha256=Ff09vrsawdYS-7YcXbGZW_RU-tj_-k8WV7maCghpYp0,1438
|
|
161
161
|
sqlmesh/lsp/custom.py,sha256=GvNAiW7imPI8xmIx3qLWN5FljGPHFJKh0N5b6aZnwRo,489
|
|
162
|
-
sqlmesh/lsp/main.py,sha256=
|
|
162
|
+
sqlmesh/lsp/main.py,sha256=6lxwiZOwlU3LsiCWKPHEA-goRihC_LqhuGJ9-5FJtCc,17223
|
|
163
163
|
sqlmesh/lsp/reference.py,sha256=MiTnNmaGrVs1Scms3jHkZ89Cu8_ZLJGAHcs1LRywFdU,8129
|
|
164
164
|
sqlmesh/lsp/uri.py,sha256=mvSLbZGmMTHPpliThOtVWiFcHnfJzp1w39q9l-xD2SI,802
|
|
165
165
|
sqlmesh/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -268,7 +268,7 @@ sqlmesh/utils/pydantic.py,sha256=-u69PDY-4FLR7ODNKBoN7PsPNmZ0wdhsJcCAG2P6vyY,110
|
|
|
268
268
|
sqlmesh/utils/rich.py,sha256=xNZyPCqEc4TAlJlsEthg-5eYUWpaizz0QjBzO7a1Yv4,1509
|
|
269
269
|
sqlmesh/utils/windows.py,sha256=r7Yin4WEwbvH7sKA3hOJtRsclmscNuBeCklCfVPvtQs,611
|
|
270
270
|
sqlmesh/utils/yaml.py,sha256=np-WVcwmwsKghCgAj1OBBMsK1SXSRn4wR-H37cGiFr8,2282
|
|
271
|
-
sqlmesh-0.184.4.
|
|
271
|
+
sqlmesh-0.184.4.dev14.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
|
|
272
272
|
web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
273
273
|
web/client/dist/index.html,sha256=x9qfdHkVkXOwWRFRCZGaixiLj5e9tOQsCDRR92vW9QI,5472
|
|
274
274
|
web/client/dist/assets/Audits-cGDtiiKB.js,sha256=jrS4x1nQ8Klx67744_LjNI2oBOI9XnnygDR-0wmlme8,1041
|
|
@@ -386,8 +386,8 @@ web/server/api/endpoints/models.py,sha256=ud-lRwriyI_OYg9tZchrBgeiXELiRTLNEodraf
|
|
|
386
386
|
web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
|
|
387
387
|
web/server/api/endpoints/plan.py,sha256=OYuQ_4dgbhG9ibTcX1a8mvYgH3ANxw9Fhbb4wg6QWqc,9222
|
|
388
388
|
web/server/api/endpoints/table_diff.py,sha256=Wd5YxeKbZB7AkrDvqFgvV9ZQlnKYOF1n5W_w2EHE_Zw,2085
|
|
389
|
-
sqlmesh-0.184.4.
|
|
390
|
-
sqlmesh-0.184.4.
|
|
391
|
-
sqlmesh-0.184.4.
|
|
392
|
-
sqlmesh-0.184.4.
|
|
393
|
-
sqlmesh-0.184.4.
|
|
389
|
+
sqlmesh-0.184.4.dev14.dist-info/METADATA,sha256=OKozhNt7GeD9a5YzoAgTs-V2gAb86iLHu2XKiAgVyHk,25499
|
|
390
|
+
sqlmesh-0.184.4.dev14.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
|
391
|
+
sqlmesh-0.184.4.dev14.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
|
|
392
|
+
sqlmesh-0.184.4.dev14.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
|
|
393
|
+
sqlmesh-0.184.4.dev14.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|