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 terraform scripts #1356

Merged
merged 1 commit into from
Jul 5, 2024

Conversation

m-ildefons
Copy link
Contributor

  1. Silence output of wget to make logs more readable.
  2. Force unzip to never prompt when extracting files.
    This can break CI pipelines because there the prompt will never be
    answered.

1) Silence output of wget to make logs more readable.
2) Force unzip to never prompt when extracting files.
   This can break CI pipelines because there the prompt will never be
   answered.

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
@m-ildefons m-ildefons requested a review from lanfon72 July 3, 2024 15:25
@m-ildefons m-ildefons self-assigned this Jul 3, 2024
@lanfon72 lanfon72 requested a review from a team July 4, 2024 13:31
Copy link
Member

@lanfon72 lanfon72 left a comment

Choose a reason for hiding this comment

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

LGTM

CI will never hit the prompt issue because we will download terraform to different folder as fixtures below:

def tf_executor(tf_script_dir):
run(str(tf_script_dir / "terraform_install.sh"), stdout=PIPE, stderr=PIPE)
executor = tf_script_dir / "bin/terraform"
assert executor.is_file()
yield executor
@pytest.fixture(scope="session")
def tf_harvester(api_client, tf_script_dir, tf_provider_version, tf_executor):
harv = TerraformHarvester(tf_executor, tf_script_dir / datetime.now().strftime("%Hh%Mm_%m-%d"))
kuebconfig = api_client.generate_kubeconfig()
out, err, exc_code = harv.initial_provider(kuebconfig, tf_provider_version)
assert not err and 0 == exc_code
return harv

The prompt problem will happen only when executing the script independently.

@m-ildefons m-ildefons merged commit 7d41a56 into harvester:main Jul 5, 2024
2 checks passed
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.

2 participants