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

[Resolve #546] select command stacks based on exact stack-group name #731

Merged
merged 2 commits into from
Apr 18, 2020

Conversation

cornerman
Copy link
Contributor

When specifying a command_path for cli operations, commands will be executed on all stack-groups which share a prefix with command_path. So, if you have two configs env1 and env2, but then provide env as your command_path, both env1 and env2 will be executed.

In my opinion, env is not a valid stack-group and should therefore not start anything. We should either specify env1 or env2 expicitly or alternatively group them under one common directory my-envs when you want to launch stack together.

PR Checklist

  • Wrote a good commit message & description [see guide below].
  • Commit message starts with [Resolve #issue-number].
  • Added/Updated unit tests.
  • Added/Updated integration tests (if applicable).
  • All unit tests (make test) are passing.
  • Used the same coding conventions as the rest of the project.
  • The new code passes flake8 (make lint) checks.
  • The PR relates to only one subject with a clear title.
    and description in grammatically correct, complete sentences.

Approver/Reviewer Checklist

  • Before merge squash related commits.

Other Information

Guide to writing a good commit

@ngfgrant ngfgrant changed the base branch from master to 2.1.4 June 10, 2019 12:16
@ngfgrant
Copy link
Contributor

@cornerman thanks for the PR. LGTM but I'd like someone with windows to test this if they could basically I am intrigued as to whether the use of sep will cause issues in Windows. I don't think it will but worth double checking. Maybe @lukeplausin or @mike-rsi if you get sometime to checkout this branch?

@cornerman
Copy link
Contributor Author

cornerman commented Jun 12, 2019

We might want to add a check for yaml files. If you have a config file config/folder/resource.yaml, you should be able to select this stack with either sceptre status folder/resource.yaml or sceptre status folder/resource. With this PR, currently only the first one would work.

Edit: But it could again be ambiguous, if you have a folder folder/resource. So maybe we just better leave the PR as is.

@ngfgrant ngfgrant force-pushed the 2.1.4 branch 5 times, most recently from abd332d to 86f1bfe Compare June 13, 2019 13:34
@ngfgrant ngfgrant changed the base branch from 2.1.4 to master June 27, 2019 11:12
@ngfgrant ngfgrant changed the base branch from master to 2.1.6 June 28, 2019 13:49
@ngfgrant ngfgrant changed the base branch from 2.1.6 to master August 16, 2019 10:18
@craighurley
Copy link
Contributor

Would love to see this make it into the next release. This issue has tripped up colleagues on my team, luckily in non-prod environments 😄.

@ngfgrant
Copy link
Contributor

Guys its my bad for letting this stay open as long as it has. Definitely need to get this merged and I am happy with this PR as it is. As per my original comment there may be some windows issues with sep but I am pretty sure there won't be.

@cornerman if you have time could you rebase this off master and resolve the conflict in test_config_reader.py? If not let me know and I'll help out.

@rseuchter
Copy link

@cornerman if you have time could you rebase this off master and resolve the conflict in test_config_reader.py? If not let me know and I'll help out.

I took the liberty of rebasing this. Please check rseuchter@f5a5181
(I have no idea if or how I can add this to the existing PR #731)

An hour or two ago, I ran into this bug with a colleague. While we found a workaround it caused some serious concern. After realizing this has been lying around for so long I thought I rather help get this resolved.

@cornerman cornerman force-pushed the exact-stack-group-name branch from f3f18eb to f5a5181 Compare March 20, 2020 16:29
@cornerman
Copy link
Contributor Author

@rseuchter Thank you! That is great. I just reset my branch to your commit and pushed!

@ngfgrant This PR is now rebased

@rseuchter
Copy link

This PR has been stale. Still, I feel the underlying issue is critical.
The build says it was unauthorized. I don't think it's related to the PR itself.

Any ideas @ngfgrant?

@ngfgrant
Copy link
Contributor

I’m going to get to this and others this weekend. Unauthorised makes sense (to me).

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.

4 participants