Repository navigation
fix(registry): Fall back to registry commit timestamp for connector release_date - #1382
Conversation
Registry entries without a top-level releaseDate left ConnectorMetadata.release_date null even though the entry's generated.git.commit_timestamp is present. The entry-to-metadata conversion now uses the commit timestamp date as a fallback, and fetch_registry_version_date resolves the connector's current version from its own entry before checking releaseCandidates. Co-Authored-By: AJ Steers <[email protected]>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksTesting This PyAirbyte VersionYou can test this version of PyAirbyte using the following: # Run PyAirbyte CLI from this branch:
uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1792014336-connector-release-date' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1792014336-connector-release-date'PR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
📚 Show Repo GuidanceHelpful ResourcesCommunity SupportQuestions? Join the #pyairbyte channel in our Slack workspace. |
There was a problem hiding this comment.
🟢 Approval recommended
The focused changes match the intended behavior, include relevant unit coverage, and have no identified blocking issues.
0 open findings
What changed in this PR
Adds a registry commit-date fallback so connector metadata can report release dates without extra HTTP requests.
Changes:
- Preserves explicit
releaseDatevalues, falling back to the commit date. - Checks current versions before release candidates during version-date lookup.
- Adds tests for fallback, precedence, and missing-date behavior.
| File | Description |
|---|---|
| tests/unit_tests/test_mcp_connector_registry.py | Tests metadata and version-date fallback behavior. |
| airbyte/registry.py | Adds the connector metadata release-date fallback. |
| airbyte/_registry_utils.py | Extracts commit dates and supports current-version lookup. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Code coverage overviewLanguages: Python Python / code-coverage/pytest-no-creds
View coverage of the 10 most impacted files.
Python / code-coverage/pytest
View coverage of the 10 most impacted files.
Python / code-coverage/pytest-unit
Line coverage data for the release-candidate/v1 branch is not yet available. View coverage of the 10 most covered files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
1981bc2
into
release-candidate/v1
|
|
||
| def registry_entry_commit_date(entry: dict) -> str | None: | ||
| """Return the YYYY-MM-DD date of a registry entry's git commit timestamp.""" | ||
| commit_timestamp = entry.get("generated", {}).get("git", {}).get("commit_timestamp") |
There was a problem hiding this comment.
🔴 Null metadata blocks the connector catalog
When releaseDate is absent and generated or generated.git is null, registry_entry_commit_date raises instead of returning no date. One such entry aborts the entire registry load.
Learn more
The registry cache converts every connector entry with _registry_entry_to_connector_metadata. That conversion now calls this helper whenever releaseDate is absent. A JSON null for generated or generated.git bypasses the empty-dict default and raises before the cache is assigned in _get_registry_cache. An optional date field then makes all connector lookups fail.
Example: A local registry contains one connector with "generated": null and no releaseDate. Loading any connector from that registry fails instead of returning metadata with release_date=None.
Recommended fix: Treat null generated and git sections as missing before reading commit_timestamp; retain None as the fallback when no usable timestamp exists.
| commit_timestamp = entry.get("generated", {}).get("git", {}).get("commit_timestamp") | |
| commit_timestamp = (entry.get("generated") or {}).get("git") or {} | |
| commit_timestamp = commit_timestamp.get("commit_timestamp") |
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Confirmed. If an entry has "generated": null or "git": null and no releaseDate, .get(..., {}) returns None and the next .get raises AttributeError. Because that happens inside _get_registry_cache, one bad entry breaks every connector lookup. The fix is (entry.get("generated") or {}).get("git") or {}, plus a test with a null entry. This PR is already merged, so I've asked AJ about a follow-up PR.
| if connector.get("dockerImageTag") == version: | ||
| current_version_date = registry_entry_commit_date(connector) | ||
| if current_version_date: | ||
| return current_version_date |
There was a problem hiding this comment.
🟡 Explicit current-version release dates are overridden
When releaseDate differs from the current version's commit date, fetch_registry_version_date returns the commit date instead. get_connector_version_history then replaces the changelog date with that value.
Learn more
The connector metadata path already prefers releaseDate over the generated timestamp in _registry_entry_to_connector_metadata. The version-history path instead uses the generated timestamp for the current tag and overwrites the changelog date in get_connector_version_history. The two public results therefore disagree for the same current version whenever those dates differ.
Example: An entry has dockerImageTag="7.2.1", releaseDate="2026-07-12", and generated.git.commit_timestamp="2026-07-10T14:26:59Z". Metadata reports July 12, but version history reports July 10.
Recommended fix: Prefer the entry's nonempty releaseDate before falling back to registry_entry_commit_date for the current version, matching metadata conversion.
| if connector.get("dockerImageTag") == version: | |
| current_version_date = registry_entry_commit_date(connector) | |
| if current_version_date: | |
| return current_version_date | |
| if connector.get("dockerImageTag") == version: | |
| current_version_date = connector.get("releaseDate") or registry_entry_commit_date( | |
| connector | |
| ) | |
| if current_version_date: | |
| return current_version_date |
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Confirmed. For the current version, fetch_registry_version_date uses the commit timestamp even when the entry has an explicit releaseDate, while the metadata path prefers releaseDate, so the two disagree when those dates differ. The fix is to use connector.get("releaseDate") or registry_entry_commit_date(connector) there too, plus a test. This PR is already merged, so it would go in the same follow-up as the null-generated fix, pending AJ's OK.
Overview
👉 TL;DR: Connector info often showed no release date even though the registry has one. Release dates now fall back to the date of the commit recorded in the published registry entry.
Specifically,
_registry_entry_to_connector_metadataandfetch_registry_version_datenow use the newregistry_entry_commit_date()helper, which readsgenerated.git.commit_timestamp.Changes
ConnectorMetadata.release_date=releaseDate, or else the date part of the entry'sgenerated.git.commit_timestamp(example:source-faker7.2.1 →2026-07-10). No extra HTTP call.fetch_registry_version_datechecks the connector's current version (dockerImageTag == version) before looking inreleases.releaseCandidates. It used to check only release candidates.Test plan
Link to Devin session: https://app.devin.ai/sessions/a51d808f26c9402fafc93e7640648187
Open in Devin Desktop: https://app.devin.ai/desktop/session/a51d808f26c9402fafc93e7640648187?variant=devin
Requested by: Aaron ("AJ") Steers (@aaronsteers)