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

Container builder: Error: building at STEP "RUN cd /kai/samples && ./fetch_apps.py": while running runtime: exit status 1 #239

Closed
jwmatthews opened this issue Jul 18, 2024 · 3 comments

Comments

@jwmatthews
Copy link
Member

STEP 9/11: RUN cd /kai/samples && ./fetch_apps.py
Cloning kitchensink...
*** Exiting since 'sample_repos/kitchensink' already exists
*** Delete 'sample_repos' and rerun this script
Error: building at STEP "RUN cd /kai/samples && ./fetch_apps.py": while running runtime: exit status 1

Full output: https://gist.github.com/jwmatthews/333a849213830973e7f242c0504a7874

@jwmatthews
Copy link
Member Author

I think this is related to us now fetching the apps during the time of build, yet if you had run fetch_apps.py locally before building, the sample repos are copied over at time of build and fetch_apps.py then exists out from:

https://github.com/konveyor-ecosystem/kai/blob/main/samples/fetch_apps.py#L17

@jwmatthews
Copy link
Member Author

Below looks to help

 $ git diff
diff --git a/samples/fetch_apps.py b/samples/fetch_apps.py
index 68e5bd8..4df3ab9 100755
--- a/samples/fetch_apps.py
+++ b/samples/fetch_apps.py
@@ -12,9 +12,8 @@ def fetch_sample_apps():
     for repo in repos:
         print(f"Cloning {repo}...")
         if os.path.exists(f"sample_repos/{repo}"):
-            print(f"*** Exiting since 'sample_repos/{repo}' already exists")
-            print("*** Delete 'sample_repos' and rerun this script")
-            sys.exit(1)
+            print(f"*** Skipping since 'sample_repos/{repo}' already exists")
+            continue
         gitCloneStatus = subprocess.run(  # trunk-ignore(bandit)
             ["git", "clone", repos[repo][0], f"sample_repos/{repo}"]
         )

With above

STEP 9/11: RUN cd /kai/samples && ./fetch_apps.py
Cloning kitchensink...
*** Skipping since 'sample_repos/kitchensink' already exists
Cloning ticket-monster...
*** Skipping since 'sample_repos/ticket-monster' already exists
Cloning helloworld-mdb...
*** Skipping since 'sample_repos/helloworld-mdb' already exists
Cloning bmt...
*** Skipping since 'sample_repos/bmt' already exists
Cloning cmt...
*** Skipping since 'sample_repos/cmt' already exists
Cloning tasks-qute...
*** Skipping since 'sample_repos/tasks-qute' already exists
Cloning greeter...
*** Skipping since 'sample_repos/greeter' already exists
Cloning ejb-remote...
*** Skipping since 'sample_repos/ejb-remote' already exists
Cloning ejb-security...
*** Skipping since 'sample_repos/ejb-security' already exists
--> 8792f8bb4579
STEP 10/11: COPY build/entrypoint.sh /usr/local/bin/entrypoint.sh
--> 8a6dc28c005d
STEP 11/11: ENTRYPOINT /usr/local/bin/entrypoint.sh
COMMIT quay.io/konveyor/kai:latest
--> b39c90eadc43
Successfully tagged quay.io/konveyor/kai:latest
b39c90eadc43f171501c9de1303959982f3aca5816f4450dc6dc48638bcb3115

real	2m15.473s
user	0m16.451s
sys	0m3.520s

@jwmatthews
Copy link
Member Author

Fix for this is included in #237

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

No branches or pull requests

1 participant