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

Improve documentation for workspace ownership mismatches #3284

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

bpholt
Copy link
Contributor

@bpholt bpholt commented Feb 9, 2024

Git requires that a repository directory be owned by the user executing git. In the normal case, it will print a message

fatal: detected dubious ownership in repository …

which is easily searchable online, but unfortunately git config does not print such a nice message, and simply prints

fatal: not in a git directory

which is misleading and hard to diagnose.

This came up for us when running Scala Steward as a AWS Fargate task using AWS EFS as its persistent storage. We configured the task to mount the EFS volume using UID 1001, which is the default UID for sbt-native-packager Docker containers, but in fact, Scala Steward current runs as root (#3283). While looking into the issue, we noticed that the article titled Running scala-steward periodically on AWS Fargate no longer exists, so this PR also removes that link from the documentation. (Hopefully we'll be able to publish some details about how we're running Scala Steward using Fargate as a replacement!)

… git directory'

'git status' prints a more informative error message than other git
commands in certain failure scenarios, specifically including when the
workspace is not owned by the user executing 'git'. Hopefully printing
this extra error message will make it more obvious to operators what is
going on if they encounter this kind of failure.
Copy link

codecov bot commented Feb 9, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (1f8ea30) 91.19% compared to head (5bfb8b4) 91.12%.

Files Patch % Lines
...n/scala/org/scalasteward/core/git/FileGitAlg.scala 50.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3284      +/-   ##
==========================================
- Coverage   91.19%   91.12%   -0.08%     
==========================================
  Files         167      167              
  Lines        3408     3413       +5     
  Branches      304      283      -21     
==========================================
+ Hits         3108     3110       +2     
- Misses        300      303       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bpholt
Copy link
Contributor Author

bpholt commented Feb 9, 2024

Looks like Codecov is complaining about the fallback code not being tested. This isn't the kind of thing I would typically write a test for, so I'll probably hold off on doing so until I get some feedback about whether this change would be welcome or not. If it's welcome and just needs to be tested, I'll follow up!

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.

None yet

1 participant