Skip to content

Create/Update route options#1339

Open
theghost5800 wants to merge 4 commits into
cloudfoundry:mainfrom
theghost5800:routeOptions
Open

Create/Update route options#1339
theghost5800 wants to merge 4 commits into
cloudfoundry:mainfrom
theghost5800:routeOptions

Conversation

@theghost5800

Copy link
Copy Markdown
Contributor

Refactor _RouteOptions class to handle added options in future

Refactor _RouteOptions class to handle added options in future
@theghost5800

Copy link
Copy Markdown
Contributor Author

@Kehrlann Is it necessary something else to be added before code review to be done?

@Kehrlann Kehrlann self-requested a review April 7, 2026 08:04

@Kehrlann Kehrlann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for your contribution.
Could you please also add an integration test, even if you can't run it?


/**
* The loadbalancing
* All route options, including unknown future keys.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That's not a pattern we use anywhere, I don't think we should introduce it unless we have a very good reason to have it for this one specific sub-resource.

Otherwise, let's just add the hashes for now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The reason why this pattern is used is because the client library doesn't keep up well with all new features introduced in Cloudfoundry API and it's annoying that consumers of cf-java-client library cannot use latest available features until it's contributed and released. So if there is an option to make some logic more generic, I think it's better for all users. What do you think?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is an interesting idea, but I don't want to add it on a class-by-class basis. Is there a way to add it to our Immutables and-or JSON config?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have a look for some generic solution but it won't be easy to implement, so I go back to previous way of implementation by adding missing parameter options. I have added also integration test but I couldn't run it, so I hope that you can run and give back feedback is it okay.

@theghost5800

Copy link
Copy Markdown
Contributor Author

@Kehrlann Do you have any other comments? Is there any issues with new integration test run?


PCF_2_13(Version.forIntegers(2, 186, 0)),

PCF_2_14(Version.forIntegers(2, 248, 0)),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As we are dealing with an v3-API it would be more apropriate to use the version number 3.183.0, which is in the same capi-release.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we don't have version checking for v3 so I'm fine with this.
With the environments we're running, I don't think the gate matters, they're all way ahead of 2.248 (CAPI 1.198)

@Lokowandtg Lokowandtg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The integration tests work and the code looks good.

@Lokowandtg Lokowandtg requested a review from Kehrlann July 8, 2026 08:53
@Kehrlann

Kehrlann commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

@theghost5800 do you need this soon? Because if we target main it will only go in with version 6.0 and I have no timeline for that.

@theghost5800

Copy link
Copy Markdown
Contributor Author

@theghost5800 do you need this soon? Because if we target main it will only go in with version 6.0 and I have no timeline for that.

I am expecting this change for quite long time. So I am looking to use this feature with next release of the client library. If main branch won't be release anytime soon, please advice which branch must be targeted.

@Lokowandtg

Copy link
Copy Markdown
Contributor

Please target branch 5.x.x

@theghost5800

Copy link
Copy Markdown
Contributor Author

I have opened another PR to target branch 5.x.x - #1365

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.

3 participants