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 runner application deserialization #2704

Merged
merged 3 commits into from
May 9, 2023

Conversation

MatisseHack
Copy link
Contributor

Resolves #2703


Behavior

Before the change?

  • Octokit throws a deserialization error when calling ListAllRunnerApplicationsForOrganization in the ActionsSelfHostedRunnersClient

After the change?

  • No error is thrown

Other information

I fixed the issue by removing the extra IReadOnlyList layer since ApiConnection.GetAll already returns an IReadOnlyList. I also made a few other updates to theRunnerApplication model:

  • Added a missing property in the model
  • Fixed a property that was always null because it had the wrong casing (didn't match the JSON payload).
  • Created a new RunnerLabel model since the Label model is for issue/PR labels and didn't match the properties in the JSON payload

Additional info

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Added the appropriate label for the given change

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes (Please add the Type: Breaking change label)
  • No

If Yes, what's the impact:

  • The casing for one property has been changed, which should be very low impact since the model was only added a few days ago.
  • The model for one property has been changed, which should also be very low impact since most properties on the old model would be null anyway.

Pull request type

Bugfix

Please add the corresponding label for change this PR introduces:

  • Bugfix: Type: Bug
  • Feature/model/API additions: Type: Feature
  • Updates to docs or samples: Type: Documentation
  • Dependencies/code cleanup: Type: Maintenance

@nickfloyd nickfloyd added Priority: High Type: Breaking change Used to note any change that requires a major version bump Type: Bug Something isn't working as documented labels May 9, 2023
Copy link
Contributor

@nickfloyd nickfloyd left a comment

Choose a reason for hiding this comment

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

Hey @MatisseHack, this change looks good. Thank you for doing it ❤️. I will mark and ship this as a breaking change in light of the type change. Even though it's low risk, bumping major does not cost anything and is a signal in case consumers need to know.

@nickfloyd nickfloyd merged commit 9adcf16 into octokit:main May 9, 2023
@MatisseHack MatisseHack deleted the runner-app-deserialization branch August 30, 2024 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Breaking change Used to note any change that requires a major version bump Type: Bug Something isn't working as documented
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUG]: Error deserializing runner application response
2 participants