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

External pull request processor job error #582

Merged
merged 2 commits into from
Sep 5, 2024

Conversation

rodrieiz
Copy link
Contributor

@rodrieiz rodrieiz commented Sep 3, 2024

What does this PR do?

This pr is to fix this error
image

This job processes external pull request information for all employees. For this specific user, when fetching all events from their GitHub account, the job encounters a public event that is a pull request linked to a repository that no longer exists—it may have been deleted or something similar. This causes the job to crash because the generated URL is invalid. What I’ve done now is log and notify the failure to process that particular pull request, but ensure that the job continues processing other external pull requests for this user or others.

Resolves #XX

@@ -79,13 +79,25 @@ def initialize(repository_full_name, pull_request_number)
end

def call
Builders::ExternalPullRequest.call(pull_request_data)
Builders::ExternalPullRequest.call(pull_request_data) if pull_request_data
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Builders::ExternalPullRequest.call(pull_request_data) if pull_request_data
Builders::ExternalPullRequest.call(pull_request_data) if pull_request_data.present?

@@ -6,6 +6,7 @@ def initialize(username)
end

def call
# #byebug
Copy link
Collaborator

Choose a reason for hiding this comment

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

👀

@rodrieiz rodrieiz changed the title catch not found responses for external pull request External pull request processor job error Sep 3, 2024
@rodrieiz rodrieiz marked this pull request as ready for review September 3, 2024 15:54
@rodrieiz rodrieiz requested a review from a team as a code owner September 3, 2024 15:54
@rodrieiz rodrieiz requested review from lauperalti, brunoparma88, claramaffei and a team and removed request for a team September 3, 2024 15:54
@rodrieiz rodrieiz merged commit b6dd600 into develop Sep 5, 2024
3 checks passed
@rodrieiz rodrieiz deleted the external_pull_request_processor_job_error branch September 5, 2024 14:41
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