nautobot / cookiecutter-nautobot-app

Cookiecutter template for creating new Nautobot Apps.
https://docs.nautobot.com/projects/cookiecutter-nautobot-app/en/latest/
Apache License 2.0
14 stars 5 forks source link

Git complains about file ownership when running `invoke generate-release-notes` #115

Open cmsirbu opened 3 months ago

cmsirbu commented 3 months ago

Environment

Observed Behavior

nautobot-app-dev-example (release-1.0.0 *)
> invoke generate-release-notes --version 1.0.0
Running docker compose command "ps --services --filter status=running"
Running docker compose command "run --rm --entrypoint='' -- nautobot env DJANGO_SETTINGS_MODULE=nautobot.core.settings towncrier build --version 1.0.0"
[+] Creating 2/0
 ✔ Container nautobot-dev-example-db-1     Created                                                        0.0s 
 ✔ Container nautobot-dev-example-redis-1  Created                                                        0.0s 
[+] Running 2/2
 ✔ Container nautobot-dev-example-db-1     Started                                                        0.4s 
 ✔ Container nautobot-dev-example-redis-1  Started                                                        0.4s 
Loading template...
Finding news fragments...
Rendering news fragments...
Writing to newsfile...
Staging newsfile...
fatal: detected dubious ownership in repository at '/source'
To add an exception for this directory, call:

        git config --global --add safe.directory /source
I want to remove the following files:
/source/changes/21.changed
/source/changes/20.fixed
/source/changes/6.housekeeping
/source/changes/1.changed
/source/changes/9.housekeeping
/source/changes/7.housekeeping
/source/changes/16.housekeeping
/source/changes/10.housekeeping
/source/changes/8.housekeeping
/source/changes/14.housekeeping
Is it okay if I remove those files? [Y/n]:

It looks like there's a "fatal" message from git about mismatched ownership of the repository bind mount. I'm not sure what is skipped there in terms of operations, but we should fix this in the compose file.

Steps to Reproduce

  1. Clone nautobot-app-dev-example and checkout develop at commit 2f10015
  2. Run invoke generate-release-notes --version 1.0.0
glennmatthews commented 2 months ago

Running towncrier locally (i.e. in the poetry shell rather than inside the docker container) is the workaround we use in core.

cmsirbu commented 2 months ago

Tested and validated change in https://github.com/nautobot/nautobot-app-dev-example/pull/28

gsnider2195 commented 1 month ago

Just need to merge into the cookie cutter