Skip to content
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

feat: renku-core client #1652

Merged
merged 55 commits into from
Aug 30, 2023
Merged

feat: renku-core client #1652

merged 55 commits into from
Aug 30, 2023

Conversation

jachro
Copy link
Contributor

@jachro jachro commented Aug 9, 2023

This PR introduces a new module containing a Renku Core client

/deploy #persist

@jachro jachro linked an issue Aug 9, 2023 that may be closed by this pull request
23 tasks
jachro and others added 23 commits August 10, 2023 21:03
…#1656)

* fix: Cross-Entity Search to fetch creator name from the Persons graph

* fix: Recently Viewed Entities to fetch creator name from the Persons graph

* fix: Search graphs provisioning not to contain creator name

* feat: TS migrations that remove Person entities from the Search graphs
@jachro jachro temporarily deployed to renku-ci-gr-1652 August 21, 2023 17:32 — with GitHub Actions Inactive
@jachro jachro temporarily deployed to renku-ci-gr-1652 August 22, 2023 13:14 — with GitHub Actions Inactive
@jachro jachro temporarily deployed to renku-ci-gr-1652 August 25, 2023 10:43 — with GitHub Actions Inactive
@jachro jachro temporarily deployed to renku-ci-gr-1652 August 25, 2023 13:47 — with GitHub Actions Inactive
@jachro jachro marked this pull request as ready for review August 25, 2023 16:13
@jachro jachro requested review from a team as code owners August 25, 2023 16:13
@jachro jachro temporarily deployed to renku-ci-gr-1652 August 25, 2023 16:13 — with GitHub Actions Inactive
@jachro jachro temporarily deployed to renku-ci-gr-1652 August 25, 2023 17:17 — with GitHub Actions Inactive
Copy link
Member

@eikek eikek left a comment

Choose a reason for hiding this comment

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

Wow!! 👏🏼

)
.withHeader(
"Content-Type",
containing(s"${multipart.`form-data`.mainType}/${multipart.`form-data`.subType}")
Copy link
Member

Choose a reason for hiding this comment

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

I think you could use Renderer.renderString(multipart.`form-data`) to render the complete mimetype string. Obviously, just a bean counting detail…

* any non-blank String value
* image - possible values are:
* `null` for removing the current image
* any file content
Copy link
Member

Choose a reason for hiding this comment

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

again embarassingly bean counting :) should we write "image file" - perhaps there are supported images and some not supported - is there also a max file size?

url = ${?RENKU_CORE_LATEST_URL}
}

renku-core-service-urls = ${?RENKU_CORE_SERVICE_URLS}
Copy link
Member

Choose a reason for hiding this comment

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

There is no sensible default possible, right? Was just thinking how the RenkuCoreUri#ForSchema is working - i.e. which kind of value is expected - an array?

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 see your point. Unfortunately, I'm not sure if we can default to something as we expect the schema version to be encoded into the hostname. I mean, we could default to, let's say http://renku-core-v10, but in case you'd like to run it successfully, a relevant entry in the /etc/hosts would need to be added. Maybe I'll add such a default.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, I see, not easy - then it's good to leave it. So an entry in /etc/hosts is required? Or "just" a resolvable url? (from the pov of the module)

override def tailRecM[A, B](a: A)(f: A => NestedF[Either[A, B]]): NestedF[B] = Nested {
f(a).value >>= {
case Result.Success(Right(vb)) => Result.success(vb).pure[F]
case Result.Success(Left(va)) => tailRecM(va)(f).value
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if that is really tail recursive? Perhaps we can capture the type class for Nested and delegate to it 🤔


override def tailRecM[A, B](a: A)(f: A => Result[Either[A, B]]): Result[B] =
flatMap(f(a)) {
case Left(v) => tailRecM[A, B](v)(f)
Copy link
Member

Choose a reason for hiding this comment

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

Same thoughts as for NestedF about tail recursiveness... I know we have similar things in the tests, but maybe on prod code we can double check here?

@jachro jachro temporarily deployed to renku-ci-gr-1652 August 30, 2023 10:50 — with GitHub Actions Inactive
@jachro jachro deployed to renku-ci-gr-1652 August 30, 2023 15:26 — with GitHub Actions Active
@jachro jachro merged commit 3666c67 into development Aug 30, 2023
11 of 15 checks passed
@jachro jachro deleted the 1631-renku-core-client branch August 30, 2023 15:53
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.

Project Update API to allow modyfying project keywords
3 participants