Skip to content

Test workflows connectivity#2971

Closed
candemiralp wants to merge 3 commits intomainfrom
test-workflows-connectivity
Closed

Test workflows connectivity#2971
candemiralp wants to merge 3 commits intomainfrom
test-workflows-connectivity

Conversation

@candemiralp
Copy link
Contributor

Description

Tested scenarios

Fixes

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Hello @candemiralp, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

Hello team, gemini-code-assist here to provide a summary of this pull request. Based on the title "Test workflows connectivity" and the single change in the .github/docker-compose.yml file, it appears the primary intent of this PR is to facilitate debugging or inspection of application logs during workflow runs. The description is empty, so I'm inferring the purpose mainly from the code change itself. The core change involves modifying the Docker Compose configuration used in the GitHub workflows to make the application logs accessible outside the container.

Highlights

  • Workflow Configuration Update: The pull request updates the .github/docker-compose.yml file, which is likely used to set up the environment for GitHub workflows.
  • Exposing Application Logs: A volume mount is added to the docker-compose.yml to expose the application's log directory (/var/www/html/var/log/adyen inside the container) to a local directory (../app-logs), making logs accessible for debugging workflow failures or inspecting application behavior during tests.

Changelog

  • .github/docker-compose.yml
    • Added a volume mount (../app-logs:/var/www/html/var/log/adyen) to the services section to expose application logs from the container to the host filesystem. This change is introduced at line 61 in the updated file.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


Workflow runs the test,
Logs appear, put to the test,
Debugging made easy.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This PR introduces a volume mount in the .github/docker-compose.yml file to externalize Adyen logs, presumably to aid in debugging workflows. This is a sensible addition for improving observability during testing or CI processes.

The PR description is currently using the default template. It would be beneficial to update it with specific details about the changes, the motivation, and any tested scenarios, as prompted by the template. This helps reviewers understand the context and impact better.

I have a couple of points regarding the implementation of the log volume:

Summary of Findings

  • Log Directory Write Permissions: The newly added log volume ../app-logs:/var/www/html/var/log/adyen might face write permission issues. If the host directory ../app-logs is auto-created by Docker, it may be owned by root, potentially preventing the non-root PHP-FPM user in the container from writing logs. This could impede debugging.
  • Gitignore for Log Directory: The ../app-logs directory, now used for storing logs, should be added to the project's .gitignore file to prevent accidental commitment of log files to the repository.
  • Pull Request Description: The pull request description is sparse. Filling it with details about the purpose, changes, and tested scenarios would improve clarity for reviewers. (Not commented directly due to review settings, but noted here).

Merge Readiness

The change to externalize logs is a good step for improving debuggability in workflows. However, before merging, I recommend addressing the potential permission issue with the log directory and ensuring that the app-logs directory is added to .gitignore. Addressing these points will help ensure the change is robust and doesn't lead to unintended side effects. I am unable to approve pull requests, so please ensure these changes are reviewed and approved by a maintainer before merging.

- ./Makefile:/var/www/html/Makefile
- composer:/usr/local/bin
- magento:/var/www/html
- ../app-logs:/var/www/html/var/log/adyen
Copy link
Contributor

Choose a reason for hiding this comment

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

high

This new volume mounts ../app-logs from the host to /var/www/html/var/log/adyen in the container. A common issue with host-mounted volumes for logs is permissions.

If the ../app-logs directory (located at the repository root) doesn't exist on the host when docker-compose up is run, Docker will create it, but it will typically be owned by root on the host. The PHP-FPM process inside the container, which writes the Adyen logs, often runs as a non-root user (e.g., www-data).

Could you clarify if the www-data user (or equivalent) inside the container will have the necessary write permissions to this host-mounted ../app-logs directory? If not, logging might fail, which could hinder debugging efforts.

Possible ways to handle this include:

  • Ensuring the ../app-logs directory is pre-created on the host/CI runner with appropriate permissions before the container starts.
  • Using an entrypoint script within the Docker image to chown the /var/www/html/var/log/adyen path after it's mounted.
  • Verifying if the user context in your CI environment mitigates this (e.g., if the container runs as root or UID mapping aligns).

- ./Makefile:/var/www/html/Makefile
- composer:/usr/local/bin
- magento:/var/www/html
- ../app-logs:/var/www/html/var/log/adyen
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

With the introduction of the ../app-logs directory for storing Adyen logs, it's important to ensure this directory is added to the repository's root .gitignore file (e.g., by adding a line like app-logs/ or *.log within an app-logs/.gitignore file).

This will prevent potentially large or sensitive log files from being accidentally committed to the version control system. Has this been considered?

@sonarqubecloud
Copy link

@candemiralp candemiralp marked this pull request as draft May 26, 2025 14:34
@candemiralp candemiralp deleted the test-workflows-connectivity branch May 27, 2025 06:40
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.

1 participant