Skip to content

Extend content.get() to support include param #416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

cgraham-rs
Copy link
Collaborator

Adds include param support for content.get()

  • Add the param support
  • Add unit test
  • Add integration test
  • Also manually verified by testing locally against a live Connect instance

@cgraham-rs cgraham-rs requested a review from tdstein as a code owner June 24, 2025 18:45
@tdstein
Copy link
Collaborator

tdstein commented Jun 24, 2025

I wonder if the better UX is to simply do all of the includes all the time in get. I can't think of any use cases where making this configurable is strictly necessary.

@cgraham-rs
Copy link
Collaborator Author

I wonder if the better UX is to simply do all of the includes all the time in get. I can't think of any use cases where making this configurable is strictly necessary.

That sounds reasonable to me and fits my specific use case perfectly. I simply followed the Connect API where they're all optional.

@cgraham-rs
Copy link
Collaborator Author

I wonder if the better UX is to simply do all of the includes all the time in get. I can't think of any use cases where making this configurable is strictly necessary.

That sounds reasonable to me and fits my specific use case perfectly. I simply followed the Connect API where they're all optional.

@tdstein should I implement this change or do we need further discussion with others first?

@tdstein
Copy link
Collaborator

tdstein commented Jun 25, 2025

I wonder if the better UX is to simply do all of the includes all the time in get. I can't think of any use cases where making this configurable is strictly necessary.

That sounds reasonable to me and fits my specific use case perfectly. I simply followed the Connect API where they're all optional.

@tdstein should I implement this change or do we need further discussion with others first?

Go for it. It should be just modifying the request to include the query arguments.

@cgraham-rs
Copy link
Collaborator Author

Go for it. It should be just modifying the request to include the query arguments.

@tdstein Done.

Note that CI cannot run integration tests from a fork due to security around secrets.

connect-1 | time="2025-06-25T21:29:05.292Z" level=warning msg="Unable to obtain a valid license: Your Posit Connect license has expired. Please contact your Customer Success representative or email sales@posit.co to obtain a current license."

Locally I ran 2025.03.0 and 2025.02.0 successfully, but preview fails a variety of other tests.

@tdstein
Copy link
Collaborator

tdstein commented Jun 30, 2025

Note that CI cannot run integration tests from a fork due to security around secrets.

@cgraham-rs - since you are using a fork, you don't have access to the repository secrets. If you set the CONNECT_LICENSE environment variable in GitHub secrets, it should work on your branch.

Alternatively, you can recreate the pull request as a branch off of main. Either should work.

preview fails a variety of other tests.

I'm also seeing that. I'll address it in as a separate issue.

@tdstein
Copy link
Collaborator

tdstein commented Jun 30, 2025

@cgraham-rs - here is a fix for the integration test failures: #417

@cgraham-rs
Copy link
Collaborator Author

Closing in favor of non-fork PR: #420

@cgraham-rs cgraham-rs closed this Jul 8, 2025
cgraham-rs added a commit that referenced this pull request Jul 8, 2025
Adds `include` param support for `content.get()`

- Add the param support, opting to hardcode it so it is always used
- Add unit test
- Add integration test
- Also manually verified by testing locally against a live Connect
instance

Replaces previous fork PR:
#416
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