Repository navigation
feat: migrate Connections URL lookups for Backstage 1.54.0 - #166
Merged
Merged
Conversation
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
await connections.find({ type: 'github', - url, + query: { url }, authMethods: ['app', 'token'], });AST provenance limits migration to Connections receivers and built-in URL-based types; unknown/computed/spread shapes stay for review. Minor changeset. Closes #144.
Evidence
tests/unsupported/input.tshasfind({ type: 'github', url, [key]() {} })withkey = 'query'and['q u e r y'];tests/receiver-shapes/input.tshasfactory: function({ connections: conn }) { conn.find({ type: 'github', url }) }wired toconnectionsServiceRef.After:
tests/unsupported/expected.tskeeps both ambiguous options unchanged with one TODO each, preserving runtime methods and URL evaluation;tests/receiver-shapes/expected.tsnests URL underquery.tests/unrelatedproves shadowed renamedconnstays untouched. Red fixtures failed inreceiver-shapesandunsupportedbefore the fix; green fixtures (6/6) and schema-valid workflow (base_path: '.') passed afterward.yarn format,yarn format:check,yarn lint,yarn test,yarn check:changedpassed; minor changeset remains in PR. Earlier Backstage checkout dry-run completed in 5s with no emitted diff and no checkout changes. Codemod package validator inferred npm incorrectly in this Yarn repo; repo-standard gates passed.parameter-properties-and-escaped-keysfixture showed typedconstructor(private readonly connections: Service)missed;queryinserted a duplicatequery, and escapedurlwas silently missed. ASTrequired_parameterconstructor property provenance now recognizes importedConnectionsServiceby definition;readonly-only properties also covered. Ambiguous escaped quoted, computed, bare identifier, and shorthand keys receive one idempotent TODO instead of an unsafe rewrite. Fixture also verifies static/non-property/unrelated receivers unchanged and inline comments preserved. Red fixture failed before fix; 6/6 green afterward. Workflow against temporary fixture matched expected, second pass byte-identical. 1,000 relevant TS files benchmark: 1,000 transformed, 8s wall time under concurrent validation (workflow 7.1s).yarn format,yarn format:check,yarn lint,yarn test,yarn check:changedpassed; minor changeset retained.Merge Danger
Door: two-way
Revert removes the unpublished migration package; no consumer code changes until users run it.
Blast Radius: lookups
Only provable Connections
findcalls with supported built-in URL types change. Unsupported old shapes receive a TODO; consumers must review custom query contracts.