Skip to content

Update MessageBuilder when runner generate messages - #1882

Merged
brasmusson merged 5 commits into
mainfrom
feature/runner-messages
Aug 20, 2026
Merged

Update MessageBuilder when runner generate messages#1882
brasmusson merged 5 commits into
mainfrom
feature/runner-messages

Conversation

@brasmusson

@brasmusson brasmusson commented May 31, 2026

Copy link
Copy Markdown
Contributor

Description

  • Changes when the runner generate messages at the source.

Depend on cucumber/cucumber-ruby-core#331

Type of change

Please delete options that are not relevant.

  • Refactoring (improvements to code design or tooling that don't change behaviour)
  • New feature (non-breaking change which adds new behaviour)

Please add an entry to the relevant section of CHANGELOG.md as part of this pull request.

Checklist:

Your PR is ready for review once the following checklist is
complete. You can also add some checks if you want to.

  • Tests have been added for any changes to behaviour of the code
  • New and existing tests are passing locally and on CI
  • bundle exec rubocop reports no offenses
  • RDoc comments have been updated
  • CHANGELOG.md has been updated

Base automatically changed from feature/v11_message_emittence_at_source to main June 1, 2026 19:51
@brasmusson
brasmusson changed the base branch from main to v11/deletions July 16, 2026 08:44
@brasmusson
brasmusson force-pushed the feature/runner-messages branch from 4007e67 to 402b6ea Compare July 16, 2026 08:45
Comment thread lib/cucumber/formatter/message_builder.rb
@luke-hill

Copy link
Copy Markdown
Contributor

Requires cucumber-core 18.1+

Base automatically changed from v11/deletions to main July 20, 2026 13:27
@luke-hill

Copy link
Copy Markdown
Contributor

@brasmusson I think this has lots of code that has already been merged into main. Not sure if a merge / rebase will fix it.

* Changes when the runner generate test_case_started/finished messages
  at the source.
* Changes when the runner generate test_step_started/finished messages
  at the source.
* Pass also the id_generator to the runner.
@brasmusson
brasmusson force-pushed the feature/runner-messages branch from 402b6ea to 6374484 Compare August 13, 2026 10:21
@brasmusson
brasmusson marked this pull request as ready for review August 13, 2026 14:55

@current_test_case_started_id = event.envelope.test_case_started.id
@current_test_run_hook_started_id = nil
@repository.update(event.envelope)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Writing this as a new comment. Now I understand the change on line 55.

I still think we need to fully update the repository after each envelope. So imo this should be moved above line 55.

Given every line now in this method is just assigning an iVar, we could even move the update call to the first line, to make it cleaner and leaner (As in here we always have the envelope already and don't need to generate it - which was the reason for it being at the bottom of all other on_.... handlers)

@luke-hill

Copy link
Copy Markdown
Contributor

Note to self and @brasmusson

I've merged a piece of work which naturally breaks a couple of tests. This PR should also fix the tests.

It looks like it's just one feature test - The failure looks "good" (Duplication of message output).

features/docs/formatters/message.feature:27

This was referenced Aug 19, 2026
@brasmusson
brasmusson merged commit f50e7e2 into main Aug 20, 2026
17 checks passed
@brasmusson
brasmusson deleted the feature/runner-messages branch August 20, 2026 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants