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

Print changes to be deployed or reverted. #702

Merged
merged 1 commit into from
Feb 18, 2023

Conversation

vectro
Copy link
Contributor

@vectro vectro commented Jan 11, 2023

Closes #701

Copy link
Collaborator

@theory theory left a comment

Choose a reason for hiding this comment

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

Looking good, but a couple changes I think would make it just right. Thanks!

lib/App/Sqitch/Engine.pm Outdated Show resolved Hide resolved
@@ -269,6 +274,15 @@ sub deploy {
$self->$meth( $plan, $to_index );
}

# Do a thing similar to Sqitch::Plan::Change::format_name_with_tags,
Copy link
Collaborator

Choose a reason for hiding this comment

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

If you can't use that actual method, I suggest adding a new one there, not here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do not have a Sqitch::Plan::Change here, so I don't think this code can go in that module?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh 🤦🏻 got it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I do wonder if we should avoid the overhead when verbosity is less than two. Though it probably isn't that expensive, relative to the overhead of the database. Maybe I'm overthinking it.

t/engine.t Show resolved Hide resolved
t/engine.t Show resolved Hide resolved
lib/App/Sqitch/Engine.pm Outdated Show resolved Hide resolved
@@ -269,6 +274,15 @@ sub deploy {
$self->$meth( $plan, $to_index );
}

# Do a thing similar to Sqitch::Plan::Change::format_name_with_tags,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh 🤦🏻 got it.

@@ -269,6 +274,15 @@ sub deploy {
$self->$meth( $plan, $to_index );
}

# Do a thing similar to Sqitch::Plan::Change::format_name_with_tags,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I do wonder if we should avoid the overhead when verbosity is less than two. Though it probably isn't that expensive, relative to the overhead of the database. Maybe I'm overthinking it.

@theory theory self-assigned this Jan 21, 2023
@theory theory added feature engine waiting Waiting on feedback labels Jan 21, 2023
@vectro
Copy link
Contributor Author

vectro commented Jan 23, 2023

Regarding performance, my assumption would be that the overhead in printing would be orders of magnitude smaller than the actual time to deploy the change, even for trivial changes.

@vectro
Copy link
Contributor Author

vectro commented Jan 23, 2023

Also I'm not sure what the next step is on this PR, do you want to run workflows? Is it ready to merge?

@theory
Copy link
Collaborator

theory commented Jan 28, 2023

Yeah, I'm overthinking it on performance :-) I've approved the workflows; is there a test that demonstrates that those lines do not output when verbosity is < 2? If so I think it's good to go.

@vectro
Copy link
Contributor Author

vectro commented Jan 30, 2023

is there a test that demonstrates that those lines do not output when verbosity is < 2?

If you are referring to the deploy change, there is a test, in the sense that we never print this message in tests. All the tests only check verbosity = 1.

If you are referring to the revert change, we print these at verbosity = 1.

@vectro
Copy link
Contributor Author

vectro commented Jan 30, 2023

Regarding these CI failures, I'm not sure what to make of them. They don't seem related to this change? Are the tests a bit flaky?

@theory
Copy link
Collaborator

theory commented Jan 31, 2023

Yeah I probably need to re-enable Snowflake and figure out what Exasol's problem is.

@vectro
Copy link
Contributor Author

vectro commented Feb 1, 2023

What is the next step on this PR? Is it ready to merge?

@theory
Copy link
Collaborator

theory commented Feb 4, 2023

I'll take a look at getting it merged soon, hopefully this weekend, but maybe not for a week or two.

@theory theory merged commit 06daffc into sqitchers:develop Feb 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine feature waiting Waiting on feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wishlist: Print the list of changes that would be deployed or reverted
2 participants