func icon indicating copy to clipboard operation
func copied to clipboard

FUNC_HOME environment variable

Open lkingland opened this issue 3 years ago • 13 comments

For several reasons, we need an environment variable specifically for func home named FUNC_HOME, which will take the place of all calls to the function ConfigPath(). It should exist only in the CLI, in order to provide a new optional constructor arguemt to the client, 'fn.WithHome(path string)`. This value would be used internally to calculate such things as path to repositories, etc. To accomplish this, we'll need to:

  • Refactor Client to accept "config home" path as an optional functional option fn.WithHome, which will be used to calculate values such as repositoriesPath, which now relies directly on fn.ConfigPath(). (Default of blank would indicate current working directory when not provided.).
  • Move calcuation of ConfigPath (func ConfigPath) to the CLI and use it to provide a config path which first looks for FUNC_HOME, and if not provided, continues on to calculate the path using the current method (using XDG_CONFIG_HOME).
  • Use this updated ConfigPath calculation to provide the home path in a fn.WithHome(ConfigPath()) call in the shared client constructor in client.go such that all commands get it by default.
  • Add/modify tests as appropriate

Related: #1321

lkingland avatar Oct 12 '22 05:10 lkingland

/kind enhancement

lance avatar Oct 13 '22 21:10 lance

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Jan 12 '23 01:01 github-actions[bot]

/remove-lifecycle stale

zroubalik avatar Jan 12 '23 11:01 zroubalik

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Apr 13 '23 01:04 github-actions[bot]

/remove-lifecycle stale

lance avatar Apr 13 '23 21:04 lance

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Jul 13 '23 01:07 github-actions[bot]

/reopen

lance avatar Aug 13 '23 15:08 lance

@lance: Reopened this issue.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

knative-prow[bot] avatar Aug 13 '23 15:08 knative-prow[bot]

Hello @lance, me and my team (@yhz3, @ClaireLapatrada, @Victor-Weng, @Phacometer, @ShbnmTjk) were interested in working on this issue as our first contribution to knative func. Would it be possible to get this issue assigned to us?

michelleyucollins avatar Jan 04 '24 17:01 michelleyucollins

@michelleyucollins that's great! I, however, am no longer working on this project. My colleague @lkingland is leading the effort now and should be able to work with you to make that happen. Thanks.

lance avatar Jan 09 '24 20:01 lance

Hello,

We would appreciate the contribution.

Please @-mention me in the issue with any questions, or join us in the Slack room.

/assign @michelleyucollins

lkingland avatar Jan 10 '24 03:01 lkingland

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Apr 10 '24 01:04 github-actions[bot]

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Aug 29 '24 01:08 github-actions[bot]