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

ftl-project.toml loaded even if a different project file is specified #1352

Closed
wesbillman opened this issue Apr 29, 2024 · 0 comments · Fixed by #1534
Closed

ftl-project.toml loaded even if a different project file is specified #1352

wesbillman opened this issue Apr 29, 2024 · 0 comments · Fixed by #1534
Assignees
Labels
good first issue Good for newcomers

Comments

@wesbillman
Copy link
Member

wesbillman commented Apr 29, 2024

If we have 2 ftl-project.toml files (notice op:// used in first file). And we specify with ftl dev ... that we want to use ftl-project-inline.toml it seems like the code is still loading the base ftl-project.toml file even though we didn't specify it. This leads to issues where 1Password needs to be configured even though we're online using inline secrets.

ftl dev examples/go --recreate --config=ftl-project.toml,ftl-project-inline.toml

info: Starting FTL with 1 controller(s)
info:controller0: Web console available at: http://localhost:8892
info: ftl-project-inline.toml startup command ⚡️
info:time: Building module
info:echo: Building module
info:time: Deploying module
info:echo: Deploying module
error:echo: main: error: could not get config: internal: could not marshal module context: failed to get config map: no provider for scheme "op"
warn:echo: Plugin failed to start, terminating pid 69894
# ftl-project.toml
module-dirs = ["examples/go"]
external-dirs = []

[global]

[modules]
[modules.echo]
[modules.echo.configuration]
default = "op://ImFub255bW91cyI"

[commands]
startup = ["echo 'ftl-project.toml startup command ⚡️'"]
# ftl-project-inline.toml
module-dirs = ["examples/go"]
external-dirs = []

[global]

[modules]
[modules.echo]
[modules.echo.configuration]
default = "inline://ImFub255bW91cyI"

[commands]
startup = ["echo 'ftl-project-inline.toml startup command ⚡️'"]
@wesbillman wesbillman added the good first issue Good for newcomers label Apr 29, 2024
@github-actions github-actions bot added the triage Issue needs triaging label Apr 29, 2024
@bradleydwyer bradleydwyer removed the triage Issue needs triaging label Apr 29, 2024
@safeer safeer self-assigned this May 15, 2024
safeer added a commit that referenced this issue May 20, 2024
…1534)

Fixes #1352

With this change, the behavior is:
- `ftl dev examples/go`
  - uses `ftl-project.toml` in the gitroot if it exists
- `FTL_CONFIG=ftl-project-inline-a.toml ftl dev examples/go`
  - uses `ftl-project-inline-a.toml`
- `ftl dev examples/go --config=ftl-project-inline-b.toml`
  - uses `ftl-project-inline-b.toml`
- `FTL_CONFIG=ftl-project-inline-a.toml ftl dev examples/go --recreate
--config=ftl-project-inline-b.toml`
  - uses `ftl-project-inline-b.toml`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants