Skip to content

Conversation

nelsonmaia
Copy link
Contributor

🔧 Changes

This PR adds support for two new tenant-level session configuration fields to the Tenant resource:

  • ephemeral_session_lifetime
  • idle_ephemeral_session_lifetime

These fields allow customers to configure the absolute and idle timeouts for ephemeral (non-persistent) sessions.

Changes include:

  • Added fields to the Tenant struct in tenant.go
  • Updated MarshalJSON() to support _in_minutes behavior for values less than 1 hour (mirroring existing session fields)
  • Generated new getter/setter methods via make generate
  • Updated integration test (TestTenantManager) to validate read/write behavior of the new fields
  • Extended TestTenant_MarshalJSON to test marshaling logic for hour- and minute-based values
  • Regenerated test recordings to reflect changes

📚 References


🔬 Testing

  • Ran make test-record FILTER=TestTenantManager to verify update and read-back of new fields
  • Added assertions in the integration test for both ephemeral session fields
  • Verified MarshalJSON logic correctly routes values to *_in_minutes when below 1 hour
  • Deleted and regenerated test recording fixtures for consistency

📝 Checklist

  • All new/changed/fixed functionality is covered by tests
  • I have added documentation for all new/changed functionality (or N/A — will be documented in upstream product docs)

@nelsonmaia nelsonmaia requested a review from a team as a code owner October 2, 2025 14:43
@developerkunal developerkunal changed the base branch from main to v1 October 13, 2025 15:59
@developerkunal
Copy link
Contributor

Hi @nelsonmaia,

We shouldn’t add custom logic in SDKs, such as:

Updated MarshalJSON() to support _in_minutes behaviour for values less than 1 hour (mirroring existing session fields)

These changes will be lost in the generated SDK.

Currently, the SDK is just a wrapper on top of the API, so any custom logic should live in the API itself rather than the SDK.

@nelsonmaia
Copy link
Contributor Author

@developerkunal I just replicated the same behaviour for the GetIdleSessionLifetime and GetSessionLifetime, maybe my comment was confusing but I just used the same pattenr that the same fields have already

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