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

Improved message when precondition onFail : MARK_RAN is set #2238

Merged
merged 2 commits into from
Sep 19, 2022

Conversation

MultiM25
Copy link
Contributor

@MultiM25 MultiM25 commented Nov 27, 2021

Pull Request Type

  • Bug fix (non-breaking change which fixes an issue.)
  • Enhancement/New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Changing the code :

log.info("Marking ChangeSet: " + toString() + " ran despite precondition failure due to onFail='MARK_RAN': " + message);

to

log.info("Marking ChangeSet \"" + toString() + "\" as ran despite precondition failure due to onFail='MARK_RAN': " + message);

Steps To Reproduce

Use this fragment:

databaseChangeLog:
  - changeSet:
      id: 1
      author: dev
      comment: Provoke misunderstandable message being logged
      preConditions:
        - onFail: MARK_RAN
        - onError: HALT
        - tableExists:
            - tableName: NONEXISTENT_TABLE

Actual Behavior

Log message reads like change set was executed ("ran") instead of just marked as "ran" on failure of precondition with on-failure setting MARK_RAN

Expected/Desired Behavior

Log message makes clear that change set was only marked as "ran" but not executed on failure of precondition because of on-failure setting MARK_RAN.

Fast Track PR Acceptance Checklist:

Need Help?

Come chat with us on our discord channel

@kataggart kataggart added this to To Do in Conditioning++ via automation Aug 3, 2022
@nvoxland nvoxland changed the title Solving missleading log message when precondition onFail : MARK_RAN i… Improved message when precondition onFail : MARK_RAN is set Aug 31, 2022
@nvoxland nvoxland self-requested a review as a code owner August 31, 2022 17:31
@nvoxland nvoxland added the SafeToBuild Indicates that a particular PR contains changes which are safe to build using GitHub actions label Aug 31, 2022
Copy link
Contributor

@nvoxland nvoxland left a comment

Choose a reason for hiding this comment

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

Code review and test results:

Things to be aware of:

  • Just updates the log message

Things to worry about:

  • Nothing

@github-actions
Copy link

Unit Test Results

  4 620 files    4 620 suites   39m 40s ⏱️
  4 619 tests   4 404 ✔️    215 💤 0
54 600 runs  49 580 ✔️ 5 020 💤 0

Results for commit 304f686.

Copy link
Contributor

@XDelphiGrl XDelphiGrl left a comment

Choose a reason for hiding this comment

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

Fix tweaks the message output by a MARK_RAN precondition to make it easier to understand that the change was only marked as run, and not actually run.

APPROVED

@nvoxland nvoxland merged commit 7cf3723 into liquibase:master Sep 19, 2022
@kataggart kataggart added this to the NEXT milestone Sep 20, 2022
@nvoxland nvoxland linked an issue Oct 5, 2022 that may be closed by this pull request
@tabbyf00
Copy link

Thanks for your PR submission! We just finished reviewing and merging it into the 4.17.0 release on October 10, 2022. When you get a chance, could you please Star the Liquibase project? The star button is in the upper right corner of the screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Misleading log message when precondition onFail: MARK_RAN is set
6 participants