Skip to content

[ci] Upgrade Expression to 3.0.0-rc - #312

Open
smn wants to merge 12 commits into
developfrom
trial-3-X-rc
Open

[ci] Upgrade Expression to 3.0.0-rc#312
smn wants to merge 12 commits into
developfrom
trial-3-X-rc

Conversation

@smn

@smn smn commented May 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Upgrade expression dependency from hex ~> 2.48.0 to the release/3-0-0 branch on GitHub (3.0.0-rc)
  • Update FlowRunner and DynamicSelectOneResponse to use Expression directly instead of the removed Expression.V2.Compat module
  • Pin all GitHub Actions in CI workflows (elixir.yml, releases.yml, cla.yml) to full-length commit SHAs to comply with org security policy

Changes

  • mix.exs / mix.lock: Switch expression dep to github: "turnhub/expression", branch: "release/3-0-0"
  • lib/flow_runner.ex: Replace Expression.V2.Compat calls with Expression module; adapt evaluate_expression_block/2 for new {:ok, val} / {:error, reason} return type
  • lib/flow_runner/custom_blocks/dynamic_select_one_response.ex: Same Expression.V2.CompatExpression migration
  • .github/workflows/*.yml: Pin actions/checkout, erlef/setup-beam, actions/cache, mikepenz/action-junit-report, and contributor-assistant/github-action to commit SHAs

Test plan

  • CI passes with pinned actions
  • All existing tests pass against expression 3.0.0-rc

🤖 Generated with Claude Code

@smn
smn requested review from nathanbegbie and santiagocardo May 12, 2026 12:56
@smn

smn commented May 12, 2026

Copy link
Copy Markdown
Contributor Author

mostly a PR to see what the fall-out is from the breaking changes in the 3.X.X release candidates.

santiagocardo
santiagocardo previously approved these changes May 12, 2026

@santiagocardo santiagocardo left a comment

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.

LGTM, thanks @smn 🚀

@smn

smn commented May 12, 2026

Copy link
Copy Markdown
Contributor Author

Cool. Before merging I'm going to be creating a PR in our product to see what the test fall out could be.

@jerith

jerith commented May 18, 2026

Copy link
Copy Markdown

👋 Hi!

When I run our flow tester with this branch, the debug output for template messages doesn't evaluate the language code.

For example, we get "[DEBUG]\nTemplate mytemplate sent with language @template_lang.\n\n[...]" instead of "[DEBUG]\nTemplate mytemplate sent with language eng.\n\n[...] when the template block's language code is set to "@template_lang" with the variable value set to "eng" in the context.

@smn

smn commented May 20, 2026

Copy link
Copy Markdown
Contributor Author

@jerith thanks! Yeah that's likely because we no longer automatically expand nested expressions anymore. I'll get a fix in to the flow runner for this because I don't think here that's a worthwhile breaking change.

@smn

smn commented May 21, 2026

Copy link
Copy Markdown
Contributor Author

@jerith I've got a fix in for your issue but not entirely happy with it, that said, could you review it?

@smn

smn commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

latest expression now handles nested evaluations, it was a mistake to remove that.

@smn

smn commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

@jerith pls run against your stuff and see what breaks ?

@smn smn changed the title [ci] Upgrade Expression to 3.0.0-rc and pin GitHub Actions to commit SHAs [ci] Upgrade Expression to 3.0.0-rc May 22, 2026

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.

@smn, just a heads-up: changes here may be ported to the new simulator implementation in the product.

@jerith

jerith commented May 25, 2026

Copy link
Copy Markdown

Looks like it's working after three changes to our code:

  • Handle new error format in some expression edge case tests
  • Handle uppercase context variables in time-faking expression function overrides
  • Fix Tesla adapter config override to work without use Tesla

All of these are specific to our code and look like improvements to me. Thanks! 🎉

@smn

smn commented May 25, 2026

Copy link
Copy Markdown
Contributor Author

thanks @jerith - that's good to hear

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.

3 participants