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

feat(core): do not update template if dockerfile is modified #3396

Merged
merged 4 commits into from Apr 26, 2023

Conversation

m-alisafaee
Copy link
Contributor

@m-alisafaee m-alisafaee commented Apr 13, 2023

Description

A Renku-specific section can be added to a Dockerfile. Any lines of the Dockerfile that are between begin and end end markers must not be modified by users. This section is used to calculate Dockerfile checksum (empty lines and whitespaces at the end of lines are ignored). If it's missing then we use the whole Dockerfile.

When updating a template, Renku only update this section if it exists in both project and template Dockerfile; otherwise, the whole Dockerfile is overridden.

########################################################
#        Renku-specific section - DO NOT MODIFY        #
########################################################


########################################################
#              End Renku-specific section              #
########################################################

Fixes #3354

@coveralls
Copy link
Collaborator

coveralls commented Apr 13, 2023

Pull Request Test Coverage Report for Build 4813552425

  • 69 of 74 (93.24%) changed or added relevant lines in 7 files are covered.
  • 6 unchanged lines in 6 files lost coverage.
  • Overall coverage increased (+0.03%) to 85.331%

Changes Missing Coverage Covered Lines Changed/Added Lines %
renku/core/template/template.py 9 10 90.0%
renku/core/migration/migrate.py 10 12 83.33%
renku/domain_model/template.py 37 39 94.87%
Files with Coverage Reduction New Missed Lines %
renku/command/migrate.py 1 94.51%
renku/core/template/template.py 1 86.44%
renku/core/template/usecase.py 1 89.71%
renku/core/workflow/activity.py 1 93.61%
renku/ui/cli/init.py 1 96.9%
renku/ui/cli/service.py 1 68.59%
Totals Coverage Status
Change from base Build 4810277066: 0.03%
Covered Lines: 25543
Relevant Lines: 29934

💛 - Coveralls

@m-alisafaee m-alisafaee force-pushed the 3354-update-modified-dockerfile branch from 0ccd804 to f8923c6 Compare April 14, 2023 01:22
@m-alisafaee m-alisafaee force-pushed the 3354-update-modified-dockerfile branch from f8923c6 to 1c67720 Compare April 14, 2023 06:52
@m-alisafaee m-alisafaee marked this pull request as ready for review April 14, 2023 12:38
@m-alisafaee m-alisafaee requested a review from a team as a code owner April 14, 2023 12:38
Copy link
Member

@olevski olevski left a comment

Choose a reason for hiding this comment

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

A few suggestions and questions.

Do we need more extensive documentation changes to explain the formating and content of the Dockerfile sections and logic?

renku/command/view_model/template.py Outdated Show resolved Hide resolved
renku/command/migrate.py Outdated Show resolved Hide resolved
renku/domain_model/template.py Show resolved Hide resolved
renku/domain_model/template.py Show resolved Hide resolved
renku/domain_model/template.py Show resolved Hide resolved
Copy link
Member

@olevski olevski left a comment

Choose a reason for hiding this comment

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

Thanks Mohammad.

@m-alisafaee m-alisafaee enabled auto-merge (squash) April 26, 2023 21:29
@m-alisafaee m-alisafaee merged commit 00a1963 into develop Apr 26, 2023
28 checks passed
@m-alisafaee m-alisafaee deleted the 3354-update-modified-dockerfile branch April 26, 2023 22:01
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.

Template update with user-modified Dockerfile
3 participants