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

fix(core): update template checksum when updating Dockerfile #3351

Merged
merged 5 commits into from Mar 9, 2023

Conversation

m-alisafaee
Copy link
Contributor

@m-alisafaee m-alisafaee commented Mar 7, 2023

Description

We check Dockerfile changes in each commit and if they are only Renku version updates, we mark the Dockerfile as not being modified by users. Before doing this, we first check its checksum and checksum at time that the template was set to see if they match with the stored checksum; if so, we skip the git history traversal.

This PR also refactors templates_source fixture to use actual business models instead of a dummy template source.

Fixes #3346

@coveralls
Copy link
Collaborator

coveralls commented Mar 7, 2023

Pull Request Test Coverage Report for Build 4376329881

  • 220 of 264 (83.33%) changed or added relevant lines in 27 files are covered.
  • 17 unchanged lines in 11 files lost coverage.
  • Overall coverage increased (+0.2%) to 86.686%

Changes Missing Coverage Covered Lines Changed/Added Lines %
renku/core/git.py 0 1 0.0%
renku/core/migration/m_0010__metadata_fixes.py 0 1 0.0%
renku/core/session/session.py 0 1 0.0%
renku/core/migration/migrate.py 15 17 88.24%
renku/command/schema/activity.py 11 14 78.57%
renku/command/schema/project.py 8 11 72.73%
renku/core/migration/models/v9.py 8 11 72.73%
renku/command/schema/composite_plan.py 12 16 75.0%
renku/command/schema/plan.py 11 15 73.33%
renku/core/template/usecase.py 33 37 89.19%
Files with Coverage Reduction New Missed Lines %
renku/core/dataset/dataset.py 1 90.95%
renku/core/migration/m_0003__1_jsonld.py 1 87.68%
renku/domain_model/project_context.py 1 96.37%
renku/domain_model/workflow/composite_plan.py 1 81.55%
renku/ui/service/controllers/datasets_add_file.py 1 95.24%
renku/ui/service/errors.py 1 82.18%
renku/ui/service/jobs/contexts.py 1 73.33%
renku/command/rollback.py 2 78.44%
renku/version.py 2 75.0%
renku/command/checks/activities.py 3 74.14%
Totals Coverage Status
Change from base Build 4362983352: 0.2%
Covered Lines: 25582
Relevant Lines: 29511

💛 - Coveralls

@m-alisafaee m-alisafaee marked this pull request as ready for review March 7, 2023 19:34
@m-alisafaee m-alisafaee requested a review from a team as a code owner March 7, 2023 19:34
Copy link
Member

@Panaetius Panaetius left a comment

Choose a reason for hiding this comment

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

Minor comments, but looks good to go

renku/core/template/usecase.py Outdated Show resolved Hide resolved
renku/core/template/usecase.py Outdated Show resolved Hide resolved
renku/infrastructure/repository.py Outdated Show resolved Hide resolved
Panaetius
Panaetius previously approved these changes Mar 8, 2023
Panaetius
Panaetius previously approved these changes Mar 8, 2023
@m-alisafaee m-alisafaee merged commit 24407e5 into develop Mar 9, 2023
29 of 30 checks passed
@m-alisafaee m-alisafaee deleted the 3346-dockerfile-update-fix branch March 9, 2023 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Make sure that template migration of dockerfile works correctly
3 participants