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

Actions to support an alternative deployment strategy #46

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

mhaamann
Copy link
Contributor

@mhaamann mhaamann commented Sep 30, 2023

Hi @ayeressian

I have made some more actions. I fully understand if you think this is outside scope of you project. I'm hoping that you believe it does ;)

The code is still rough and I'm looking for your input. I thought it was better to share early to get feedback from you.
All the code is tested and working

Quick summary of the change

The new actions are made to address the alternative deployment strategy as discussed in the issue: #25

Added 4 new actions

  • Create storage zone
  • Purge a pull zone
  • Remove old storage zones
  • Update pull zone with a different storage zone

README

Updated the README to reflect the new actions. Switched to a table structure for inputs and outputs.

TODO

  • Consider whether the action "Update pull zone with a different storage zone" should be made more generic to "Pull Zone Update". This allows for easier modification in the future.
  • Update the action "Storage Remove" to allow for deleting a specific storage zone by given name.
  • Restructure new files to make unit tests possible.
  • Add unit tests of the new functions.

@mhaamann mhaamann changed the title Create storage zone Actions to support an alternative deployment strategy Sep 30, 2023
@ayeressian
Copy link
Owner

Hi @mhaamann, I'm having a hard time reading the readme there most be some problem with git commits.

@mhaamann
Copy link
Contributor Author

mhaamann commented Oct 7, 2023

Hi @ayeressian I have added a table of contents in the beginning of the document.
Also I believe the readme file is best viewed using this link:
https://github.com/ayeressian/bunnycdn-storage-deploy/blob/3e3a4a3087a211bb8e7837b9a269456d1e1b2ea1/README.md

@ayeressian
Copy link
Owner

I think having separate actions for different operations is a good idea.
I think it would be nice to support basic use case for Storage Remove. For example to just delete storage by given name. Does Storage Remove support minor version? For example let's say there are 1.0.0, 1.1.0, 1.1.1 and 1.2.0 versions, and suppose we want 3 old versions to be removed. Will it remove the 1.0.0, 1.1.0 and 1.1.1?

@mhaamann
Copy link
Contributor Author

mhaamann commented Oct 8, 2023

I think it would be nice to support basic use case for Storage Remove. For example to just delete storage by given name.

I will add a tasks to the PR description for allowing to remove storage zone by given name.

Does Storage Remove support minor version? For example let's say there are 1.0.0, 1.1.0, 1.1.1 and 1.2.0 versions, and suppose we want 3 old versions to be removed. Will it remove the 1.0.0, 1.1.0 and 1.1.1?

Sadly no, there is no smart logic concerning SemVer. I guess the example I provided was bad. Changing it to the following might clarify a bit. What do you think?:

Example: This action cen be used to remove old storage zones. Having created 4 storage zones named: frontend-v1, frontend-v2, frontend-v3, frontend-v4 we can use the action to remove the oldest storage zones by specifying parameters startsWith=frontend-v and keepLast=2. This will result in all storage zones being deleted that starts with "frontend-v" keeping the 2 newest. The action uses the storage zone creation date to decide which zone is the oldest.

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.

2 participants