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

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

Closed
cmsirbu opened this issue May 21, 2024 · 3 comments · Fixed by #144
Closed

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

cmsirbu opened this issue May 21, 2024 · 3 comments · Fixed by #144
Assignees

Comments

@cmsirbu
Copy link
Contributor

cmsirbu commented May 21, 2024

Environment

  • cookiecutter-nautobot-app template version: 2.2.1

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
Copy link
Contributor

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

@cmsirbu
Copy link
Contributor Author

cmsirbu commented Jul 4, 2024

Tested and validated change in nautobot/nautobot-app-dev-example#28

@cmsirbu cmsirbu self-assigned this Jul 9, 2024
@gsnider2195
Copy link
Contributor

Just need to merge into the cookie cutter

@cmsirbu cmsirbu changed the title Git compains about file ownership when running invoke generate-release-notes Git complains about file ownership when running invoke generate-release-notes Aug 13, 2024
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 a pull request may close this issue.

3 participants