Skip to content

Fix wrong reference for global attachments #301

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

davidjgoss
Copy link
Contributor

@davidjgoss davidjgoss commented Jun 7, 2025

🤔 What's changed?

I made a design mistake in #102.

As a result, the schema supports attachments that are at the test run level - because they are made from a BeforeAll or AfterAll hook - but links them directly to the test run via testRunStartedId, when really it should be to the hook with testRunHookStartedId, which in turn can be traced to the test run if required.

In practise, no consuming projects have implemented test run level attachments with these messages yet - either in formatters or Cucumber implementations. Nevertheless we'll do this in an expand-migrate-contract style, with the old deprecated field being removed later. This does still count as a breaking change, because for some languages any new field means a changed constructor signature.

🏷️ What kind of change is this?

  • 🐛 Bug fix (non-breaking change which fixes a defect)
  • 💥 Breaking change (incompatible changes to the API)

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

This text was originally generated from a template, then edited by hand. You can modify the template here.

@davidjgoss davidjgoss changed the title Fix wrong mapping for global attachments Fix wrong reference for global attachments Jun 7, 2025
@davidjgoss davidjgoss force-pushed the global-hook-attachments-rework branch from 001792a to 4f49630 Compare June 7, 2025 15:20
@davidjgoss davidjgoss marked this pull request as ready for review June 7, 2025 15:20
Copy link
Contributor

@mpkorstanje mpkorstanje 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 a doc comments.

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.

4 participants