Skip to content

build: more agent env setup improvements - #1109

Merged
wesleyboar merged 6 commits into
TACC:mainfrom
wesleyboar:cursor/development-environment-setup-d0e8
Mar 6, 2026
Merged

build: more agent env setup improvements#1109
wesleyboar merged 6 commits into
TACC:mainfrom
wesleyboar:cursor/development-environment-setup-d0e8

Conversation

@wesleyboar

@wesleyboar wesleyboar commented Mar 5, 2026

Copy link
Copy Markdown
Member

Overview

Resolve issues encountered while setting up dev env

Related

Changes

  • docker-compose.dev.yml: updated Elasticsearch image from 7.17.0 to 7.17.9
  • AGENTS.md: noted discovered gotchas

Testing

  1. DJANGO_SUPERUSER_PASSWORD=admin123 make setup
  2. Verify all Docker containers are running.
  3. Confirm CMS running at localhost:8000.
  4. Verify Elasticsearch cluster health is green at localhost:9201/_cluster/health.
  5. (Optional) docker exec core_cms flake8 taccsite_cms/ --max-line-length=120 (332 pre-existing warnings expected).
  6. (Optional) docker exec core_cms python manage.py test taccsite_cms.contrib.taccsite_sample --no-input (6 tests passed).
  7. (Manual) Log in as admin, create a "Hello World" CMS page, and edit page.

UI

Verified. Not posted.


Open in Web Open in Cursor 

cursoragent and others added 3 commits March 5, 2026 22:32
- Dockerfile: Pin uwsgi==2.0.23 and set PIP_NO_BUILD_ISOLATION=1 to fix Poetry PEP 517 build failure
- docker-compose.dev.yml: Update ES image from 7.17.0 to 7.17.9 to fix cgroups v2 crash
- AGENTS.md: Document discovered gotchas (ES cgroup, uwsgi build, postgres secrets)

Co-authored-by: Wesley B <wesleyboar@users.noreply.github.com>
Co-authored-by: Wesley B <wesleyboar@users.noreply.github.com>
…LATION)

Build succeeds without these changes; the initial failure was transient.

Co-authored-by: Wesley B <wesleyboar@users.noreply.github.com>
@qodo-code-review

Copy link
Copy Markdown

Review Summary by Qodo

Fix Elasticsearch cgroups v2 crash and document dev gotchas

🐞 Bug fix 📝 Documentation

Grey Divider

Walkthroughs

Description
• Update Elasticsearch image to 7.17.9 to fix cgroups v2 crash
• Document Elasticsearch cgroups v2 compatibility issue
• Document optional Postgres secret files for development
Diagram
flowchart LR
  ES["Elasticsearch 7.17.0<br/>crashes on cgroups v2"]
  FIX["Update to 7.17.9"]
  DOCS["Document gotchas<br/>in AGENTS.md"]
  ES -- "fix kernel issue" --> FIX
  FIX --> DOCS
  DOCS -- "includes postgres secrets" --> DOCS
Loading

Grey Divider

File Changes

1. docker-compose.dev.yml 🐞 Bug fix +1/-1

Upgrade Elasticsearch to fix cgroups v2 crash

• Update Elasticsearch image from 7.17.0 to 7.17.9
• Resolves cgroups v2 compatibility issue causing crashes

docker-compose.dev.yml


2. AGENTS.md 📝 Documentation +2/-0

Document Elasticsearch and Postgres development gotchas

• Document Elasticsearch 7.17.0 cgroups v2 crash issue
• Note that Postgres secret files are optional for development
• Provide guidance on using ES 7.17.9+ in docker-compose.dev.yml

AGENTS.md


Grey Divider

Qodo Logo

@qodo-code-review

