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

Refactor RESTManager and add config.write when port changes #8022

Closed
wants to merge 1 commit into from

Conversation

heldersepu
Copy link
Contributor

With this change the http_port is updated as soon as it changes
fixes #8007

@heldersepu heldersepu requested review from a team and xoriole and removed request for a team May 8, 2024 16:12
Copy link

github-actions bot commented May 8, 2024

Hi @heldersepu, thank you for contributing to Tribler! 🚀

This PR was created by an outside collaborator, so some checks were not run for security reasons.
To trigger the full set of checks, any member of the Tribler team can add the label PR: safe to check to the current PR.

Copy link
Contributor

@xoriole xoriole left a comment

Choose a reason for hiding this comment

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

Thank you for your PR @heldersepu.

Instead of passing the config object to RESTManager and rewriting the config as config.api, I think the issue can be solved by simply calling config.write() when the RESTManager has started (in restapi_component.py).

@heldersepu
Copy link
Contributor Author

heldersepu commented May 13, 2024

@xoriole We debated that in the issue: #8007 (comment)

in a nutshell:

  • That config was not a real config(TriblerConfig) but of type APISettings, bad name
  • No need for two params: config=config.api, state_dir=config.state_dir that can be just one
  • This way we only invoke the write only when necessary.

Refactor RESTManager and add config.write when port changes
@qstokkink
Copy link
Contributor

Thank you for your hard work. Recent changes to the Tribler code base have implemented your suggested feature. Therefore, this PR no longer relevant and I will close it.

@qstokkink qstokkink closed this Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

After upgrade to 7.14.0 http_port keeps changing and api does not work
3 participants