Skip to content

Release rstudio-library 0.1.39 with Gateway API helpers - #982

Open
jaygalvin wants to merge 5 commits into
mainfrom
rstudio-library-0.1.38
Open

jaygalvin wants to merge 5 commits into
mainfrom
rstudio-library-0.1.38

Conversation

@jaygalvin

@jaygalvin jaygalvin commented Nov 19, 2026 •

Copy link
Copy Markdown

Splits the rstudio-library change out of #981 so the library can be released first.

Why

The product charts in #981 depend on rstudio-library 0.1.39. That version is not on helm.rstudio.com yet, so the lint, test, and check-versions-connect checks on #981 fail with no matching version. After this PR merges and the release workflow publishes 0.1.39, those checks can run again on #981.

What changes

  • Add templates/_gateway.tpl with Gateway API helpers: apiVersion, path match mapping, HTTPRoute naming, and the service backendRef. Nothing calls them yet, so no chart renders differently.
  • Bump rstudio-library to 0.1.39 and add the NEWS.md entry.
  • Bump other-charts/rstudio-library-test to 0.1.3 and update its Chart.lock for 0.1.39.
  • Fail the render for the ImplementationSpecific path type and for unknown path types, and keep HTTPRoute names unique when they exceed 63 characters (review feedback from Ben).

The helpers come from #865 by Adam Zahorscak.

Testing

  • helm unittest on other-charts/rstudio-library-test: 10 suites and 95 tests pass, using the local library.
  • helm-docs produces no diff.

Add _gateway.tpl with helpers for HTTPRoute apiVersion, path match mapping,
route naming, and the service backendRef. Bump rstudio-library to 0.1.38 and
update the rstudio-library-test lock file.

The product charts will use these helpers in a follow-up change (#981).
@jaygalvin
jaygalvin requested review from a team as code owners November 19, 2026 22:51
The Chart.lock change for rstudio-library 0.1.38 counts as a chart change,
so chart-testing requires a version bump and a NEWS entry.

@bschwedler bschwedler 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.

Thanks for adding this!

Could you please add some unit tests to cover these cases in other-charts/rstudio-library-test?

I know our coverage currently isn't that much, but we are trying to add in coverage for anything new so that we can catch regressions in the future.

Add a testGateway harness template and a gateway_test.yaml suite to
rstudio-library-test. The tests cover:
- the Gateway API version
- pathType mapping, including pass-through and the PathPrefix fallback
- path match rendering from string and object paths
- HTTPRoute naming, including multi-digit indexes and 63-character truncation
- service backendRef rendering
@jaygalvin

Copy link
Copy Markdown
Author

@bschwedler I added unit tests for the new helpers in other-charts/rstudio-library-test (5c5dc6c).

The tests follow the pattern of the existing suites in that chart: a testGateway block in values.yaml, a templates/test-gateway.yaml template, and a tests/gateway_test.yaml suite with 13 tests. They cover all four helpers in _gateway.tpl:

  • gateway.apiVersion: returns gateway.networking.k8s.io/v1.
  • gateway.ingressPathTypeToGateway: maps Prefix, Exact, and ImplementationSpecific. It passes PathPrefix and RegularExpression through. It falls back to PathPrefix for an unknown or empty value.
  • gateway.httpPathMatchBody: renders a path match from a string path, from an object with a pathType, and from an object without one (defaults to PathPrefix).
  • gateway.httpRouteName: builds <fullName>-gw-<index>, handles a multi-digit index, and keeps the name within 63 characters for a long full name.
  • gateway.serviceBackendRef: renders the service name and a numeric port, including a port given as a string.

All 10 suites in the chart pass locally (88 tests). I also changed the pathType mapping on purpose to check that the tests fail, and they did.

One limit: the | int cast on the port has no effect on rendered text, so no output-based test can tell whether it is present.

The change also adds a NEWS.md line and the regenerated README values table for rstudio-library-test.

@jaygalvin
jaygalvin requested a review from bschwedler November 20, 2026 18:10
@bschwedler
bschwedler dismissed their stale review November 23, 2026 14:31

Tests have been added

@jaygalvin jaygalvin changed the title Release rstudio-library 0.1.38 with Gateway API helpers Release rstudio-library 0.1.39 with Gateway API helpers Dec 1, 2026
@jaygalvin
jaygalvin requested a review from bschwedler December 2, 2026 17:26
serviceBackendRef converted the port with `int`, so a named Service port
such as "http" or an empty value rendered port 0 and produced an invalid
HTTPRoute. Fail the render with a clear message instead.

Add unit tests for a named port and an empty port.

This branch has not been deployed

No deployments
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