Skip to content

WIP for Session Tests#497

Open
nisranjan wants to merge 43 commits intoGoogleCloudPlatform:mainfrom
nisranjan:session_persistance
Open

WIP for Session Tests#497
nisranjan wants to merge 43 commits intoGoogleCloudPlatform:mainfrom
nisranjan:session_persistance

Conversation

@nisranjan
Copy link
Contributor

@nisranjan nisranjan commented Aug 18, 2025

@noahlwest
Just implement Session Tests for #466

It covers the following:

  • Creating a Session
  • Deleting a Session
  • Listing Session
  • Corrupted History file
  • Concurrent Session Access
  • Clear Session

A modification I made in session.go is to change the implementation of session file loading from entire JSON at one time to line by line so any corrupt JSON lines can be omitted

Another issue that I found out during testing is that GetLatestSession gets the first session, however it gets the latest session when a call to ListSession has already been made which sorts the slice of sessions, at the moment I am not sure if there is a use case of calling GetLatestSession without calling the ListSession(), because if there is a case for that then we should fix this.

Copy link
Collaborator

@noahlwest noahlwest left a comment

Choose a reason for hiding this comment

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

Thank you very much! Overall looks good, just two minor comments.

@nisranjan
Copy link
Contributor Author

nisranjan commented Sep 10, 2025

@noahlwest @droot
The session_test.go did not make it to the kubectl-ai main branch, who need to do something push that to the main branch.
Will closing this PR automatically merge the files into the main branch?

@droot
Copy link
Member

droot commented Sep 10, 2025

@noahlwest @droot The session_test.go did not make it to the kubectl-ai main branch, who need to do something push that to the main branch. Will closing this PR automatically merge the files into the main branch?

Getting this in today. Thank you!

@droot
Copy link
Member

droot commented Sep 10, 2025

@noahlwest @droot The session_test.go did not make it to the kubectl-ai main branch, who need to do something push that to the main branch. Will closing this PR automatically merge the files into the main branch?

Getting this in today. Thank you!

presubmits are failing, you may want to run make check to make them pass.

bharats97 and others added 10 commits September 10, 2025 10:39
…Platform#521)

MCP servers can return object schemas with additionalProperties
but no properties field, which is valid JSON Schema. The current
code panics when trying to convert such schemas.

This fix adds proper nil/existence checks before accessing the
properties field and gracefully handles object schemas that
rely on additionalProperties without explicit properties.

Fixes GoogleCloudPlatform#520
* install mockgen

* wrong mockgen
* fix: update Kind cluster setup action and add error handling in periodic CI workflow

* fix: reduce timeout values and improve retry logic in periodic eval workflow
* update k8s-bench results

* remove gemma results
* add krew releaser step

* add generated from

* remove comment
noahlwest and others added 20 commits September 18, 2025 11:18
…ogleCloudPlatform#542)

* Add --show-failures flag to `analyze-evals`, update scripts

* Add string formatter to AddFailure call

* add --show-tool-output to eval runs
…eCloudPlatform#553)

* Add --create-kind-cluster flag to k8s-bench

* Make cluster name fixed, add logging
Conflicts:
	go.mod

Changes to be committed:
	modified:   go.mod
	new file:   pkg/sessions/session_test.go
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.

8 participants