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 vault makescripts with capture output #12909

Merged
merged 2 commits into from
Oct 25, 2023

Conversation

jyejare
Copy link
Member

@jyejare jyejare commented Oct 13, 2023

Missing Capture Output made make vault scripts to break as it was trying to read and print STDOUT which was never returned due to capture_output was not set.

Fix:

  • Set capture_output to True in subprocess running vault command.
  • Alter logging of some events to appropriate level.

This also addresses the REGEX for Vault_enablement key in .env when its the first line in .env file.

@jyejare jyejare requested a review from a team as a code owner October 13, 2023 14:09
@jyejare jyejare added CherryPick PR needs CherryPick to previous branches 6.12.z Introduced in or relating directly to Satellite 6.12 6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 labels Oct 13, 2023
@jyejare jyejare force-pushed the make_vaults_fix branch 3 times, most recently from b7dcce0 to 39d496e Compare October 16, 2023 12:06
@jyejare
Copy link
Member Author

jyejare commented Oct 16, 2023

trigger: test-robottelo
pytest: tests/foreman/api/test_product.py -k test_positive_create_with_label

Copy link
Contributor

@lpramuk lpramuk left a comment

Choose a reason for hiding this comment

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

Change RE to use ^ and MULTILINE.

Or merge my #12960 and rebase on top of it.
Thanks.

robottelo/utils/vault.py Show resolved Hide resolved
@jyejare
Copy link
Member Author

jyejare commented Oct 25, 2023

Merging this PR on priority since many facing issues with REGEX of .env file and later we can look at dotenv library to simplify things!

@jyejare jyejare enabled auto-merge (squash) October 25, 2023 15:15
@jyejare jyejare merged commit 291698f into SatelliteQE:master Oct 25, 2023
5 checks passed
github-actions bot pushed a commit that referenced this pull request Oct 25, 2023
* Fix vault makescripts with capture output

* Handle topped Vault enablement in .env file

(cherry picked from commit 291698f)
github-actions bot pushed a commit that referenced this pull request Oct 25, 2023
* Fix vault makescripts with capture output

* Handle topped Vault enablement in .env file

(cherry picked from commit 291698f)
github-actions bot pushed a commit that referenced this pull request Oct 25, 2023
* Fix vault makescripts with capture output

* Handle topped Vault enablement in .env file

(cherry picked from commit 291698f)
jyejare added a commit that referenced this pull request Oct 25, 2023
Fix vault makescripts with capture output (#12909)

* Fix vault makescripts with capture output

* Handle topped Vault enablement in .env file

(cherry picked from commit 291698f)

Co-authored-by: Jitendra Yejare <[email protected]>
jyejare added a commit that referenced this pull request Oct 25, 2023
Fix vault makescripts with capture output (#12909)

* Fix vault makescripts with capture output

* Handle topped Vault enablement in .env file

(cherry picked from commit 291698f)

Co-authored-by: Jitendra Yejare <[email protected]>
jyejare added a commit that referenced this pull request Oct 25, 2023
Fix vault makescripts with capture output (#12909)

* Fix vault makescripts with capture output

* Handle topped Vault enablement in .env file

(cherry picked from commit 291698f)

Co-authored-by: Jitendra Yejare <[email protected]>
shweta83 pushed a commit to shweta83/robottelo that referenced this pull request Apr 10, 2024
* Fix vault makescripts with capture output

* Handle topped Vault enablement in .env file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.12.z Introduced in or relating directly to Satellite 6.12 6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 CherryPick PR needs CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants