Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Internal] Escape single quotes in regex matchers #727

Merged
merged 1 commit into from
Aug 15, 2024
Merged

Conversation

renaudhartert-db
Copy link
Contributor

@renaudhartert-db renaudhartert-db commented Aug 15, 2024

Changes

This PR makes sure that single quotes are properly escaped when passing regex pattern to match errors.

Tests

Verified that SDK can properly be generated when the pattern contains single quotes.

Note that downstreams / compatibility (ucx, databrickslabs) was already failing and that this PR should not affect downstream consumers.

  • make test run locally
  • make fmt applied
  • relevant integration tests applied

@renaudhartert-db renaudhartert-db changed the title [Internal] Escape single quotes in regex matchers. [Internal] Escape single quotes in regex matchers Aug 15, 2024
Copy link

This PR breaks backwards compatibility for databrickslabs/ucx downstream. See build logs for more details.

Running from downstreams #376

@renaudhartert-db renaudhartert-db added this pull request to the merge queue Aug 15, 2024
Merged via the queue into main with commit c3d1db5 Aug 15, 2024
15 of 16 checks passed
@renaudhartert-db renaudhartert-db deleted the rh/escape branch August 15, 2024 12:54
renaudhartert-db added a commit that referenced this pull request Aug 21, 2024
### Bug Fixes

 * Fixed regression introduced in v0.30.0 causing `ValueError: Invalid semantic version: 0.33.1+420240816190912` ([#729](#729)).

### Internal Changes

 * Escape single quotes in regex matchers ([#727](#727)).

### API Changes:

 * Added [w.policy_compliance_for_clusters](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/policy_compliance_for_clusters.html) workspace-level service.
 * Added [w.policy_compliance_for_jobs](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/policy_compliance_for_jobs.html) workspace-level service.
 * Added [w.resource_quotas](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/resource_quotas.html) workspace-level service.
 * Added `databricks.sdk.service.catalog.GetQuotaRequest`, `databricks.sdk.service.catalog.GetQuotaResponse`, `databricks.sdk.service.catalog.ListQuotasRequest`, `databricks.sdk.service.catalog.ListQuotasResponse` and `databricks.sdk.service.catalog.QuotaInfo` dataclasses.
 * Added `databricks.sdk.service.compute.ClusterCompliance`, `databricks.sdk.service.compute.ClusterSettingsChange`, `databricks.sdk.service.compute.EnforceClusterComplianceRequest`, `databricks.sdk.service.compute.EnforceClusterComplianceResponse`, `databricks.sdk.service.compute.GetClusterComplianceRequest`, `databricks.sdk.service.compute.GetClusterComplianceResponse`, `databricks.sdk.service.compute.ListClusterCompliancesRequest` and `databricks.sdk.service.compute.ListClusterCompliancesResponse` dataclasses.
 * Added `databricks.sdk.service.jobs.EnforcePolicyComplianceForJobResponseJobClusterSettingsChange`, `databricks.sdk.service.jobs.EnforcePolicyComplianceRequest`, `databricks.sdk.service.jobs.EnforcePolicyComplianceResponse`, `databricks.sdk.service.jobs.GetPolicyComplianceRequest`, `databricks.sdk.service.jobs.GetPolicyComplianceResponse`, `databricks.sdk.service.jobs.JobCompliance`, `databricks.sdk.service.jobs.ListJobComplianceForPolicyResponse` and `databricks.sdk.service.jobs.ListJobComplianceRequest` dataclasses.
 * Added `fallback` field for `databricks.sdk.service.catalog.CreateExternalLocation`.
 * Added `fallback` field for `databricks.sdk.service.catalog.ExternalLocationInfo`.
 * Added `fallback` field for `databricks.sdk.service.catalog.UpdateExternalLocation`.
 * Added `job_run_id` field for `databricks.sdk.service.jobs.BaseRun`.
 * Added `job_run_id` field for `databricks.sdk.service.jobs.Run`.
 * Added `include_metrics` field for `databricks.sdk.service.sql.ListQueryHistoryRequest`.
 * Added `statement_ids` field for `databricks.sdk.service.sql.QueryFilter`.
 * Removed `databricks.sdk.service.sql.ContextFilter` dataclass.
 * Removed `context_filter` field for `databricks.sdk.service.sql.QueryFilter`.
 * Removed `pipeline_id` and `pipeline_update_id` fields for `databricks.sdk.service.sql.QuerySource`.

OpenAPI SHA: 3eae49b444cac5a0118a3503e5b7ecef7f96527a, Date: 2024-08-21
github-merge-queue bot pushed a commit that referenced this pull request Aug 21, 2024
### Bug Fixes

* Fixed regression introduced in v0.30.0 causing `ValueError: Invalid
semantic version: 0.33.1+420240816190912`
([#729](#729)).


### Internal Changes

* Escape single quotes in regex matchers
([#727](#727)).


### API Changes:

* Added
[w.policy_compliance_for_clusters](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/policy_compliance_for_clusters.html)
workspace-level service.
* Added
[w.policy_compliance_for_jobs](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/policy_compliance_for_jobs.html)
workspace-level service.
* Added
[w.resource_quotas](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/resource_quotas.html)
workspace-level service.
* Added `databricks.sdk.service.catalog.GetQuotaRequest`,
`databricks.sdk.service.catalog.GetQuotaResponse`,
`databricks.sdk.service.catalog.ListQuotasRequest`,
`databricks.sdk.service.catalog.ListQuotasResponse` and
`databricks.sdk.service.catalog.QuotaInfo` dataclasses.
* Added `databricks.sdk.service.compute.ClusterCompliance`,
`databricks.sdk.service.compute.ClusterSettingsChange`,
`databricks.sdk.service.compute.EnforceClusterComplianceRequest`,
`databricks.sdk.service.compute.EnforceClusterComplianceResponse`,
`databricks.sdk.service.compute.GetClusterComplianceRequest`,
`databricks.sdk.service.compute.GetClusterComplianceResponse`,
`databricks.sdk.service.compute.ListClusterCompliancesRequest` and
`databricks.sdk.service.compute.ListClusterCompliancesResponse`
dataclasses.
* Added
`databricks.sdk.service.jobs.EnforcePolicyComplianceForJobResponseJobClusterSettingsChange`,
`databricks.sdk.service.jobs.EnforcePolicyComplianceRequest`,
`databricks.sdk.service.jobs.EnforcePolicyComplianceResponse`,
`databricks.sdk.service.jobs.GetPolicyComplianceRequest`,
`databricks.sdk.service.jobs.GetPolicyComplianceResponse`,
`databricks.sdk.service.jobs.JobCompliance`,
`databricks.sdk.service.jobs.ListJobComplianceForPolicyResponse` and
`databricks.sdk.service.jobs.ListJobComplianceRequest` dataclasses.
* Added `fallback` field for
`databricks.sdk.service.catalog.CreateExternalLocation`.
* Added `fallback` field for
`databricks.sdk.service.catalog.ExternalLocationInfo`.
* Added `fallback` field for
`databricks.sdk.service.catalog.UpdateExternalLocation`.
 * Added `job_run_id` field for `databricks.sdk.service.jobs.BaseRun`.
 * Added `job_run_id` field for `databricks.sdk.service.jobs.Run`.
* Added `include_metrics` field for
`databricks.sdk.service.sql.ListQueryHistoryRequest`.
* Added `statement_ids` field for
`databricks.sdk.service.sql.QueryFilter`.
 * Removed `databricks.sdk.service.sql.ContextFilter` dataclass.
* Removed `context_filter` field for
`databricks.sdk.service.sql.QueryFilter`.
* Removed `pipeline_id` and `pipeline_update_id` fields for
`databricks.sdk.service.sql.QuerySource`.

OpenAPI SHA: 3eae49b444cac5a0118a3503e5b7ecef7f96527a, Date: 2024-08-21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants