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

fix changed_file indentation in airbyte-ci pull-request #43433

Merged
merged 5 commits into from
Aug 9, 2024

Conversation

ChristoGrab
Copy link
Contributor

@ChristoGrab ChristoGrab commented Aug 9, 2024

What

When running the pull-request command, it intermittently fails with the error 'changed_file referenced before assignment'. The issue seems to be a minor indentation bug.

User Impact

None, internal tool

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

Copy link

vercel bot commented Aug 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Aug 9, 2024 6:44pm

@ChristoGrab ChristoGrab marked this pull request as ready for review August 9, 2024 18:43
@ChristoGrab ChristoGrab requested a review from a team as a code owner August 9, 2024 18:43
@ChristoGrab ChristoGrab enabled auto-merge (squash) August 9, 2024 18:45
Copy link
Contributor

@natikgadzhi natikgadzhi left a comment

Choose a reason for hiding this comment

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

Approving to unblock. I think this works, and with doesn't make a scope boundary and just makes sure the file is closed. Shipit!

@@ -152,7 +152,7 @@ def create_or_update_github_pull_request(
content = base64.b64encode(file.read()).decode("utf-8") # Encode file content to base64
blob = repo.create_git_blob(content, "base64")
changed_file = ChangedFile(path=str(modified_file), sha=blob.sha)
changed_files.append(changed_file)
changed_files.append(changed_file)
Copy link
Contributor

Choose a reason for hiding this comment

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

Given where it's assigned, you might have to indent it more, so it's all the way within the with block?

@ChristoGrab ChristoGrab merged commit b4f7a90 into master Aug 9, 2024
38 checks passed
@ChristoGrab ChristoGrab deleted the christo/pull-request-fix branch August 9, 2024 20:29
LouisAuneau pushed a commit to LouisAuneau/airbyte that referenced this pull request Aug 13, 2024
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.

3 participants