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

Implement tagExists Maven command (Fix issue 1063) #3385

Merged
merged 10 commits into from
Nov 18, 2022

Conversation

rozenshteyn
Copy link
Contributor

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Implement tagExists Maven command. Fixes #1063.

Modeled after the existing LiqubaseTag mojo class.
Users will be able to run the command: mvn liquibase:tagExists -Dliquibase.tag=myTag to check for existence of the specified tag in the configured database.

Things to be aware of

  • None at this time

Things to worry about

  • I am not sure if anything else (other than implementing the mojo class) needs to be done in order for the functionality to show up in the Liquibase Maven plugin.

Additional Context

None at this time.

@kataggart kataggart changed the title Fix issue 1063 Implement tagExists Maven command (Fix issue 1063) Oct 19, 2022
@MalloD12 MalloD12 self-assigned this Nov 7, 2022
@MalloD12 MalloD12 added the SafeToBuild Indicates that a particular PR contains changes which are safe to build using GitHub actions label Nov 14, 2022
@github-actions
Copy link

github-actions bot commented Nov 14, 2022

Unit Test Results

  4 752 files  +12    4 752 suites  +12   36m 2s ⏱️ -7s
  4 695 tests +  2    4 459 ✔️ +  2     236 💤 ±0  0 ±0 
55 560 runs  +24  50 252 ✔️ +24  5 308 💤 ±0  0 ±0 

Results for commit 25d3c6a. ± Comparison against base commit 0aa4be9.

♻️ This comment has been updated with latest results.

@MalloD12 MalloD12 added SafeToBuild Indicates that a particular PR contains changes which are safe to build using GitHub actions sprint2022-38 and removed SafeToBuild Indicates that a particular PR contains changes which are safe to build using GitHub actions labels Nov 14, 2022
@MalloD12 MalloD12 added SafeToBuild Indicates that a particular PR contains changes which are safe to build using GitHub actions and removed SafeToBuild Indicates that a particular PR contains changes which are safe to build using GitHub actions labels Nov 15, 2022
@MalloD12 MalloD12 added SafeToBuild Indicates that a particular PR contains changes which are safe to build using GitHub actions and removed SafeToBuild Indicates that a particular PR contains changes which are safe to build using GitHub actions labels Nov 15, 2022
@MalloD12
Copy link
Contributor

Approved!

Review and testing results:

Overall this PR looks ok to me. Few small changes has been made and are detailed below:

  • Added goal annotation to TagExists Mojo class.
  • Updated testTag unit tests to validate tag is set and properly set to the mojo under test.
  • Update existent testTag integration test to also perform a tagExists validation. I decided to update the existing test and not added a new one, because the test would be pretty much the same and I thought it is worth using the same setup and not duplicate code for testing almost the same scenario.

Things to be aware of:

  • Nothing

Things to worry about:

  • Nothing. Only applicable to Maven plugin so no further impact.

Additional comment:
Although autocandidate tag has been added. I think might be worth performing a round of exploratory testing around maven plugin. We have unit/integration tests to validate commands are successfully executed, but at this point nothing maven specific.

@MalloD12 MalloD12 self-requested a review November 15, 2022 19:15
@MalloD12 MalloD12 assigned MalloD12 and unassigned MalloD12 Nov 15, 2022
@MalloD12 MalloD12 added SafeToBuild Indicates that a particular PR contains changes which are safe to build using GitHub actions and removed SafeToBuild Indicates that a particular PR contains changes which are safe to build using GitHub actions labels Nov 15, 2022
*/
public class LiquibaseTagExistsMojoTest extends AbstractLiquibaseMojoTest {

// reusing dropAll/plugin_config.xml since the LiguibaseTagExists mojo does
Copy link
Contributor

Choose a reason for hiding this comment

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

I appreciate the comment explaining why this particular changelog is used in the test. Thank you!

@XDelphiGrl
Copy link
Contributor

@MalloD12, hi!

Additional comment: Although autocandidate tag has been added. I think might be worth performing a round of exploratory testing around maven plugin. We have unit/integration tests to validate commands are successfully executed, but at this point nothing maven specific.

We do have functional automated tests that exercise Maven goals. We should add a new one for this feature. I will create an internal Jira ticket to make sure we do that. I do not believe this particular PR requires any additional manual testing.

@MalloD12
Copy link
Contributor

We do have functional automated tests that exercise Maven goals. We should add a new one for this feature. I will create an internal Jira ticket to make sure we do that. I do not believe this particular PR requires any additional manual testing.

Oh nice, I might not see them yet or might forget about those. Where are they? I

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.

This PR extends the Liquibase Maven plugin to support the tagExists goal.

APPROVED

Copy link
Collaborator

@filipelautert filipelautert left a comment

Choose a reason for hiding this comment

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

All fine, new maven command.

@filipelautert filipelautert merged commit 9dce0c1 into liquibase:master Nov 18, 2022
@filipelautert filipelautert added this to the 4.18.0 milestone Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autocandidate IntegrationMaven SafeToBuild Indicates that a particular PR contains changes which are safe to build using GitHub actions sprint2022-38 TypeEnhancement
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

tagExists command not available with Maven Plugin
7 participants