qodo-code-review Bot commented Mar 5, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (4) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Postgres secrets note wrong🐞 Bug ⛯ Reliability
Description
AGENTS.md claims the Postgres ./conf/postgres/*.secret files can be ignored, but
docker-compose.dev.yml bind-mounts them from gitignored paths and the setup flow doesn’t create
them, so fresh setups are prone to failing or requiring manual local files.
Code

AGENTS.md[41]

+- **Postgres secret files:** `docker-compose.dev.yml` mounts `./conf/postgres/*.secret` files. These are not required for development and can be ignored.
Evidence
The new guidance says the secret files can be ignored, but the dev compose requires those host paths
to exist via bind mounts. Those files are explicitly gitignored (so they won’t be present on a fresh
clone) and the setup script starts Docker without creating them, making setup brittle and
contradicting the doc change.

AGENTS.md[35-41]
docker-compose.dev.yml[15-26]
.gitignore[37-38]
bin/setup-cms.sh[118-123]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`AGENTS.md` says Postgres `./conf/postgres/*.secret` files “can be ignored”, but `docker-compose.dev.yml` bind-mounts them from gitignored paths and `bin/setup-cms.sh` doesn’t create them. This contradiction makes first-time setup brittle.
## Issue Context
- The secret files are gitignored, so new clones won’t have them.
- The dev compose currently bind-mounts them anyway.
## Fix Focus Areas
- docker-compose.dev.yml[22-26]
- docker-compose.example-cms.yml[22-26]
- bin/setup-cms.sh[118-123]
- AGENTS.md[40-41]
- .gitignore[37-38]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Postgres secrets note wrong🐞 Bug ⛯ Reliability
Description
AGENTS.md claims the Postgres ./conf/postgres/*.secret files can be ignored, but
docker-compose.dev.yml bind-mounts them from gitignored paths and the setup flow doesn’t create
them, so fresh setups are prone to failing or requiring manual local files.
Code

AGENTS.md[41]

+- **Postgres secret files:** `docker-compose.dev.yml` mounts `./conf/postgres/*.secret` files. These are not required for development and can be ignored.
Evidence
The new guidance says the secret files can be ignored, but the dev compose requires those host paths
to exist via bind mounts. Those files are explicitly gitignored (so they won’t be present on a fresh
clone) and the setup script starts Docker without creating them, making setup brittle and
contradicting the doc change.

AGENTS.md[35-41]
docker-compose.dev.yml[15-26]
.gitignore[37-38]
bin/setup-cms.sh[118-123]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`AGENTS.md` says Postgres `./conf/postgres/*.secret` files “can be ignored”, but `docker-compose.dev.yml` bind-mounts them from gitignored paths and `bin/setup-cms.sh` doesn’t create them. This contradiction makes first-time setup brittle.
## Issue Context
- The secret files are gitignored, so new clones won’t have them.
- The dev compose currently bind-mounts them anyway.
## Fix Focus Areas
- docker-compose.dev.yml[22-26]
- docker-compose.example-cms.yml[22-26]
- bin/setup-cms.sh[118-123]
- AGENTS.md[40-41]
- .gitignore[37-38]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

3. ES version mismatch🐞 Bug ⛯ Reliability
Description
The dev compose was bumped to Elasticsearch 7.17.9 for the cgroups v2 crash, but the example compose
path (make example) still pins 7.17.0, so users following the example workflow can still hit the
same crash.
Code

docker-compose.dev.yml[33]

+    image: docker.elastic.co/elasticsearch/elasticsearch:7.17.9
Evidence
AGENTS.md documents that ES 7.17.0 crashes on cgroups v2 and recommends 7.17.9+, and the PR updates
docker-compose.dev.yml accordingly. However, the example compose stack still pins 7.17.0 and `make
example` uses that stack, leaving a common entrypoint vulnerable to the same crash.

AGENTS.md[39-41]
docker-compose.dev.yml[32-34]
docker-compose.example-cms.yml[32-34]
docker-compose.example.yml[21-24]
Makefile[27-30]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`docker-compose.dev.yml` was upgraded to ES 7.17.9 to avoid the documented cgroups v2 crash, but `docker-compose.example-cms.yml` (used by `make example`) still pins 7.17.0.
## Issue Context
`make example` uses `docker-compose.example.yml`, which extends `docker-compose.example-cms.yml` for the Elasticsearch service.
## Fix Focus Areas
- docker-compose.example-cms.yml[32-34]
- docker-compose.example.yml[21-24]
- Makefile[27-30]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


4. ES version mismatch🐞 Bug ⛯ Reliability
Description
The dev compose was bumped to Elasticsearch 7.17.9 for the cgroups v2 crash, but the example compose
path (make example) still pins 7.17.0, so users following the example workflow can still hit the
same crash.
Code

docker-compose.dev.yml[33]

+    image: docker.elastic.co/elasticsearch/elasticsearch:7.17.9
Evidence
AGENTS.md documents that ES 7.17.0 crashes on cgroups v2 and recommends 7.17.9+, and the PR updates
docker-compose.dev.yml accordingly. However, the example compose stack still pins 7.17.0 and `make
example` uses that stack, leaving a common entrypoint vulnerable to the same crash.

AGENTS.md[39-41]
docker-compose.dev.yml[32-34]
docker-compose.example-cms.yml[32-34]
docker-compose.example.yml[21-24]
Makefile[27-30]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`docker-compose.dev.yml` was upgraded to ES 7.17.9 to avoid the documented cgroups v2 crash, but `docker-compose.example-cms.yml` (used by `make example`) still pins 7.17.0.
## Issue Context
`make example` uses `docker-compose.example.yml`, which extends `docker-compose.example-cms.yml` for the Elasticsearch service.
## Fix Focus Areas
- docker-compose.example-cms.yml[32-34]
- docker-compose.example.yml[21-24]
- Makefile[27-30]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@wesleyboar wesleyboar changed the title Cursor/development environment setup d0e8 build: more agent env setup improvements Mar 5, 2026
Comment thread AGENTS.md
Comment thread docker-compose.dev.yml
wesleyboar and others added 3 commits March 5, 2026 17:39
This change avoids missing files created as empty dirs.
Co-authored-by: Wesley B <wesleyboar@users.noreply.github.com>
@wesleyboar

Copy link
Copy Markdown
Member Author

/review

@qodo-code-review

qodo-code-review Bot commented Mar 5, 2026

Copy link
Copy Markdown

Persistent review updated to latest commit 67b690c

@wesleyboar

wesleyboar commented Mar 6, 2026

Copy link
Copy Markdown
Member Author

Qodo is hallucinating. All is well. No more 7.17.0 references. All are 7.17.9.

@wesleyboar
wesleyboar merged commit d146f57 into TACC:main Mar 6, 2026
@wesleyboar
wesleyboar deleted the cursor/development-environment-setup-d0e8 branch March 6, 2026 00:10
wesleyboar added a commit that referenced this pull request Mar 24, 2026
This half-reverts commit d146f57.

Do not update Elasticsearch for humans.
wesleyboar added a commit that referenced this pull request May 27, 2026
## Overview

Do **not** let A.I. agent environment tweaks affect other environments.

## Related

- refactors #1109
- matches ElasticSearch used by
[TACC/Core-Portal@v3.19.0](https://github.com/TACC/Core-Portal/blob/v3.19.0/server/conf/docker/docker-compose-dev.all.debug.yml#L35)
- ~~fixes [WC-428]~~

## Changes

- **ignores** `docker-compose.agent.yml`
- **documents** that AI should use `docker-compose.agent.yml` as
necessary

## Testing

Skipped.

## UI

N/A

## Notes

Initially, this PR was to solve [WC-428], but @jarosenb assures me that
[the real issue
(private)](https://tacc-team.slack.com/archives/C04TQ1P04UX/p1774373248637889?thread_ts=1774367163.360269&cid=C04TQ1P04UX)
is unrelated to this. But, I still would have preferred this solution to
#1109, so I'm tempted to merge it.

[WC-428]: https://tacc-main.atlassian.net/browse/WC-428
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.

2 participants