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

Bug - First run issue - Scan def updater isn't run #75

Closed
mdial89f opened this issue Oct 13, 2020 · 1 comment · Fixed by #76
Closed

Bug - First run issue - Scan def updater isn't run #75

mdial89f opened this issue Oct 13, 2020 · 1 comment · Fixed by #76
Assignees
Labels
bug Something isn't working

Comments

@mdial89f
Copy link
Contributor

The scan definition updater is run on a schedule.
On deployments of new environments, there is a time where the environment is up and usable, but the scan definition uploader hasn't run yet.
This breaks the app; all scans fail saying 'key doesn't exist'... that's the definitions key.

Although it's a second or two time hit, simply invoking the definition uploader lambda on deploy should fix this. The pattern that's been used is serverless-plugin-scripts hook calling serverless invoke -f at deploy:finalize. Although this specific code was removed later on, you can see the pattern for this here: https://github.com/CMSgov/macpro-quickstart-serverless/pull/36/files

AC:

  • The definition uploader function is guaranteed to have run before new environments are up and expected to be healthy.
@mdial89f mdial89f added the bug Something isn't working label Oct 13, 2020
@mdial89f
Copy link
Contributor Author

mdial89f commented Oct 13, 2020

@mdial89f mdial89f self-assigned this Oct 13, 2020
@mdial89f mdial89f moved this from To do to In progress in macpro-quickstart-serverless Oct 13, 2020
macpro-quickstart-serverless automation moved this from In progress to Done Oct 13, 2020
mdial89f added a commit that referenced this issue Oct 13, 2020
* Run the scan definitions uploader on deploy... should fix #75

* Invoke the Def updater lambda asynchronously.  It takes about 45 seconds and we don't need to wait for it

Co-authored-by: Mike Dial <mdial@collabralink.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

1 participant