Conversation
…s POST (APP-2263) Adds two-layer defense-in-depth to prevent phantom Connection orphans when a custom connectorType contains invalid characters (e.g. underscores): - Layer 1 (SDK): Connection.creator() for custom String connectorName now validates the synthesized qualifiedName via StringUtils.isValidConnectionQN before building the entity, throwing InvalidRequestException(INVALID_CONNECTION_QN) if it fails. Covers cab/ConnectionImporter and AbstractCrawler callers. - Layer 2 (aim): ConnectionImporter.getBuilder() validates any CSV-supplied qualifiedName override before applying it to the builder, so no Atlas POST occurs for a malformed connection. Covers asset-import and RAB workflows. Adds ErrorCode.INVALID_CONNECTION_QN (ATLAN-JAVA-400-055) with a message directing customers to use hyphens instead of underscores in connectorType. Adds regression-guard tests in StringUtilsTest pinning that underscore and uppercase in the connectorType segment are rejected by isValidConnectionQN. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Chris (He/Him) <cgrote@gmail.com>
Aryamanz29
added a commit
to atlanhq/atlan-python
that referenced
this pull request
May 22, 2026
… invalid connection QN (BLDX-1294) Aligns with the Java SDK convention from atlanhq/atlan-java#2504 which added ErrorCode.INVALID_CONNECTION_QN (ATLAN-JAVA-400-055) for the same class of failure. Cross-SDK error reporting now matches: typed exception class + stable error code that customer log-aggregation can group on. Replaces the bare ValueError raised by _validate_connector_type_value with InvalidRequestError carrying ErrorCode.INVALID_CONNECTION_QN (ATLAN-PYTHON-400-079). Message + user-action mirror the Java side. Tests updated to assert on: - isinstance(exc, InvalidRequestError) - "ATLAN-PYTHON-400-079" in str(exc) - bad slug surfaced in exc message
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ErrorCode.INVALID_CONNECTION_QN(ATLAN-JAVA-400-055) with a message directing customers to use hyphens instead of underscores in the connectorType segmentConnection.creator()for custom String connectorName now validates the synthesizedqualifiedNameviaStringUtils.isValidConnectionQNbefore building the entity — throwsInvalidRequestException(INVALID_CONNECTION_QN)client-side, before any Atlas POST. Coverscab/ConnectionImporterandAbstractCrawlercallers.ConnectionImporter.getBuilder()validates any CSV-suppliedqualifiedNameoverride before applying it to the builder — no Atlas POST occurs for a malformed connection. Covers asset-import and all RAB workflows (which pipe throughcom.atlan.pkg.aim.Importer).Context
APP-2263 — customer hit a phantom Connection orphan when using connectorType
dev_cmdr(underscore) in Relational Assets Builder. Atlas accepted the entity; the SDK validator rejected it afterwards; the import threwIllegalStateExceptionwith the Connection already persisted and unreachable through standard delete paths.This is Hardening #3 from the ticket: fail fast client-side so no orphan is ever created. The regex itself is unchanged — underscore remains invalid; customers should use hyphens (
dev-cmdr).Test plan
./gradlew :sdk:test --tests "com.atlan.util.StringUtilsTest"— 16 tests pass, including 2 new regression guards pinning that underscore and uppercase in connectorType are rejected./gradlew :sdk:test— full 415-test SDK suite passes./gradlew :samples:packages:asset-import:compileKotlin— Kotlin compiles cleanlyqualifiedName=default/dev_cmdr/<epoch>) throughcom.atlan.pkg.aim.Importer.mainand confirmInvalidRequestExceptionfires before any Atlas POST, with no phantom Connection left behind🤖 Generated with Claude Code