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

Allow java_version 21 for app services. fixes #25490 #26304

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

computerlove
Copy link

@computerlove computerlove commented Jun 12, 2024

Community Note

  • Please vote on this PR by adding a 👍 reaction to the original PR to help the community and maintainers prioritize for review
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for PR followers and do not help prioritize for review

Description

Add Java 21 as a allowed value for webapp services.

PR Checklist

  • I have followed the guidelines in our Contributing Documentation.
  • I have checked to ensure there aren't other open Pull Requests for the same update/change.
  • I have checked if my changes close any open issues. If so please include appropriate closing keywords below.
  • I have updated/added Documentation as required written in a helpful and kind way to assist users that may be unfamiliar with the resource / data source.
  • I have used a meaningful PR title to help maintainers and other users understand this change and help prevent duplicate work.

Changes to existing Resource / Data Source

  • I have added an explanation of what my changes do and why I'd like you to include them (This may be covered by linking to an issue above, but may benefit from additional explanation).
  • I have written new tests for my resource or datasource changes & updated any relevent documentation.
  • I have successfully run unit tests with my changes locally.

Testing

  • My submission includes Test coverage as described in the Contribution Guide and the tests pass. (if this is not possible for any reason, please include details of why you did or could not add test coverage)

Change Log

Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.

  • azurerm_linux_web_app - Support Java 21. (#25490)
  • azurerm_windows_web_app - Support Java 21. (#25490)
  • azurerm_linux_function_app - Support Java 21. (#24754)
  • azurerm_windows_function_app - Support Java 21. (#24754)

This is a (please select all that apply):

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

Related Issue(s)

Fixes #25490, fixes #24754

Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

Hey @computerlove! Thanks for this PR but we've got some failing tests because the new values wasn't added to the correct schema or the tests aren't testing the right resource.

=== RUN   TestAccAppService_windowsJava21Java
=== PAUSE TestAccAppService_windowsJava21Java
=== CONT  TestAccAppService_windowsJava21Java
    testcase.go:113: Step 1/2 error: Error running pre-apply refresh: exit status 1
        Error: expected site_config.0.java_version to be one of ["1.7" "1.8" "11"], got 21
          with azurerm_app_service.test,
          on terraform_plugin_test.tf line 48, in resource "azurerm_app_service" "test":
          48:     java_version           = "21"
--- FAIL: TestAccAppService_windowsJava21Java (11.10s)
=== CONT  TestAccAppService_windowsJava17Java
    testcase.go:113: Step 1/2 error: Error running pre-apply refresh: exit status 1
        Error: expected site_config.0.java_version to be one of ["1.7" "1.8" "11"], got 17
          with azurerm_app_service.test,
          on terraform_plugin_test.tf line 48, in resource "azurerm_app_service" "test":
          48:     java_version           = "17"
--- FAIL: TestAccAppService_windowsJava17Java (11.67s)

internal/services/web/app_service_resource_test.go Outdated Show resolved Hide resolved
@computerlove
Copy link
Author

@mbfrahry When I update the conflict in CHANGELOG.md, should the change be amended and force pushed, or is a merge commit OK?

@stephybun
Copy link
Member

@computerlove, we take care of updating the CHANGELOG.md after a PR has been merged, so if there are any changes in there they should be removed. We recommend rebasing your changes on top of main, but merging changes from main into your branch is also acceptable.

@computerlove
Copy link
Author

Ok, I have rebased and pushed with not changes to CHANGELOG.md.

Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

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

Thanks @computerlove! I think we're also missing a test for linux function app?

@computerlove
Copy link
Author

Yeah, looks like it.
Added one now.

Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

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

Most of the tests look good, just one is failing, the Linux Web App test needs to have the check updated

…#25490, hashicorp#24754

Signed-off-by: Marvin B. Lillehaug <marvin.lillehaug@nte.no>
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

looks like we have a test failure here

------- Stdout: -------
=== RUN   TestAccLinuxWebApp_withJre21Java
=== PAUSE TestAccLinuxWebApp_withJre21Java
=== CONT  TestAccLinuxWebApp_withJre21Java
    testcase.go:130: Step 1/3 error: After applying this test step, the non-refresh plan was not empty.
        stdout:
        
        
        Terraform used the selected providers to generate the following execution
        plan. Resource actions are indicated with the following symbols:
          ~ update in-place
        
        Terraform will perform the following actions:
        
          # azurerm_linux_web_app.test will be updated in-place
          ~ resource "azurerm_linux_web_app" "test" {
                id                                             = "/subscriptions/*******/resourceGroups/acctestRG-240815145037738884/providers/Microsoft.Web/sites/acctestWA-240815145037738884"
                name                                           = "acctestWA-240815145037738884"
                # (20 unchanged attributes hidden)
        
              ~ site_config {
                    # (24 unchanged attributes hidden)
        
                  ~ application_stack {
                      + java_version        = "21"
                        # (2 unchanged attributes hidden)
                    }
                }
            }
        
        Plan: 0 to add, 1 to change, 0 to destroy.
--- FAIL: TestAccLinuxWebApp_withJre21Java (250.56s)
FAIL

@computerlove
Copy link
Author

Yeah, no idea what that means.
Changing the expected version string fails in the expected way. So it seems that this is something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Java 21 for azurerm_linux_web_app Java 21 support for azurerm_linux_function_app
4 participants