Skip to content

Minor additions when setting up locally; Updated docs - #58

Merged
JonnyTran merged 6 commits into
developfrom
minorAdd
May 24, 2025
Merged

JonnyTran merged 6 commits into
developfrom
minorAdd

Conversation

@priyankeshh

Copy link
Copy Markdown
Contributor

Description

Related Tickets & Documents

Closes #

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Steps to QA

Added/updated tests?

  • Yes
  • No, and this is why: please replace this line with details on why tests
    have not been included
  • I need help with writing tests

Added/updated documentations?

  • Yes
  • No, and this is why: please replace this line with details on why tests
    have not been included
  • I need help with writing docs

Checklist

Copilot AI review requested due to automatic review settings May 10, 2025 12:10
@priyankeshh
priyankeshh requested review from a team as code owners May 10, 2025 12:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces minor local development setup improvements and updates documentation accordingly.

  • Added a complete docker-compose.yaml for local development with updated services and volumes.
  • Modified documentation in both development_setup.md and upgrading.md to reflect the updated docker compose commands.
  • Updated environment variables in .env.dev and adjusted container networking configuration in the devcontainer compose file.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
docker-compose.yaml Added full service definitions for local development.
argilla/docs/getting_started/development_setup.md Updated Docker command instructions.
argilla/docs/admin_guide/upgrading.md Updated Docker commands and file references.
argilla-server/.env.dev Adjusted database and Elasticsearch connection details.
.devcontainer/docker-compose/docker-compose.yml Commented out network_mode for potential network issues.
Comments suppressed due to low confidence (1)

.devcontainer/docker-compose/docker-compose.yml:33

  • Commenting out 'network_mode: host' may affect container networking; verify that the current setup meets the connectivity requirements for your development environment.
    # network_mode: host

Comment thread docker-compose.yaml Outdated
- ARGILLA_ELASTICSEARCH=${ARGILLA_ELASTICSEARCH}
- ARGILLA_REDIS_URL=${ARGILLA_REDIS_URL}
- ARGILLA_DEFAULT_USERNAME=argilla
- ARGILLA_DEFAULT_PASSWORD=12345678

Copilot AI May 10, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] The default password '12345678' is weak; if this configuration is used beyond local development, consider using a stronger password or configuring it securely.

Suggested change
- ARGILLA_DEFAULT_PASSWORD=12345678
- ARGILLA_DEFAULT_PASSWORD=${ARGILLA_DEFAULT_PASSWORD}
# Ensure ARGILLA_DEFAULT_PASSWORD is set to a strong password in the environment, especially for production.

Copilot uses AI. Check for mistakes.
@github-advanced-security

Copy link
Copy Markdown

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@codecov

codecov Bot commented May 10, 2025 •

Copy link
Copy Markdown

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
3 3 0 0
View the top 3 failed test(s) by shortest run time
tests/unit/api/handlers/v1/test_documents.py::tests.unit.api.handlers.v1.test_documents
Stack Traces | 0s run time
ImportError while importing test module '.../handlers/v1/test_documents.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
.../hostedtoolcache/Python/3.13.3.../x64/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
.../handlers/v1/test_documents.py:10: in <module>
    from argilla_server.schemas.v1.documents import DocumentCreateRequest, DocumentDeleteRequest
E   ModuleNotFoundError: No module named 'argilla_server.schemas'
tests/unit/api/handlers/v1/test_files.py::tests.unit.api.handlers.v1.test_files
Stack Traces | 0s run time
ImportError while importing test module '.../handlers/v1/test_files.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
.../hostedtoolcache/Python/3.13.3.../x64/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
.../handlers/v1/test_files.py:8: in <module>
    from argilla_server.schemas.v1.files import ListObjectsResponse, ObjectMetadata
E   ModuleNotFoundError: No module named 'argilla_server.schemas'
tests/unit/api/handlers/v1/test_models.py::tests.unit.api.handlers.v1.test_models
Stack Traces | 0s run time
ImportError while importing test module '.../handlers/v1/test_models.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
.../hostedtoolcache/Python/3.13.3.../x64/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
.../handlers/v1/test_models.py:5: in <module>
    from argilla_server.apis.v1.handlers.models import proxy
E   ModuleNotFoundError: No module named 'argilla_server.apis'

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@JonnyTran

Copy link
Copy Markdown
Member

Hi @priyankeshh , thanks for this. I realize the dev environment setup is not currently ideal for your workflow. To understand the current issues you have, can you list out the reasons for the files you added?

