Repository navigation
Replace md5 with sha256 algorithm - #9021
Conversation
Signed-off-by: IvanChalukov <[email protected]>
There was a problem hiding this comment.
I have tested something really similar, due to my closed issue #9007. I tried with FIPS and non FIPS compliant databases, both worked like a charm locally and on my bosh environment. When having multiple webs in rolling update, I can see some temporary trouble, due to the first web migrating the data and the second still working with md5 columns, but that is expected with such migrations. The other way would be to not rename the columns at all, since they are used for UID from what I can gather. But that wouldn’t be okay imho. Looks good to me, good job!
|
The validations are currently failing due to check comment. Once the issue is fixed in upstream, or the module is reverted, we will recheck. |
|
@taylorsilva since the PR resource uses the broken base at the moment still and I don't have permissions to recreate the version, what is the procedure, so we can trigger the PR validations with the correct base? Thanks! Edit: |
|
@Kump3r it's fixed now, so you should be unblocked |
|
Yes, just the failing PR's with this error need to clear the cache of the resource, since otherwise it will not fetch the new base. Btw I am not sure if bug is the correct label for such a PR, feel free to adjust as necessary 😅 |
|
Haven't had a chance to review this. Happy to see all the test passed though! I think this should go into a minor release version since it's a big change. Will definitely take this in once I have time to review it. |
|
Just making a note: one concern I have is how long will the migration take on a large Concourse database? I'm reminded of #8499 which takes 30mins on a large database. I sadly don't have access to a large database. I plan to create one and do some manual acceptance testing. |
|
From my side I haven’t tested with a heavily loaded database, but if I manage to allocate some time, I can try it out and let you know as well. Thanks for the remark, it is a valid concern. |
|
I unfortunately haven't had the opportunity to test with a heavily loaded database either, but I'll make sure to give it a try as soon as I have the chance. Thanks for pointing that out! |
|
Would be a big help if either of you can do that! |
|
I will test it just to be sure when I allocate some free time, but in the meantime it is worth mentioning that the migration you provided, migrates data to |
|
Together with @Kump3r manage to setup database and loaded up with 76Gb out of 100Gb (at 76%). The data was spread across 12 teams and ~600 pipelines(each team contains 50 pipelines). Each pipeline consists of a single job that constantly emits large data (output of dmesg - 290 times). SELECT COUNT(version_md5) AS row_count FROM <table_name>;Results:
Migration was executed for the same duration as an empty Concourse database. No load spikes, only expected downtime mentioned earlier. Based on @taylorsilva recommendations, we're setting up a new instance that will have more than a million entries in builds table. We will provide feedback as soon as migration is completed. |
|
Based on the previous comment and @taylorsilva's recommendations, we tested the migration together with @IvanChalukov. The parameters of the test were as follows:
Result:The migration took the same duration as an empty Concourse database, which is around Conclusion:Since this specific migration, does not migrate the data from the columns and only changes the names of the specific columns + indexes, the time for a migration, according to my understanding, Feel free reach out with additional scenarios or acceptance testing that needs to be done in order to complete the review process for this enhancement. |
|
Thanks for the testing guys! I'm going to do some smaller local tests today and then I'll merge this later today or tomorrow. |
taylorsilva
left a comment
There was a problem hiding this comment.
LGTM - Thanks for the PR guys! Looking forward to more PR's like this :)
|
Yesterday, we created our own un-official internal release (v7.13.0-pix4d) from master branch (755216b) and deployed it to production. Immediately after deployment, we noticed a spike of builds, and all builds were triggered because ALL resources found new versions even though the version didn't actually change... e.g the last two versions for the git resource was reporting the same commit or the last two versions of timer resource reported exactly the same time version. See the screenshot: The only difference is that Maybe, I am wrong, but it looks to me this occurs due to the changes in this PR. Was this behavior expected? Is there a way to avoid it? If yes, I wanted to give you folks a heads-up that this can occur. Sorry for writing here, instead of opening a new issue, but I wasn't sure if opening a bug report issue is the correct way forward for the unreleased Concourse version. |
|
Thanks for reporting this @aliculPix4D This is not ideal. I don't want an upgrade to trigger a bunch of jobs. That's VERY disruptive, especially for larger instances. I'm going to consider this a blocker for releasing. Let me try and reproduce this on a local scale first. Started up Concourse using 7.12.1 using docker compose. resources:
- name: some-resource
type: time
jobs:
- name: some-passing-job
plan:
- get: some-resource
trigger: trueWhich will default to creating one version per calendar day. It does and triggers the job. Next I'll upgrade to the latest on Hmmm what can we do here? Different approach might be to do some checks to see if a resource version already exists with a sha256? Might need to do that in a couple places in the Could we update this to check for md5 or sha256? I have a feeling that would break FIPS compliance though, the whole motivation for this PR: concourse/atc/db/resource_config_scope.go Lines 138 to 165 in e5f2552 Or maybe just avoid saving the new version at all: concourse/atc/db/resource_config_scope.go Lines 261 to 290 in e5f2552 I think the tricky part here is not using Postgres's @IvanChalukov Would you have time to investigate this and maybe PR a solution? |
|
Made an issue for further discussion and work reference: #9122 |
This reverts commit a196d52, reversing changes made to 45bcaf4. Signed-off-by: Taylor Silva <[email protected]>
Revert "Merge pull request #9021 from IvanChalukov/master" - skip-migrations-check


Changes proposed by this PR
closes #9020
Switching
md5algorithm tosha256across the code base and add migration for database naming convention.Notes to reviewer
Tested on FIPS compliant database and on already existing database.
Release Note
md5algorithm tosha256across the code basemd5tosha256suffix