Skip to content

Confusing behaviour of trackingPlans[].version field #106

@PeterJCLaw

Description

@PeterJCLaw

The trackingPlans[].version field, while not mentioned in the README, appears to be a way to control which version of a tracking plan is used to generate the client code. Setting it to a number larger than the latest tracking plan version results in an error when npx rudder-typer update is run, seeming to confirm that the specific version is being downloaded.

However setting it to any valid version always results in the latest version of the tracking plan being downloaded -- at least as far as the content of the plan goes. Unfortunately the version provided is what ends up in the resulting plan.json file, even if the rest of the content of the file reflects a different plan version.

In turn this means that the generated client code contains the version number from the config, which presumably would lead to events being sent by that generated code being validated against a different version of the tracking plan than was expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions