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

Prebuild fails to run for some users #118

Closed
tyler36 opened this issue Sep 15, 2023 · 19 comments
Closed

Prebuild fails to run for some users #118

tyler36 opened this issue Sep 15, 2023 · 19 comments

Comments

@tyler36
Copy link
Contributor

tyler36 commented Sep 15, 2023

Describe the bug

When using DrupalPod, it states it can't find a project, installs the project files then says can't find project and install the project then says ....

Looking through terminal output, the below catches my eye:

mc: <ERROR> Unable to stat `gcs/drupalpod/main/ready-made-envs.tar.gz`. Insufficient permissions to access this file `https://storage.googleapis.com/drupalpod/main/ready-made-envs.tar.gz`.
mc: <ERROR> Unable to stat `gcs/drupalpod/main/ready-made-envs.tar.gz`. Insufficient permissions to access this file `https://storage.googleapis.com/drupalpod/main/ready-made-envs.tar.gz`.

To Reproduce

  1. Visit https://www.drupal.org/project/drupal/issues/3178202
  2. Click DrupalPod extension
  3. Enter the following:

render-block

  1. Accept Gitpod default.
  2. Watch terminal ....
...
 [success] Successfully enabled: devel
 [success] Successfully installed theme: claro
You have specified a project type of drupal9 but no project of that type is found in /workspace/ready-made-envs/10.0.0/web
Warning: MOST EXISTING CONTENT in the composer root (/workspace/ready-made-envs/10.0.0) will be deleted by the composer create-project operation. Only .ddev, .git and .tarballs will be preserved.
Removing any existing files in composer root
Creating a "drupal/recommended-project:~10.0.0" project at "/tmp/oyTKvA"
Installing drupal/recommended-project (10.0.10)
...

Expected behavior

GipodPod installs Drupal with patch.

Version and configuration information (please complete the following information)

Additional context

@tyler36
Copy link
Contributor Author

tyler36 commented Sep 25, 2023

Did screenshare with @shaal.
Was able to reproduce problem and all my settings appeared correct.
After trying several thing, we were unable to fix issue.

@shaal opened an issue on Gitpod: Other users can't load my prebuild

@rfay
Copy link
Collaborator

rfay commented Sep 25, 2023

Thanks for continuing to follow this up. Now that you understand it better, could you give it a better title? Maybe something like Insufficient permissions to access this file https://storage.googleapis.com/drupalpod/main/ready-made-envs.tar.gz``

@tyler36 tyler36 changed the title Drupal loops while installing Prebuild fails to run for some users Sep 25, 2023
@rfay
Copy link
Collaborator

rfay commented Sep 26, 2023

I tried using the github user ddltest and got the same failure @tyler36 had.

+ mc find gcs/drupalpod/main/ready-made-envs.tar.gz
mc: <ERROR> Unable to stat `gcs/drupalpod/main/ready-made-envs.tar.gz`. Insufficient permissions to access this path `https://storage.googleapis.com/drupalpod/main/ready-made-envs.tar.gz`.
+ echo '*** Upload environments file to Google Cloud'
+ echo drupalpod/main/ready-made-envs.tar.gz
+ mc cp /workspace/ready-made-envs.tar.gz gcs/drupalpod/main/ready-made-envs.tar.gz
mc: <ERROR> Failed to copy `/workspace/ready-made-envs.tar.gz`. Insufficient permissions to access this path `https://storage.googleapis.com/drupalpod/main/ready-made-envs.tar.gz`

real    14m57.850s
user    0m50.128s
sys     0m46.976s
cp: cannot stat '../ready-made-envs/9.4.0/.': No such file or directory
Failed to restore snapshot demo_umami for project drupalpod: no snapshot found for name demo_umami: open /workspace/DrupalPod/.ddev/db_snapshots: no such file or directory

So I imagine this is a complete blocker for all new gitpod users.

I'm happy to give you full access to the ddltest account @shaal

@tyler36
Copy link
Contributor Author

tyler36 commented Sep 26, 2023

Gitpod lists me on the "Open Source" billing plan, if it helps.

@rfay
Copy link
Collaborator

rfay commented Sep 26, 2023

I tried the same with the github drud-test-machine-account. On this one gitpod walked me through the whole onboarding routine, so it had apparently never been used with gitpod before.

The same failure happened.

gist: https://gist.github.com/rfay/1a6aff3a52f01999d4da905ceef12fe9

I suspect that DrupalPod is unusable for all new gitpod users.

@shaal
Copy link
Owner

shaal commented Sep 26, 2023

I created a separated new Github account + Gitpod. That user was able to open DrupalPod workspace WITH prebuild

@rfay
Copy link
Collaborator

rfay commented Sep 26, 2023

Here's a workspace snapshot: https://gitpod.io#snapshot/3d7b1c7d-75b1-4cb2-a4cc-c913092b60f9

I don't even know how to recover from this failure. I think we might need to go without prebuilds?

What does one do to recover when the prebuild fails?

@tyler36
Copy link
Contributor Author

tyler36 commented Sep 26, 2023

When I try https://gitpod.io/#snapshot/3d7b1c7d-75b1-4cb2-a4cc-c913092b60f9 it appears to run the pre-builds.

  • States "loading prebuilds" on loading screen
  • Starts very quickly
  • I don't see permission errors
  • I don't see it downloading DDEV images

See logs here

@rfay
Copy link
Collaborator

rfay commented Sep 26, 2023

Right, but does it work? Doesn't work for me, because the prebuild wasn't loaded. Even composer.json isn't there.

@tyler36
Copy link
Contributor Author

tyler36 commented Sep 26, 2023

Right, but does it work?

@rfay I thought your workspace was a fork of DrupalPod which doesn't contain Drupal. My fork of DrupalPod produces a similar result to your workspace.

https://github.com/shaal/ddev-gitpod is the repo has the Drupal composer.json. My fork of that works (workign Drupal site) but the @shaal does not.

@rfay
Copy link
Collaborator

rfay commented Sep 26, 2023

No, I just clicked the drupalpod icon on the repo. Is that wrong?

If somebody tells me how to successfully use Drupalpod anywhere I'll be happy to give it some time. Failed at everything I've tried (even with my own user).

@shaal
Copy link
Owner

shaal commented Sep 26, 2023

@rfay that's how I usually test it, for loading Drupal with umami profile on DrupalPod. But currently this is broken (but unrelated to the prebuild not loading for some users issue)

@rfay
Copy link
Collaborator

rfay commented Sep 26, 2023

@rfay that's how I usually test it, for loading Drupal with umami profile on DrupalPod. But currently this is broken (but unrelated to the prebuild not loading for some users issue)

I think you had suggested this testing technique to me.

Can you please tell me a correct way to test? Give me some issue I can go to that will work? Tell me what choices I should make in the form?

@shaal
Copy link
Owner

shaal commented Sep 29, 2023

The solution should be that if prebuild failed - the current workspace will install Drupal simply without using the ready-made-envs (which is what helps environments to be prepared faster when prebuild do work)

@tyler36
Copy link
Contributor Author

tyler36 commented Oct 2, 2023

It appears to be working now following the the steps in the OP.

  • I no longer see DDEV images download.
  • It "starts" with DDEV starting the ssh-agent, db and web containers.
Starting DrupalPod... 
Downloading https://github.com/docker/compose/releases/download/v2.21.0/docker-compose-linux-x86_64 ... 
docker-compose 56.78 MiB / 56.78 MiB [==============================] 100.00% 0s
Download complete. 
 Container ddev-ssh-agent  Recreate 
 Container ddev-ssh-agent  Recreated 
...
  • I see composer download the project
Creating a "drupal/recommended-project:10.0.x-dev" project at "./temp-composer-files"
Info from https://repo.packagist.org: #StandWithUkraine
Installing drupal/recommended-project (10.0.x-dev be77349ecf5d9fdc5f9aea15e4aab15f4092dad3)
  - Downloading drupal/recommended-project (10.0.x-dev be77349)
 ...
drupalpod-setup.sh script ran for 85 seconds
  • Simple browser opens the "umami" homepage.
    • Previously, I was unable to reach this step.
    • I now appear to have a functioning Drupal site.

@tyler36
Copy link
Contributor Author

tyler36 commented Oct 2, 2023

I tried testing on some other project issue pages and am hitting an error:

Tamper: https://www.drupal.org/project/tamper/issues/3049621

Lock file operations: 1 install, 0 updates, 0 removals
  - Locking mglaman/composer-drupal-lenient (1.0.3)
Writing lock file
> repos/add-project-as-symlink.sh
Replace project with a symlink
repos/add-project-as-symlink.sh: line 5: cd: web/modules/contrib: No such file or directory
Script repos/add-project-as-symlink.sh handling the post-update-cmd event returned with error code 1

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Failed to execute command composer require mglaman/composer-drupal-lenient --no-install: exit status 1

real    0m1.594s
user    0m0.128s
sys     0m0.167s

Not sure if this is related to the changes to fix this issue or not.

@tyler36
Copy link
Contributor Author

tyler36 commented Oct 2, 2023

Here I a couple I was able to replicate the mglaman/composer-drupal-lenient issue on:

Failing patch

  1. Visit https://www.drupal.org/project/tamper/issues/3049621
  2. Use DrupalPod extension with the following options:

Failing branch

  1. Visit https://www.drupal.org/project/tamper/issues/3362615
  2. Use DrupalPod extension with the following options:
  • Branch: 3362615-json-array-with
  • Drupal core: 10.0.x
  • Install profile: Standard

@tyler36
Copy link
Contributor Author

tyler36 commented Oct 2, 2023

With the merge of #134 , the issue seems to be resolved.

  • Prebuilds work (it skips the downloading of DDEV images)
  • composer-drupal-lenient error does not appear.
  • Drupal welcome can be displayed.

@tyler36 tyler36 closed this as completed Oct 2, 2023
@rfay
Copy link
Collaborator

rfay commented Oct 2, 2023

Thanks @tyler36 @shaal !

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

3 participants