flagsmith icon indicating copy to clipboard operation
flagsmith copied to clipboard

Local development QoL for private repositories

Open matthewelwell opened this issue 1 year ago • 3 comments

Current problems

  • Cross module dependencies are painful to work with, e.g. flagsmith-workflow -> flagsmith-common and flagsmith -> flagsmith-common causes conflicts when trying to develop on the flagsmith-workflows repository
  • Running integration tests is painful from private repositories

TODO

  • Create our own private package repository and deploy all flagsmith modules there so that we can use semver properly (so we can implement version ranges)
  • Write publishing workflows for each of the packages, including for pull requests

Suggested improvements

  • Move all integration tests out of private modules, into core repository (or a separate repository if we have concerns about the privacy of this code)

matthewelwell avatar Oct 23 '24 13:10 matthewelwell

We originally created a CodeArtifact repository (currently in eu-west-2) to host public packages (e.g. flagsmith-common), however, it appears that it is not possible to make CodeArtifact repositories open to the public without additional infrastructure. As such, we plan to only use CodeArtifact for private modules (e.g. flagsmith-workflows, flagsmith-saml, etc) and we will just publish the public modules directly to pypi.

We have started a PR against the workflows repository here.

Next steps:

  • Create an IAM user (role?) specifically for publishing CodeArtifact

matthewelwell avatar Oct 28 '24 18:10 matthewelwell

As mentioned above, and discussed in a recent engineering meeting, it seems as though hosting the public packages in pypi (e.g. flagsmith-common) is still the best way forwards.

matthewelwell avatar Nov 20 '24 13:11 matthewelwell

Since we migrated all task processor into flagsmith-common and published to pypi, this is less of an issue since there are no longer any dependency tree conflicts that we were seeing previously. We still have 2 items that we want to complete as part of this work, but they are less urgent:

  1. Migrate all private flagsmith code into a single repository
  2. Publish flagsmith-private to AWS codeartifact

matthewelwell avatar Apr 23 '25 12:04 matthewelwell