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

Move destroy to run command #11691

Merged
merged 1 commit into from
May 16, 2024
Merged

Move destroy to run command #11691

merged 1 commit into from
May 16, 2024

Conversation

gmrabian
Copy link
Contributor

@gmrabian gmrabian commented May 15, 2024

Description

All of our applications have been leaking infrastructure due to the reliability of the destroy mechanism. In the past it's been a rather manual process to clean up latent and orphaned infrastructure in order to keep account costs under control. Luckily, our ephemeral environments and very light weight and cheap to operate, but manually cleaning up orphaned infrastructure doesn't scale.

The purpose of this PR is retrofit an existing solution into MCR. We have already seen this working in QMR.

Notable changes:

  • The dev script (executed by ./dev), has been renamed to run (executed by ./run)
    • The previous commands are unaffected so ./run local is equivalent to prior functionality
  • The destroy.sh script has been removed
  • Issuing destroy locally is accommodated by executing ./run destroy --stage [stage]

Related ticket(s)

CMDCT-3640


How to test

Evidence of this successfully executing can be seen here
(It failed on the first try but then passed on re-run, so something to watch out for. I think QMR, SEDS, and CARTS all passed on the first time. I ran it again against a different branch just to see and it passed the first time.)


Pre-review checklist

  • [ ] I have added thorough tests, if necessary
  • I have updated relevant documentation, if necessary
  • I have performed a self-review of my code
  • I have manually tested this PR in the deployed cloud environment

Copy link

codeclimate bot commented May 15, 2024

Code Climate has analyzed commit 5b79908 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (90% is the threshold).

This pull request will bring the total coverage in the repository to 95.9% (0.0% change).

View more on Code Climate.

@gmrabian gmrabian marked this pull request as ready for review May 15, 2024 19:57
@gmrabian gmrabian added the ready for review Ready for all the reviews! label May 15, 2024
Copy link
Contributor

@berryd berryd left a comment

Choose a reason for hiding this comment

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

Yay, git mv....looks good to me...should we update the version of the destroyer elsewhere since I used an older version?

@gmrabian
Copy link
Contributor Author

Yay, git mv....looks good to me...should we update the version of the destroyer elsewhere since I used an older version?

I checked the other apps and they pulled in 2.1.1 because of the ^ anyway so I think we are fine!
https://github.com/Enterprise-CMCS/macpro-mdct-qmr/blob/master/yarn.lock#L3826-L3827

@gmrabian gmrabian merged commit c5bfe9d into main May 16, 2024
25 checks passed
@gmrabian gmrabian deleted the improve-destroy branch May 16, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review Ready for all the reviews!
Projects
None yet
2 participants