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

True type updater #9929

Merged
merged 13 commits into from
Jun 10, 2024
Merged

True type updater #9929

merged 13 commits into from
Jun 10, 2024

Conversation

JamieMagee
Copy link
Contributor

@JamieMagee JamieMagee commented Jun 7, 2024

What are you trying to accomplish?

Fixes the remaining type errors in updater and enforces the true sigil with RuboCop

Anything you want to highlight for special attention from reviewers?

While I've added sigs to most of the methods, I wasn't able to set strict due to attr_readers.

Reviewing this commit-by-commit might be easiest.

How will you know you've accomplished your goal?

Sorbet tests pass

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

@JamieMagee JamieMagee added the sorbet 🍦 Relates to Sorbet types label Jun 7, 2024
@JamieMagee JamieMagee force-pushed the jamiemagee/true-type-updater branch from 6875dc0 to 9a49673 Compare June 7, 2024 05:03
@JamieMagee JamieMagee force-pushed the jamiemagee/true-type-updater branch from 9a49673 to 63ae546 Compare June 7, 2024 21:34
Lovebugpaul50

This comment was marked as spam.

Lovebugpaul50

This comment was marked as spam.

@JamieMagee JamieMagee force-pushed the jamiemagee/true-type-updater branch 2 times, most recently from da21e9d to 350d051 Compare June 9, 2024 23:37
@JamieMagee JamieMagee force-pushed the jamiemagee/true-type-updater branch from 350d051 to b11b2a5 Compare June 10, 2024 16:27
@JamieMagee JamieMagee force-pushed the jamiemagee/true-type-updater branch from b11b2a5 to b9900ce Compare June 10, 2024 16:29
@JamieMagee JamieMagee marked this pull request as ready for review June 10, 2024 17:00
@JamieMagee JamieMagee requested a review from a team as a code owner June 10, 2024 17:00
@raj-meka raj-meka merged commit 495c747 into main Jun 10, 2024
121 checks passed
@raj-meka raj-meka deleted the jamiemagee/true-type-updater branch June 10, 2024 22:12
abdulapopoola added a commit that referenced this pull request Aug 12, 2024
…cution (#10396)

This commit addresses type issue that the introduction of type has brought about.

The PR #9929 has introduced a regression in which the type check stops execution.
It is apparently unexpected as the final message results in "unknown_error" and
the backtrace appended to this message is the only clue to debug with.

However once you take a look inside the root of the error is rather expectable
so let's not overwhelm those who might encounter from this time on.

```
2024/08/09 12:24:28 INFO Checking if faraday-httpclient 1.0.1 needs updating
2024/08/09 12:24:28 INFO Latest version is 2.0.1
2024/08/09 12:24:39 INFO Requirements to unlock all
2024/08/09 12:24:39 INFO Requirements update strategy bump_versions
2024/08/09 12:24:39 ERROR Passed `nil` into T.must
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11444/lib/types/_types.rb:222:in `must'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/lib/dependabot/updater/group_update_creation.rb:92:in `block in compile_all_dependency_changes_for'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/lib/dependabot/updater/group_update_creation.rb:56:in `each'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/lib/dependabot/updater/group_update_creation.rb:56:in `compile_all_dependency_changes_for'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11444/lib/types/private/methods/call_validation_2_7.rb:968:in `bind_call'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11444/lib/types/private/methods/call_validation_2_7.rb:968:in `block in create_validator_method_medium1'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/lib/dependabot/updater/operations/create_group_update_pull_request.rb:97:in `dependency_change'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11444/lib/types/private/methods/call_validation_2_7.rb:919:in `bind_call'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11444/lib/types/private/methods/call_validation_2_7.rb:919:in `block in create_validator_method_medium0'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/lib/dependabot/updater/operations/create_group_update_pull_request.rb:61:in `perform'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11444/lib/types/private/methods/call_validation_2_7.rb:919:in `bind_call'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11444/lib/types/private/methods/call_validation_2_7.rb:919:in `block in create_validator_method_medium0'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/lib/dependabot/updater/operations/group_update_all_versions.rb:117:in `run_grouped_update_for'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11444/lib/types/private/methods/call_validation_2_7.rb:968:in `bind_call'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11444/lib/types/private/methods/call_validation_2_7.rb:968:in `block in create_validator_method_medium1'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/lib/dependabot/updater/operations/group_update_all_versions.rb:103:in `block in run_grouped_dependency_updates'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/lib/dependabot/updater/operations/group_update_all_versions.rb:102:in `each'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/lib/dependabot/updater/operations/group_update_all_versions.rb:102:in `run_grouped_dependency_updates'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11444/lib/types/private/methods/call_validation.rb:270:in `bind_call'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11444/lib/types/private/methods/call_validation.rb:270:in `validate_call'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11444/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/lib/dependabot/updater/operations/group_update_all_versions.rb:64:in `perform'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11444/lib/types/private/methods/call_validation.rb:270:in `bind_call'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11444/lib/types/private/methods/call_validation.rb:270:in `validate_call'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11444/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/lib/dependabot/updater.rb:45:in `run'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/lib/dependabot/update_files_command.rb:44:in `block in perform_job'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/opentelemetry-api-1.2.3/lib/opentelemetry/trace/tracer.rb:37:in `block in in_span'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/opentelemetry-api-1.2.3/lib/opentelemetry/trace.rb:70:in `block in with_span'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/opentelemetry-api-1.2.3/lib/opentelemetry/context.rb:87:in `with_value'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/opentelemetry-api-1.2.3/lib/opentelemetry/trace.rb:70:in `with_span'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/opentelemetry-api-1.2.3/lib/opentelemetry/trace/tracer.rb:37:in `in_span'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/lib/dependabot/update_files_command.rb:18:in `perform_job'
2024/08/09 12:24:39 ERROR /home/dependabot/dependabot-updater/lib/dependabot/base_command.rb:37:in `run'
2024/08/09 12:24:39 ERROR bin/update_files.rb:46:in `<main>'
2024/08/09 12:24:39 INFO Results:
Dependabot encountered '1' error(s) during execution, please check the logs for more details.
+---------------+
|    Errors     |
+---------------+
| unknown_error |
+---------------+
```

Co-authored-by: AbdulFattaah Popoola <abdulapopoola@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sorbet 🍦 Relates to Sorbet types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants