Forge has started leaving unexpected folders in our local git clone

Hi @HeyJoe ,

With reference to this post about Forge Container Services preview, we are not currently evaluating this ourselves, but we did recently upgrade our app to use the latest @forge/* npm packages and we noticed since doing so that some new untracked directories appeared in our local git clone:

  • .container-service-assets (contains a local-account file with some sort of unique key)
  • .forge/tunnel-output

These have never appeared before, and before we go ahead and blindly add them to our app’s .gitignore to ensure they don’t get accidentally committed, I wanted to understand if:

  1. These were expected (particularly if not using Forge Container Services)?, and
  2. That they are indeed things that should be kept out of our app’s git repository?

Thanks,

Scott

Hey @scottohara

Thanks for flagging this! I’m following up with our team on whether or not this behaviour is expected.

I’ve confirmed that both the contents of .services/ and .container-service-assets/ are related to the launch of Forge container services.

.forge/tunnel-output/ is related to our manual packaging EAP changes.

The files are ephemeral and can be/should be ignored from source control.

Going forward:

  • The container-related files should not be generated if the app does not utilise containers; this is a bug we will fix.
  • We’ll also update the CLI to generate these files under the .forge/ directory, to avoid polluting the top-level directory with multiple temporary directories.

Just closing the loop on this:

  • We’ve rolled out a change on the Forge backend that fixes the over-eager generation of the .container-service-assets directory for apps that don’t use container services.
  • An upcoming change in the next Forge CLI release (should be next week) will move .container-service-assets and .services from the project root to the .forge directory.
  • The existence and purpose of these directories will be explained in the Forge documentation. (Docs PR will be published once the CLI changes are released)

The Forge CLI version released today will now always generate all tunnel-related output in .forge/ only.

And the existence of the forge directory is now documented: https://developer.atlassian.com/platform/forge/cli-reference/#local--forge-directory