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

ASGScalingProcesses registered as 'asg_scheduled_actions', expected to be 'asg_scaling_processes' #841

Open
sustacek opened this issue Sep 25, 2019 · 5 comments

Comments

@sustacek
Copy link

I noticed that the default hook for ASG processes is registered as "asg_scheduled_actions =" and not as asg_scaling_processes, see

"asg_scheduled_actions ="

In the docs (2.2.1) and also the code (

'- !asg_scaling_processes <suspend|resume>::<process-name>'
.format(self.argument)
) it's referenced as asg_scaling_processes, but using !asg_scaling_processes in hooks results in:

yaml.constructor.ConstructorError: could not determine a constructor for the tag '!asg_scaling_processes'
  in "<unicode string>", line 40, column 7:
        - !asg_scaling_processes 'suspend: ...
          ^
@sustacek sustacek changed the title ASGScalingProcesses registered as 'asg_scheduled_actions', expected to be ''asg_scaling_processes ASGScalingProcesses registered as 'asg_scheduled_actions', expected to be 'asg_scaling_processes' Sep 25, 2019
@ngfgrant
Copy link
Contributor

Thanks this looks like a documentation error. Fix will be to update the docs

@reiSh6phoo9o
Copy link

This is still an issue, would be great to get the documentation fixed. Can I contribute somehow?

@jragland
Copy link

@ngfgrant I am running into this problem currently.

Sceptre version:

~/_/aws-infrastructure on   xx-xxxxx *1 !2 ❯ sceptre --version                                        at  07:49:35
Sceptre, version 3.1.0

I have found that if I remove the offending ! in my config file, I can get sceptre to build out a ChangeSet for me. However, when I go to run said ChangeSet, CloudFormation comes back and says it's received an invalid request and doesnt recognize the ARN of the resources im looking for.

Is this something that is resolved by later versions of sceptre?

@iainelder
Copy link
Contributor

These commits show the important hook history. The comment is my interpretation.

commit date commit hash comment
2017-01-31 70dfb57 Start with the asg_scheduled_actions hook
2017-03-30 d5008a4 Add the asg_scaling_processes hook
2017-05-15 3ecf9cc Document both hooks (Today's docs haven't changed)
2017-10-11 e52908b Deprecate asg_scheduled_actions in favor of asg_scaling_processes (#216)
2017-10-16 d300d20 Document deprecation as a feature of version 1.3.0
2017-11-29 c995826 Remove asg_scheduled_actions from docs and tests
2017-11-29 c814e6a Delete asg_scheduled_actions module and tests
2017-11-29 ec06452 Register hooks using entry points (#205) (More on this below)
2023-04-20 ac9e439 Move entry points from setup.py to pyproject.toml

The authors intended to replace asg_scheduled_actions with asg_scaling_processes.

But commit ec06452 introduced this bug by retaining the asg_scheduled_actions name for the entry point.

Sceptre would have avoided the confusion by naming the entry point asg_scaling_processes.

This major version of Sceptre needs to keep supporting the old name.

The next minor version can deprecate the old name and add the documented name as another entry point for the same hook.

The next major version can remove the old name.

@iainelder
Copy link
Contributor

@jragland , sorry, I didn't understand your point about removing the ! to generate a change set.

Try again with the latest Sceptre version and if you get an error different from the case originally described you can provide a repro in a new issue.

The OP's point is that the documented name (asg_scheduled_actions) doesn't match the real hook name (asg_scaling_processes).

That will be fixed in the next major version when #1374 gets merged.

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

No branches or pull requests

5 participants