-
Notifications
You must be signed in to change notification settings - Fork 77
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
Look on how to retain older images in case latest is broken #67
Comments
The images have been overridden again and caused an outage of one of our services due to changed behaviour (not yet diagnosed). This makes the images unusable for any productive scenario. |
Hi @arnegroskurth ! Sorry to hear that. We can try maybe adding a timestamp to the images, like |
I think the root of the problem here is that you are trying to re-use the the version from something else (maybe ModSecurity itself?) to also version the container images. I think they have to be versioned separately as there is a whole lot of configuration-files, image definitions and versions of other involved software (apache, nginx, etc.) that has an influence on the API of the images. Having an independent version solves these problems and I guess is also what people generally expect. |
We had the same problem on our side - We got cached by the fact, that the underlying Nginx Docker image also changed and the new template paths came in. |
Thanks all for the comments again. I will try to do some tests with my personal repos and see if this can be achieved easily. The solution I'll try is to add a timestamp like |
I think even though that would already been an improvement from the current situation, it is not really ideal as the update process is much less straight forward with that solution. Semantic versioning is all about categorizing and communicating changes to your software component which is completely gone when you effectively version the component by date. With just a meaningless date as versioning information, I, as a user of the component, have to go through all changes when updating the component to be able to decide whether I also have to change my system due to a breaking change or can rely on the component still function like before. And for what? So may I ask what your reasoning for that is? |
Sorry, the reasoning for the tag, or for updating in general? |
For preferring date-strings added to versions from another component (the CRS, I presume), rather then semantically versioning this component independently. |
Sure! |
Semantic versioning is why we would try 🤷 |
In any case, we receive PRs if anyone here wants to help. |
A PR is a bit hard while it is not clear in which direction you wanna go. To reach something like this you could replace the static version in the Github Action with a "dev" flag for example. modsecurity-crs-docker/.github/workflows/buildimage.yml Lines 16 to 17 in 79b4c70
Then you can create a new Github Action with more or less the similar content but changed triggers. on:
release:
types: [published] https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release Then in the action itself you could checkout the source from the created Git tag steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.release.tag_name }} And then you can build the docker images with the given Then every time you want to release a new version you can create a new Github Release in which you can describe which CRS/Modsecurity release was used and then the pipeline would automatically run the release container build/push procedure. To improve the transparency more, may also consider to not use the
In that way you will have a commit in which you change the the Modsecurity version to an newer tag. But maybe that is something you may want to simplify the update procedure - here I don't understand your workflow or why it is on latest per default. @arnegroskurth @fzipi wdyt? 🙃 |
Ok, let me think about this for a bit, and will circle back. Using just |
I still need to process this, and we will get a solution. In the meantime, looks like this workaround might be useful. |
Didn't forgot about this, we are kind of overwhelmed with the bugbounty program on CRS these couple of weeks. |
Ok, started with something. This is the PR I have for the base docker: coreruleset/modsecurity-docker#140. If you have any comments, please add them there! the idea is to replicate it here in a similar way. |
So, the corresponding fix in this repo is linked now: #88. Now we are building on top of a specific version from the base repo. So each build will be unique and long term, if you use the proper tag. Let me know what you think @matthiasbaldi @arnegroskurth. |
Nice. Thank you. |
Changes are live now. Can you test them and see if they work for your use case? |
From #62 , we should investigate if we can have old images laying around in hub.
The text was updated successfully, but these errors were encountered: