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

Add a fallback to inline environment when path doesn't exist #637

Merged
merged 2 commits into from
Jun 1, 2022

Conversation

josephglanville
Copy link
Contributor

This is a feature proposal PoC for #636

It allows a user to reference an inline environment by name if it's present in the current working directory.
i.e instead of:

tk status --name stage/service main.jsonnet

Can simply write:

tk status stage/service

Because this patch replaces the path with the current working directory the standard enumeration logic will be used to discover the environment.

@stale
Copy link

stale bot commented Jan 8, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 8, 2022
@josephglanville
Copy link
Contributor Author

Bump to drop stale.

@stale stale bot removed the stale label Jan 17, 2022
@julienduchesne
Copy link
Member

👍 I have no objection for this feature. I'd like to see some testing around it though. There's already a few tests in load_test.go that you can inspire yourself from

@stale
Copy link

stale bot commented Mar 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 2, 2022
@josephglanville
Copy link
Contributor Author

Bump to drop stale. I will look at adding some tests.

@stale stale bot removed the stale label Mar 2, 2022
@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 16, 2022
@josephglanville
Copy link
Contributor Author

Bump to drop stale, haven't had chance to add tests to this yet.

@stale stale bot removed the stale label Apr 17, 2022
Copy link
Member

@julienduchesne julienduchesne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added tests and a better error message in case multiple envs are found. Since I added code, I'll ask for another approval from my team

@julienduchesne julienduchesne requested review from a team, Duologic and sh0rez June 1, 2022 13:24
Copy link
Member

@the-it the-it left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@julienduchesne
Copy link
Member

Thanks for your contribution @josephglanville!

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

Successfully merging this pull request may close these issues.

3 participants