Skip to content

Ipv6 validation for Javaspring apps - #1565

Merged
iaftab-alam merged 8 commits into
cloudfoundry:developfrom
sap-contributions:CFDEPLOY-206-ipv6-validation-javaspring
May 26, 2025
Merged

Ipv6 validation for Javaspring apps#1565
iaftab-alam merged 8 commits into
cloudfoundry:developfrom
sap-contributions:CFDEPLOY-206-ipv6-validation-javaspring

Conversation

@Milena-Encheva

Copy link
Copy Markdown
Contributor

Are you submitting this PR against the develop branch?

Yes.

What is this change about?

The change is part of the ipv6 egress validation cycle. We progressively extend all of the exciting buildpacks relevant to our ecosystem. In this PR we provide additional endpoints in the Java Spring application for testing IPv6 support. In case ipv6 validation is enabled, we verify that egress ipv6 call are possible with Java Spring applications.

Please provide contextual information.

https://github.com/cloudfoundry/community/blob/main/toc/rfc/rfc-0038-ipv6-dual-stack-for-cf.md

What version of cf-deployment have you run this cf-acceptance-test change against?

v48.9.0

Please check all that apply for this PR:

  • introduces a new test --- Are you sure everyone should be running this test?
  • changes an existing test
  • requires an update to a CATs integration-config

Did you update the README as appropriate for this change?

  • YES
  • N/A

If you are introducing a new acceptance test, what is your rationale for including it CATs rather than your own acceptance test suite?

_CATs should validate IPv6 egress calls with JavaSpring application. We add changes regarding to this buildpack only. The test group for ipv6 was already created.

How many more (or fewer) seconds of runtime will this change introduce to CATs?

Around 90 seconds per test.

What is the level of urgency for publishing this change?

  • Urgent - unblocks current or future work
  • Slightly Less than Urgent

Tag your pair, your PM, and/or team!

@oliver-heinrich @iaftab-alam

@jochenehret
jochenehret requested review from a team May 13, 2025 14:40
Comment thread ipv6/ipv6.go Outdated
Comment thread ipv6/ipv6.go Outdated
}

commandOptions := []string{"push", appName, "-m", memoryLimit, "-s", stack}
if manifestFile != "" {

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.

Wouldn't it be easier to add the path to the Spring app to the list of assets here:

JavaSpringZip: "assets/java-spring/target/spring-boot-trivial-app-0.0.1.jar",

and then just use this folder for the cf push -p parameter?

Comment thread ipv6/ipv6.go Outdated

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.

Should this binary file really be changed?

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.

After additional testing, my conclusion is that this .jar file should be changed because of the functional changes in the .java file. I think new compilation is needed.

Comment thread ipv6/ipv6.go Outdated
"-s", stack,
).Wait(Config.DetectTimeoutDuration())).To(Exit(0))

if assetPath == "" {

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 checks for assetPath == "" look a bit odd. As the Java Spring app requires a different logic, can you try to move that coding into a separate function? E.g. describeIPv6JavaSpring?

@jochenehret jochenehret 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.

Just 2 small comments, looks good overall!

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.

Should this jar really be changed?

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 JAR file must be updated because the .java files have changed, adding new endpoints. Without updating the JAR file, it won't reflect these changes. This leads to errors when running the application and the tests afterwards:

  [FAILED] Expected
      <string>: {"timestamp":"2025-05-22T14:18:00.317+00:00","status":404,"error":"Not Found","path":"/ipv4-test"}
  to contain substring
      <string>: IPv4 validation resulted in success

Comment thread ipv6/ipv6.go Outdated
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