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

Fallback to use subscription cred for analytic upload #15479

Conversation

TheRealHaoLiu
Copy link
Member

SUMMARY

Fall back to use SUBSCRIPTION_USERNAME/PASSWORD to upload analytic to if REDHAT_USERNAME/PASSWORD are not set

ISSUE TYPE
  • Bug, Docs Fix or other nominal change
COMPONENT NAME
  • API
AWX VERSION

ADDITIONAL INFORMATION

Fall back to use SUBSCRIPTION_USERNAME/PASSWORD to upload analytic to if REDHAT_USERNAME/PASSWORD are not set
@TheRealHaoLiu TheRealHaoLiu force-pushed the fallback-to-subscription-userpass-for-analytic branch from d7ea02b to b32730b Compare August 29, 2024 19:53
awx/main/analytics/core.py Outdated Show resolved Hide resolved
Copy link
Member

@matburt matburt left a comment

Choose a reason for hiding this comment

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

Possible to add a test?

@TheRealHaoLiu TheRealHaoLiu force-pushed the fallback-to-subscription-userpass-for-analytic branch from bda2f63 to a8b09af Compare August 30, 2024 02:11
Focus on credentials
@TheRealHaoLiu TheRealHaoLiu force-pushed the fallback-to-subscription-userpass-for-analytic branch from a8b09af to 9c28ac0 Compare August 30, 2024 02:23
@TheRealHaoLiu
Copy link
Member Author

Added test please rereview

Copy link
Member

@matburt matburt left a comment

Choose a reason for hiding this comment

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

Awesome work @TheRealHaoLiu

@TheRealHaoLiu TheRealHaoLiu force-pushed the fallback-to-subscription-userpass-for-analytic branch from f4ff88c to 65e15a5 Compare August 30, 2024 03:43
Copy link

sonarcloud bot commented Aug 30, 2024

@pb82
Copy link
Contributor

pb82 commented Aug 30, 2024

thanks @TheRealHaoLiu and @matburt , will merge and backport

@pb82 pb82 merged commit ac6c563 into ansible:devel Aug 30, 2024
19 checks passed
fosterseth pushed a commit to fosterseth/awx that referenced this pull request Aug 30, 2024
…ansible#6668)

* Fallback to use subscription cred for analytic

Fall back to use SUBSCRIPTION_USERNAME/PASSWORD to upload analytic to if REDHAT_USERNAME/PASSWORD are not set

* Improve error message

* Guard against request with no query or data

* Add test for _send_to_analytics

Focus on credentials

* Supress sonarcloud warning about password

* Add test for analytic ship

Co-authored-by: Hao Liu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants