...
 
Commits (4)
......@@ -17,8 +17,6 @@ class Discussion
:for_commit?,
:for_merge_request?,
:save,
to: :first_note
def project_id
......
......@@ -17,8 +17,12 @@ class IndividualNoteDiscussion < Discussion
noteable.supports_replying_to_individual_notes? && Feature.enabled?(:reply_to_individual_notes)
end
def convert_to_discussion!
first_note.becomes!(Discussion.note_class).to_discussion
def convert_to_discussion!(save: false)
first_note.becomes!(Discussion.note_class).to_discussion.tap do
# Save needs to be called on first_note instead of the transformed note
# because of https://gitlab.com/gitlab-org/gitlab-ce/issues/57324
first_note.save if save
end
end
def reply_attributes
......
......@@ -35,7 +35,7 @@ module Notes
if !only_commands && note.save
if note.part_of_discussion? && note.discussion.can_convert_to_discussion?
note.discussion.convert_to_discussion!.save(touch: false)
note.discussion.convert_to_discussion!(save: true)
end
todo_service.new_note(note, current_user)
......
......@@ -143,17 +143,21 @@ thousands of unused Docker images.**
**How big are the Kubernetes clusters (`review-apps-ce` and `review-apps-ee`)?**
> The clusters are currently set up with a single pool of preemptible nodes,
with a minimum of 1 node and a maximum of 100 nodes.
with a minimum of 1 node and a maximum of 50 nodes.
**What are the machine running on the cluster?**
> We're currently using `n1-standard-4` (4 vCPUs, 15 GB memory) machines.
> We're currently using `n1-standard-16` (16 vCPUs, 60 GB memory) machines.
**How do we secure this from abuse? Apps are open to the world so we need to
find a way to limit it to only us.**
> This isn't enabled for forks.
## Other resources
* [Review Apps integration for CE/EE (presentation)](https://docs.google.com/presentation/d/1QPLr6FO4LduROU8pQIPkX1yfGvD13GEJIBOenqoKxR8/edit?usp=sharing)
[charts-1068]: https://gitlab.com/charts/gitlab/issues/1068
[gitlab-pipeline]: https://gitlab.com/gitlab-org/gitlab-ce/pipelines/44362587
[gitlab:assets:compile]: https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/149511610
......
......@@ -311,7 +311,14 @@ describe Notes::CreateService do
end
it 'converts existing note to DiscussionNote' do
expect { subject }.to change { existing_note.reload.type }.from(nil).to('DiscussionNote')
expect do
existing_note
Timecop.freeze(Time.now + 1.minute) { subject }
existing_note.reload
end.to change { existing_note.type }.from(nil).to('DiscussionNote')
.and change { existing_note.updated_at }
end
end
end
......