-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
DDEV project config #22245
base: 5.x-dev
Are you sure you want to change the base?
DDEV project config #22245
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
I haven't tested anything yet, but here are already some thoughts I had while looking at the code:
|
The password is simple, it's a dev environment, so this change is ok.
…t for easier diff
eb3388b
to
70f8381
Compare
Ok, I think this is now in a testable state with some documentation needed.
|
@@ -0,0 +1,41 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#!/bin/bash | |
#!/usr/bin/env bash |
For all the host commands.
My NixOS box only has /bin/sh
and /usr/bin/env
available, no /bin/bash
. I would not expect someone to have this problem, but /usr/bin/env
should be just a tiny bit more portable.
We could also switch to plain /bin/sh
, but that may require changes to the read
arguments afaik.
- exec: MYSQL_PWD=root mysql -uroot -e "CREATE DATABASE IF NOT EXISTS matomo_tests; GRANT ALL ON matomo_tests.* to 'db'@'%';" | ||
service: db | ||
- exec: MYSQL_PWD=root mysql -uroot -e "CREATE DATABASE IF NOT EXISTS _UITestFixture; GRANT ALL ON _UITestFixture.* to 'db'@'%';" | ||
service: db |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- exec: MYSQL_PWD=root mysql -uroot -e "CREATE DATABASE IF NOT EXISTS matomo_tests; GRANT ALL ON matomo_tests.* to 'db'@'%';" | |
service: db | |
- exec: MYSQL_PWD=root mysql -uroot -e "CREATE DATABASE IF NOT EXISTS _UITestFixture; GRANT ALL ON _UITestFixture.* to 'db'@'%';" | |
service: db | |
- exec: MYSQL_PWD=root mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* to 'db'@'%'" | |
service: db | |
- exec: MYSQL_PWD=root mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* to 'db'@'localhost'" | |
service: db |
This would allow us to configure db:db
for the tests instead of root:root
.
Otherwise there may be databases not visible to the db
user, for example when running when running the EmptySite
spec:
ddev matomo:console tests:run-ui --persist-fixture-data EmptySite
Without more privileges the created _EmptySite
database would not be visible.
Not 100% sure if we need to run the statement for if for @localhost
, I think it was required to have both ddev mysql
and mysql
to have all the privileges..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't expect the @localhost
to be needed as the db is not running on the same system so PHP will never access it on localhost.
I'll test it out, thanks for pointing this out and identifying a test that can be impacted by this.
- exec: MYSQL_PWD=root mysql -uroot -e "CREATE DATABASE IF NOT EXISTS _UITestFixture; GRANT ALL ON _UITestFixture.* to 'db'@'%';" | ||
service: db | ||
- exec-host: ddev matomo:init | ||
webimage_extra_packages: [build-essential, chromium, fonts-dejavu, fonts-liberation, gconf-service, imagemagick, imagemagick-doc, libappindicator1, libasound2, libatk1.0-0, libcairo2, libdrm2, libgbm1, libgconf-2-4, libgdk-pixbuf2.0-0, libgtk-3-0, libnspr4, libnss3, libpango-1.0-0, libpangocairo-1.0-0, libx11-xcb1, libxcomposite1, libxcursor1, libxdamage1, libxfixes3, libxi6, libxrandr2, libxrender1, libxshmfence1, libxss1, libxtst6, ttf-mscorefonts-installer, xdg-utils] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of the screenshot tests give really weird results. PhpStorm shows all processed screenshots as "24-bit" instead of "32-bit".
And some screenshots created in the Dashboard spec (e.g. Dashboard_dashboard1_mobile.png
) are stretched beyond recognition, though the height/width of the file match the expected screenshots.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
24 vs 32 bit wouldn't be a problem if we eventually run CI using ddev as well, as long as the images carry the visual information they should.
Could you please send me some of the image names or even some of the files so that I could compare them with mine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sent you my local images and some additional information. It looks like the DDEV environment generates images without an alpha channel:
// repository
Type: TrueColorAlpha
Endianness: Undefined
Depth: 8-bit
Channels: 4.0
Channel depth:
Red: 8-bit
Green: 8-bit
Blue: 8-bit
Alpha: 1-bit
// ddev
Type: TrueColor
Endianness: Undefined
Depth: 8-bit
Channels: 3.0
Channel depth:
Red: 8-bit
Green: 8-bit
Blue: 8-bit
I had some issue with starting the web-container caused by Adding this file #!/bin/bash
# Make web-container `/var/log` directory writable for supervisord.
sudo chmod 777 /var/log
|
If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'. |
This PR was last updated more than one month ago, maybe it's time to close it. Please check if there is anything we still can do or close this PR. ping @matomo-org/core-reviewers |
Description
Provides DDEV project base and resolves #21883
Replacing community PR #21884 so that it's easier for us to iterate on the work, rebase, test etc.
Review