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

Please respect TT_CLI_CFG environment variable as a path to tt.yaml #813

Closed
ochaton opened this issue Apr 3, 2024 · 1 comment · Fixed by #833
Closed

Please respect TT_CLI_CFG environment variable as a path to tt.yaml #813

ochaton opened this issue Apr 3, 2024 · 1 comment · Fixed by #833
Assignees

Comments

@ochaton
Copy link
Member

ochaton commented Apr 3, 2024

Subject

I use the single tt binary in various $PWD directories, and sometimes the autodiscovery of tt.yaml works as expected, but other times it does not. Having to specify --cfg each time is not always convenient.

Could you please add a feature to retrieve the value from the TT_CLI_CFG environment variable as a path to tt.yaml and use it before the autodiscovery mechanism of tt.yaml?

The path of tt.yaml specified with the --cfg option must take priority over the TT_CLI_CFG environment variable. Therefore, the precedence should be as follows:

  1. The --cfg option, if specified (must throw an error when the file is not readable).
  2. The TT_CLI_CFG environment variable (works the same as --cfg).
  3. The existing autodiscovery mechanism of tt.yaml.

tt cfg dump should indicate that the configuration was taken from the TT_CLI_CFG environment variable and print the resolved absolute path to tt.yaml.

@psergee
Copy link
Collaborator

psergee commented Apr 5, 2024

Since the configuration discovery process is somewhat complex, it would be helpful to have a log message (debug-level) detailing the location of the found configuration file.

@oleg-jukovec oleg-jukovec added urgent and removed urgent labels May 2, 2024
better0fdead added a commit that referenced this issue May 3, 2024
Added 'TT_CLI_CFG' environmental variable to specify the path to configuration file.

Closes #813
better0fdead added a commit that referenced this issue May 3, 2024
Added 'TT_CLI_CFG' environmental variable to specify the path to configuration file.

Closes #813
better0fdead added a commit that referenced this issue May 3, 2024
Added 'TT_CLI_CFG' environmental variable to specify the path to configuration file.

Closes #813
better0fdead added a commit that referenced this issue May 3, 2024
Added 'TT_CLI_CFG' environmental variable to specify the path to configuration file.

Closes #813
better0fdead added a commit that referenced this issue May 3, 2024
Added 'TT_CLI_CFG' environmental variable to specify the path to configuration file.

Closes #813
better0fdead added a commit that referenced this issue May 3, 2024
Added 'TT_CLI_CFG' environmental variable to specify the path to configuration file.

Closes #813
better0fdead added a commit that referenced this issue May 3, 2024
Added 'TT_CLI_CFG' environmental variable to specify the path to configuration file.

Closes #813
better0fdead added a commit that referenced this issue May 3, 2024
Added 'TT_CLI_CFG' environmental variable to specify the path to configuration file.

Closes #813
better0fdead added a commit that referenced this issue May 3, 2024
Added debug level message with the location of the found configuration file.

Follow up #813
better0fdead added a commit that referenced this issue May 3, 2024
Added 'TT_CLI_CFG' environmental variable to specify the path to configuration file.

Closes #813
better0fdead added a commit that referenced this issue May 3, 2024
Added debug level message with the location of the found configuration file.

Follow up #813
better0fdead added a commit that referenced this issue May 7, 2024
Added 'TT_CLI_CFG' environmental variable to specify the path to configuration file.

Closes #813
better0fdead added a commit that referenced this issue May 7, 2024
Added debug level message with the location of the found configuration file.

Follow up #813
better0fdead added a commit that referenced this issue May 7, 2024
Added 'TT_CLI_CFG' environmental variable to specify the path to configuration file.

Closes #813
better0fdead added a commit that referenced this issue May 7, 2024
Added debug level message with the location of the found configuration file.

Follow up #813
better0fdead added a commit that referenced this issue May 13, 2024
Added debug level message with the location of the found configuration file.

Follow up #813
psergee pushed a commit that referenced this issue May 13, 2024
Added 'TT_CLI_CFG' environmental variable to specify the path to configuration file.

Closes #813
psergee pushed a commit that referenced this issue May 13, 2024
Added debug level message with the location of the found configuration file.

Follow up #813
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants