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

Add "plan" to continued output statement #1034

Merged
merged 1 commit into from
Jul 7, 2020
Merged

Conversation

crainte
Copy link
Contributor

@crainte crainte commented May 12, 2020

Related to #1021

It looks like if the word "Plan" is added in the first line of comments made by atlantis hiding will work. Edited all vcs comments for consistency.

@codecov
Copy link

codecov bot commented May 12, 2020

Codecov Report

Merging #1034 into master will decrease coverage by 0.05%.
The diff coverage is 10.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1034      +/-   ##
==========================================
- Coverage   70.97%   70.91%   -0.06%     
==========================================
  Files          71       71              
  Lines        5870     5876       +6     
==========================================
+ Hits         4166     4167       +1     
- Misses       1357     1362       +5     
  Partials      347      347              
Impacted Files Coverage Δ
server/events/vcs/azuredevops_client.go 66.82% <0.00%> (ø)
server/events/vcs/bitbucketcloud/client.go 47.40% <0.00%> (ø)
server/events/vcs/bitbucketserver/client.go 35.63% <0.00%> (ø)
server/events/vcs/github_client.go 79.68% <0.00%> (-2.14%) ⬇️
server/events/vcs/gitlab_client.go 39.66% <0.00%> (ø)
server/events/vcs/not_configured_vcs_client.go 0.00% <0.00%> (ø)
server/events/vcs/proxy.go 0.00% <0.00%> (ø)
server/events_controller.go 57.75% <0.00%> (ø)
server/events/command_runner.go 53.61% <9.09%> (+0.15%) ⬆️
server/events/pull_closed_executor.go 89.74% <100.00%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc55ba3...aa1bfc0. Read the comment docs.

Copy link
Member

@lkysow lkysow left a comment

Choose a reason for hiding this comment

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

This comment splitting applies to both apply and plan comments so this isn't accurate. I think you need to pass the type of comment and only add plan if it's actually a plan comment.

@crainte
Copy link
Contributor Author

crainte commented May 21, 2020

@lkysow maybe I should change my approach. Instead of adding the word "plan" here should I just expand the matching located here: https://github.com/runatlantis/atlantis/blob/master/server/events/vcs/github_client.go#L168-L179 ?

That would allow hiding of failed applies or discarding of locks via the UI.

@lkysow
Copy link
Member

lkysow commented May 25, 2020

@crainte I don't think we want to hide failing applies because a partial apply may still make some changes.

@lkysow lkysow added the waiting-on-response Waiting for a response from the user label May 25, 2020
@crainte
Copy link
Contributor Author

crainte commented May 26, 2020

That's a good point. I'll move ahead with your suggestion of passing the type.

@crainte crainte marked this pull request as draft May 26, 2020 19:09
@crainte crainte force-pushed the reword branch 2 times, most recently from 0dd4392 to b9ba66f Compare June 4, 2020 19:02
@Ninir
Copy link
Contributor

Ninir commented Jun 23, 2020

@crainte @lkysow hey folks, anything we can do to help this cross the finish line?

@lkysow
Copy link
Member

lkysow commented Jun 24, 2020

I'm waiting for the PR to be ready for review before I look at it.

@crainte crainte marked this pull request as ready for review June 24, 2020 18:57
@crainte
Copy link
Contributor Author

crainte commented Jun 24, 2020

Looks like I need to rebase, I'll do that shortly. I'm not exactly thrilled with this because it looks like i'm abusing models.ApplyCommand when an error comment is created. I was waiting to see what your comments were going to be like for #1060 since that might be a cleaner option.

edit: rebased

@crainte crainte force-pushed the reword branch 5 times, most recently from 102a4b8 to 033f018 Compare June 24, 2020 19:28
@lkysow
Copy link
Member

lkysow commented Jun 25, 2020

Let's take in a string to CreateComment instead of a CommandName and then for error we can use empty string.

@crainte crainte force-pushed the reword branch 2 times, most recently from b62a103 to 6eebdd0 Compare June 29, 2020 20:15
@crainte crainte requested a review from lkysow June 29, 2020 20:32
Copy link
Member

@lkysow lkysow left a comment

Choose a reason for hiding this comment

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

Looks good, just one small change. Can you squash all your commits as well please.

server/events/vcs/github_client.go Outdated Show resolved Hide resolved
Copy link
Member

@lkysow lkysow left a comment

Choose a reason for hiding this comment

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

🎉

@lkysow
Copy link
Member

lkysow commented Jul 7, 2020

Fixes #1021 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-on-response Waiting for a response from the user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants