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

feat: automatically generated instance_id #179

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

nunogois
Copy link
Member

@nunogois nunogois commented Jul 8, 2024

https://linear.app/unleash/issue/2-2392/make-instance-id-autogenned-ruby

This makes instance_id an automatically generated read-only property, instead of being set by the user.

Similar to Unleash/unleash-client-dotnet#226

@nunogois nunogois requested a review from sighphyre July 8, 2024 14:25
scheduled_executor.thread.join

Unleash.configuration.instance_id = original_instance_id
Unleash.configuration.app_name = original_app_name
Copy link
Member Author

@nunogois nunogois Jul 8, 2024

Choose a reason for hiding this comment

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

I don't think the property here really mattered for these tests (this should work with any property) so I picked app_name instead.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 9841463298

Details

  • 9 of 19 (47.37%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 97.255%

Changes Missing Coverage Covered Lines Changed/Added Lines %
spec/unleash/scheduled_executor_spec.rb 5 15 33.33%
Totals Coverage Status
Change from base Build 9805534345: 0.1%
Covered Lines: 2551
Relevant Lines: 2623

💛 - Coveralls

Copy link
Member

@sighphyre sighphyre left a comment

Choose a reason for hiding this comment

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

Okaaaaay. I think this looks good but I wanna think a bit about what happens when your application gets forked by gunicorn or something equivalently horrible. I want to say that should be a new instance id

Copy link
Member

@sighphyre sighphyre left a comment

Choose a reason for hiding this comment

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

We manually validated this together, I'm happy it works

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