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

adding xdebug to the test docker just run url with ?XDEBUG_SESSION_START=1 and wait on port 9003 #6857

Merged
merged 16 commits into from
Feb 14, 2024

Conversation

TiagoMRodrigues
Copy link
Contributor

@TiagoMRodrigues TiagoMRodrigues commented Feb 10, 2024

…ART=1 and wait on port 9003

Description & Issue number it closes

Screenshots (if appropriate)

How to test the changes?

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@@ -17,7 +17,7 @@ RUN apt-get update && \
RUN docker-php-ext-install -j$(nproc) xml exif pdo_mysql gettext iconv mysqli zip
RUN docker-php-ext-configure gd --with-freetype --with-jpeg

RUN docker-php-ext-install -j$(nproc) gd
RUN docker-php-ext-install -j$(nproc) gd && pecl install xdebug && docker-php-ext-enable xdebug
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think Xdebug should be in the test image since this is intended for running the CI tests as quickly as possible.

This change probably makes sense in the dev image though, so it can be used during local development

docker/.env Outdated
XDEBUG_CONFIG="client_host=172.17.0.1 client_port=9003"
# FOR WINDOWS SHOULD USE
#XDEBUG_CONFIG="client_host=host.docker.internal client_port=9003"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can set a docker-compose override with the following configuration:

     extra_hosts:
       - host.docker.internal:host-gateway

so your linux machine can also respond to host.docker.internal

Copy link
Contributor

@DAcodedBEAT DAcodedBEAT left a comment

Choose a reason for hiding this comment

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

I think we should definitely consider the test vs dev image distinction.

Also since this a new feature to the development environment, it might be a good idea to document this somewhere

@TiagoMRodrigues
Copy link
Contributor Author

TiagoMRodrigues commented Feb 11, 2024

sure, didn't notice dev and test were there make all the sense to me that it should be in the other one.
seems to work at least in linux don't have a really a way to test in windows.

I just use this with php debug on vsc
with this config on it

        {
            "name": "XDEBUG ON DOCKER",
            "type": "php",
            "request": "launch",
            "port": 9003,
            "pathMappings": {
                "/var/www/html": "${workspaceFolder}"
            }
      }

@TiagoMRodrigues
Copy link
Contributor Author

@DawoudIO can you help in here this should not make any difference.

@DawoudIO
Copy link
Contributor

I don't use the dev docket, just the test one. If you think this is useful and has no bad affect go for it

@TiagoMRodrigues
Copy link
Contributor Author

Any idea why this keep failing on ui/finance/finance.reports.spec.js ? didn't even touch the test docker only the dev one all the code is the same as the one that is passing on master

@DawoudIO
Copy link
Contributor

I'll habe to checkout the branch and do some testing or you can run the test manually via cypress ui

@DAcodedBEAT
Copy link
Contributor

Why were files removed in 2da1090 ?

@TiagoMRodrigues
Copy link
Contributor Author

git commit -am added the files in Image folder and I just recommited without them again instead of going backwards.

@TiagoMRodrigues
Copy link
Contributor Author

added by mistake on c122ce5

@DAcodedBEAT
Copy link
Contributor

added by mistake on c122ce5

@TiagoMRodrigues I think these files already existed, but you changed the permissions on these files, which caused it to show in the diff.

@TiagoMRodrigues
Copy link
Contributor Author

yes you are right will revert on it.

@DAcodedBEAT DAcodedBEAT changed the title adding xdebug to the test docker just run url with ?XDEBUG_SESSION_ST… adding xdebug to the test docker just run url with ?XDEBUG_SESSION_START=1 and wait on port 9003 Feb 14, 2024
@DAcodedBEAT DAcodedBEAT merged commit c94ec46 into ChurchCRM:master Feb 14, 2024
3 checks passed
@DAcodedBEAT DAcodedBEAT added this to the vNext milestone Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants