Skip to content

fix: enable Speakeasy fix flags to resolve forward-reference NameErrors#179

Merged
Aaron ("AJ") Steers (aaronsteers) merged 4 commits into
mainfrom
devin/1782187153-fix-forward-references
Jun 23, 2026
Merged

fix: enable Speakeasy fix flags to resolve forward-reference NameErrors#179
Aaron ("AJ") Steers (aaronsteers) merged 4 commits into
mainfrom
devin/1782187153-fix-forward-references

Conversation

@aaronsteers

@aaronsteers Aaron ("AJ") Steers (aaronsteers) commented Jun 23, 2026

Copy link
Copy Markdown
Member

Summary

Fixes NameError / PydanticUserError on import of SourceResponse, ConnectionResponse, and other models (#178 item 1). Root cause: Speakeasy emitted enum/class definitions after they were referenced as default values — from __future__ import annotations doesn't help since these are runtime expressions, not type annotations.

Two built-in fix flags enabled in gen.yaml:

  • generation.fixes.nameResolutionFeb2025: true — improved name resolution; fixed ConnectionResponse (RowFilteringOperationNot ordering). Docs, CLI: speakeasy configure generation check.
  • python.fixFlags.conflictResistantModelImportsFeb2026: true — conflict-resistant model imports; fixed SourceResponse (DimensionsFilterToValueExpressionValueTypeDoubleValue2 ordering). CLI-only docs via speakeasy configure generation check.

After regeneration: all 737 model modules import with zero failures.

Closes #178 (item 1).

Link to Devin session: https://app.devin.ai/sessions/854c664803f3400387fdaa02e123b888
Requested by: Aaron ("AJ") Steers (@aaronsteers)

Speakeasy generates classes in wrong order in
source_google_analytics_data_api_schemas_custom_reports_array_int64value.py,
causing NameError when importing SourceResponse and related models.

The nameResolutionFeb2025 fix flag should address class ordering.

Co-Authored-By: AJ Steers <aj@airbyte.io>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@octavia-bot

octavia-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Generate SDK Job Info

Running Speakeasy SDK generation.

Job started... Check job output.
SDK generation completed successfully.

@aaronsteers Aaron ("AJ") Steers (aaronsteers) marked this pull request as ready for review June 23, 2026 04:00
Copilot AI review requested due to automatic review settings June 23, 2026 04:00

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Open in Devin Review

Comment thread gen.yaml

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables Speakeasy’s nameResolutionFeb2025 generation fix flag to address forward-reference ordering issues in generated Python models (e.g., NameError on import for SourceResponse), aligning with the repo’s generated-code workflow.

Changes:

  • Turned on generation.fixes.nameResolutionFeb2025 in gen.yaml to improve name/ordering resolution in generated output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread gen.yaml
octavia-bot Bot and others added 2 commits June 23, 2026 04:03
@octavia-bot

octavia-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Generate SDK Job Info

Running Speakeasy SDK generation.

Job started... Check job output.
SDK generation completed successfully.

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Generated Code Drift Detected

The committed code does not match what the generation pipeline produces.

To fix: Comment /generate on this PR to regenerate.

 .../models/metrics_filter_value_int64value.py      | 42 +++++++++++-----------
 1 file changed, 21 insertions(+), 21 deletions(-)

@devin-ai-integration devin-ai-integration Bot changed the title fix: enable nameResolutionFeb2025 to fix forward-reference NameError fix: enable Speakeasy fix flags to resolve forward-reference NameErrors Jun 23, 2026
@aaronsteers Aaron ("AJ") Steers (aaronsteers) merged commit a1d6b45 into main Jun 23, 2026
5 checks passed
@aaronsteers Aaron ("AJ") Steers (aaronsteers) deleted the devin/1782187153-fix-forward-references branch June 23, 2026 04:14
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.

bug: airbyte-api 1.0.0 has forward-reference errors and breaking API changes vs 0.53.0

2 participants