We can discuss more about this in greater depth in our next weekly check-in, by going through current dev setup issues and discussing options to make setting up test servers easier.

@priyankeshh

Copy link
Copy Markdown
Contributor Author

Hi @JonnyTran sorry for the late reply. Here's why I made the changes:

  1. Added docker-compose.yaml at root level:

    • Problem: Following the docs and running from .devcontainer/docker-compose/ wasn't reliable
    • What I did: Added root-level config for consistent startup regardless of directory
  2. network_mode: host comment-out:

    • Problem: This setting caused connection issues on some systems
    • What I did: Disabled it to use Docker's default networking
  3. Database path simplification:

    • Problem: Path with ${HOME} was causing permissions issues
    • What I did: Simplified to a relative path (./argilla-dev.db)
  4. Elasticsearch URL fix:

    • Problem: [::1] IPv6 format wasn't resolving consistently
    • What I did: Changed to localhost for better compatibility
  5. Use docker compose up instead of docker-compose up:

    • Updated to docker compose (vs docker-compose) per current best practices

These changes allowed me to successfully run the project locally.

@JonnyTran JonnyTran left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi @JonnyTran sorry for the late reply. Here's why I made the changes:

  1. Added docker-compose.yaml at root level:

    • Problem: Following the docs and running from .devcontainer/docker-compose/ wasn't reliable
    • What I did: Added root-level config for consistent startup regardless of directory
  2. network_mode: host comment-out:

    • Problem: This setting caused connection issues on some systems
    • What I did: Disabled it to use Docker's default networking
  3. Database path simplification:

    • Problem: Path with ${HOME} was causing permissions issues
    • What I did: Simplified to a relative path (./argilla-dev.db)
  4. Elasticsearch URL fix:

    • Problem: [::1] IPv6 format wasn't resolving consistently
    • What I did: Changed to localhost for better compatibility
  5. Use docker compose up instead of docker-compose up:

    • Updated to docker compose (vs docker-compose) per current best practices

These changes allowed me to successfully run the project locally.

Thanks for this overview @priyankeshh! I approved changes 2, 3, 4 and 5, with some modifications:

Regarding 3, the examples/deployments/docker/docker-composeyaml was moved to docker-compose.yaml at root level, along with some changes. Can you review this if you're able to locally deploy it, @priyankeshh ?

Regarding 1, it's not a good practice to place argilla-server/argilla-dev.db in the git repo.

Comment thread docker-compose.yaml Outdated
Comment thread argilla-server/.env.dev Outdated
Comment thread argilla-server/argilla-dev.db
Comment thread docker-compose.yaml
@JonnyTran
JonnyTran merged commit ead7190 into develop May 24, 2025
@JonnyTran
JonnyTran deleted the minorAdd branch May 24, 2025 07:23
JTran-IDM pushed a commit that referenced this pull request Jul 31, 2025
… docs (#58)

* setup ini

* added docker compose yaml in root

* added creds in docker

* docs: update Docker commands in upgrading and development setup documentation

* refactor: remove root docker-compose.yaml and update .env.dev for database path

* chore: remove deprecated docker-compose.yaml file from deployments

---------

Co-authored-by: JonnyTran <nhat.c.tran@gmail.com>
JonnyTran added a commit that referenced this pull request Jul 31, 2025
… docs (#58)

* setup ini

* added docker compose yaml in root

* added creds in docker

* docs: update Docker commands in upgrading and development setup documentation

* refactor: remove root docker-compose.yaml and update .env.dev for database path

* chore: remove deprecated docker-compose.yaml file from deployments

---------

Co-authored-by: JonnyTran <nhat.c.tran@gmail.com>
JTran-IDM pushed a commit that referenced this pull request Aug 2, 2025
… docs (#58)

* setup ini

* added docker compose yaml in root

* added creds in docker

* docs: update Docker commands in upgrading and development setup documentation

* refactor: remove root docker-compose.yaml and update .env.dev for database path

* chore: remove deprecated docker-compose.yaml file from deployments

---------

Co-authored-by: JonnyTran <nhat.c.tran@gmail.com>
JTran-IDM pushed a commit that referenced this pull request Aug 2, 2025
… docs (#58)

* setup ini

* added docker compose yaml in root

* added creds in docker

* docs: update Docker commands in upgrading and development setup documentation

* refactor: remove root docker-compose.yaml and update .env.dev for database path

* chore: remove deprecated docker-compose.yaml file from deployments

---------

Co-authored-by: JonnyTran <nhat.c.tran@gmail.com>
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.

4 participants