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/rest #17083

Merged
merged 5 commits into from
Oct 7, 2024
Merged

Fix/rest #17083

merged 5 commits into from
Oct 7, 2024

Conversation

memsharded
Copy link
Member

@memsharded memsharded commented Sep 30, 2024

Changelog: Fix: Avoid repeated login attempts to the server for 401 when the credentials come from env-vars or credentials.json file, only repeated login attempts for user interactive prompt.
Docs: Omit

Internal refactor:

  • Remove all oauth authentication and the refresh_token functionality, it was dead code in practice as server side never implemented this, not conan_server, neither Artifactory
  • Doing caching of DB user/token from sqlite DB and also caching the remote capabilities. This avoids hundreds of reads from sqlite3 DB, and some extra v1/ping calls to remotes.
  • Moving custom headers closer to their usage, no need to propagate in several layers
  • Other minor cleanings and small improvements

@memsharded memsharded marked this pull request as ready for review October 3, 2024 08:22
@memsharded memsharded added this to the 2.9.0 milestone Oct 3, 2024

# If not found, then interactive prompt
ui = UserInput(self._global_conf.get("core:non_interactive", check_type=bool))
input_user, input_password = ui.request_login(remote.name, user)
return input_user, input_password
return input_user, input_password, True
Copy link
Member

Choose a reason for hiding this comment

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

Seems like UserInput throws if core:non_interactive is True, so at this point we're always interactive 👍

@memsharded memsharded merged commit 4917b9b into conan-io:develop2 Oct 7, 2024
2 checks passed
@memsharded memsharded deleted the fix/rest branch October 7, 2024 08:23
memsharded added a commit to memsharded/conan that referenced this pull request Oct 7, 2024
* fixing Rest layer

* wip

* fix test

* caching localdb creds and capabilities
memsharded added a commit that referenced this pull request Oct 7, 2024
* refactor, cleaning exceptions

* Add support for including paths that are ignored in `.conanignore` (#17123)

* Add support for including paths that are ignored in .conanignore

* Improve include check performance

* Cleanuo

* Fix/rest (#17083)

* fixing Rest layer

* wip

* fix test

* caching localdb creds and capabilities

* fix tests

* review

---------

Co-authored-by: Abril Rincón Blanco <[email protected]>
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