Skip to content

Conversation

@simplyluke
Copy link
Contributor

@simplyluke simplyluke commented Nov 4, 2025

Description

My apologies for the size of this PR. It's almost entirely generated code and I'm aiming to comment on the PR such that reviewers can more easily identify key changes.

This PR updates our OpenAPI spec to v2.9.0 of the retool API, which is current. It generates our SDK code and updates the provider to leverage these updates to bring existing resources/data sources up to date with the current API and its capabilities.

As a follow up I'll be adding some more resources such that more of Retool can be managed via terraform.

This PR should be backwards compatible, all new fields are optional, but given the breadth of the change I'm marking this as our 1.0 release.

The two files that have changed a lot are our SSO and Source Control implementations. These end up much better organized/typed, and the migration to 2.9.0 with autogen code ended up breaking some of the prior typing.

Note that much of the code here was autogenerated for the SDK, and outside of that LLMs were leveraged heavily. I've validated the outputs to the best of my ability (read: I have not manually reviewed all autogenerated SDK code, but have gone through everything an LLM touched)

Tests

I've done the following to validate the changes:

  • Re-record acceptance tests against a dev instance
  • All unit tests are green
  • I did manual QA configuring/updating a live dev instance with all resources and data sources to validate existing behavior. There are still some rough edges that were pre-existing (universal permissions being the largest pain point I ran across)

values = [
{
environment_id = "production"
environment_id = "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d" # prod
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Quality of life improvement here. IDs for envs are always UUIDs, not names.

func newHTTPRecorder(t *testing.T) *recorder.Recorder {
t.Helper()

// Create an HTTP client with TLS verification disabled for recording.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to make this change to record the tests, at least with an agent.


One of these is for the imprecise conversion of zod discriminated unions (used internally) to openapi - instead of `oneOf` schemas, `anyOf` is more accurate for nested object types.

### Known OpenAPI Spec Corrections
Copy link
Contributor Author

@simplyluke simplyluke Nov 7, 2025

Choose a reason for hiding this comment

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

Added a lot of context on how I/Sonnet were able to get this to compile and work for 2.9.0 which should be helpful going forward for future updates. Effectively everything below this in the PR is either re-recorded tests or generated code.

@simplyluke simplyluke changed the title update repo to reflect v.2.9.0 of the api [feat][gov] Update repo to reflect v.2.9.0 of the API Nov 7, 2025
@simplyluke simplyluke marked this pull request as ready for review November 7, 2025 18:48
Copy link

@yuchien302 yuchien302 left a comment

Choose a reason for hiding this comment

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

🚢🚢🚢

@simplyluke simplyluke merged commit 46d0dcc into main Nov 12, 2025
3 checks passed
@simplyluke simplyluke deleted the lukew/2.9-update branch November 12, 2025 17:22
simplyluke added a commit that referenced this pull request Nov 13, 2025
notes in readme

all tests passing, working on a local server with real examples

docs

lint fixes

add comment on folder deletion recursion

notes on reviewing

better handling for config variables as secret

update docs

lint

lint

add resources resource

docs

fix test

lint

lint

lint

docs update

wip on resource configs

Bump golang.org/x/crypto from 0.23.0 to 0.35.0 (#53)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.23.0 to 0.35.0.
- [Commits](golang/crypto@v0.23.0...v0.35.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.35.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

[feat][gov] Update repo to reflect v.2.9.0 of the API (#52)

* update repo to reflect v.2.9.0 of the api

* fixes to cursor slop

* notes in readme

* all tests passing, working on a local server with real examples

* docs

* lint fixes

* add comment on folder deletion recursion

* notes on reviewing

* better handling for config variables as secret

* update docs

* lint

* lint

[feat][gov] Add ability to manage resources (#55)

* update repo to reflect v.2.9.0 of the api

* fixes to cursor slop

* notes in readme

* all tests passing, working on a local server with real examples

* docs

* lint fixes

* add comment on folder deletion recursion

* notes on reviewing

* better handling for config variables as secret

* update docs

* lint

* lint

* add resources resource

* docs

* fix test

* lint

* lint

* lint

* docs update

* more accurate docs

probable fixes

more linting
simplyluke added a commit that referenced this pull request Nov 14, 2025
* update repo to reflect v.2.9.0 of the api

* working

notes in readme

all tests passing, working on a local server with real examples

docs

lint fixes

add comment on folder deletion recursion

notes on reviewing

better handling for config variables as secret

update docs

lint

lint

add resources resource

docs

fix test

lint

lint

lint

docs update

wip on resource configs

Bump golang.org/x/crypto from 0.23.0 to 0.35.0 (#53)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.23.0 to 0.35.0.
- [Commits](golang/crypto@v0.23.0...v0.35.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.35.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

[feat][gov] Update repo to reflect v.2.9.0 of the API (#52)

* update repo to reflect v.2.9.0 of the api

* fixes to cursor slop

* notes in readme

* all tests passing, working on a local server with real examples

* docs

* lint fixes

* add comment on folder deletion recursion

* notes on reviewing

* better handling for config variables as secret

* update docs

* lint

* lint

[feat][gov] Add ability to manage resources (#55)

* update repo to reflect v.2.9.0 of the api

* fixes to cursor slop

* notes in readme

* all tests passing, working on a local server with real examples

* docs

* lint fixes

* add comment on folder deletion recursion

* notes on reviewing

* better handling for config variables as secret

* update docs

* lint

* lint

* add resources resource

* docs

* fix test

* lint

* lint

* lint

* docs update

* more accurate docs

probable fixes

more linting

* docs

* more linting

* mention ignoring options in docs

* tf file
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