Skip to content

CreateDefaultBuilder_SecretsDoesReload test failed in CI #48696

Closed

Description

@stephentoub

https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-48684-merge-1dda5503a115420687/Microsoft.Extensions.Hosting.Unit.Tests/console.b5b90d65.log?sv=2019-07-07&se=2021-03-16T05%3A35%3A14Z&sr=c&sp=rl&sig=ytXzgYX%2F6x0X9rBYl8sm%2B1JpNoEfEPjQFQhlMtH69tU%3D

  Discovering: Microsoft.Extensions.Hosting.Unit.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  Microsoft.Extensions.Hosting.Unit.Tests (found 99 test cases)
  Starting:    Microsoft.Extensions.Hosting.Unit.Tests (parallel test collections = on, max threads = 2)
�[40m�[32minfo�[39m�[22m�[49m: Microsoft.Extensions.Hosting.Tests.HostTests[0]
      Request starting
    Microsoft.Extensions.Hosting.Tests.HostTests.CreateDefaultBuilder_SecretsDoesReload [FAIL]
      Assert.Equal() Failure
                                    ↓ (pos 20)
      Expected: Hello ASP.NET Core: f577b280d3814d6c935970a1aadbb8e6
      Actual:   Hello ASP.NET Core: 407a83ef08c04e1ca1e07690cb30dc0a
                                    ↑ (pos 20)
      Stack Trace:
        /_/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostTests.cs(264,0): at Microsoft.Extensions.Hosting.Tests.HostTests.CreateDefaultBuilder_SecretsDoesReload()
        --- End of stack trace from previous location ---
  Finished:    Microsoft.Extensions.Hosting.Unit.Tests

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Feb 24, 2021
  2. eerhardt commented on Feb 24, 2021

    @eerhardt
    Member

    Looking at the test log, it looks like that test took 1 minute to run:

    image

    Looking at the test, it looks like it is waiting for 1 minute:

    config.GetReloadToken().RegisterChangeCallback(o =>
    {
    configReloadedCancelTokenSource.Cancel();
    }, null);
    // Wait for up to 1 minute, if config reloads at any time, cancel the wait.
    await Task.WhenAny(Task.Delay(TimeSpan.FromMinutes(1), configReloadedCancelToken)); // Task.WhenAny ignores the task throwing on cancellation.
    Assert.NotEqual(dynamicConfigMessage1, dynamicConfigMessage2); // Messages are different.
    Assert.Equal(dynamicConfigMessage2, config["Hello"]); // Config DID reload from disk

    So this leads me to believe that the change callback was never invoked, which is why we are getting stale data in the config.

  3. removed
    untriagedNew issue has not been triaged by the area owner
    on Mar 1, 2021
  4. added this to the 6.0.0 milestone on Mar 1, 2021
  5. self-assigned this
    on Mar 1, 2021
  6. stephentoub commented on Mar 29, 2021

    @stephentoub
    MemberAuthor

    Failed again here:
    https://dev.azure.com/dnceng/public/_build/results?buildId=1061100&view=ms.vss-test-web.build-test-results-tab&runId=32699320&paneView=attachments&resultId=181769
    https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-50357-merge-ede7a005545e42cf8b/Microsoft.Extensions.Hosting.Unit.Tests/console.39af16ec.log?sv=2019-07-07&se=2021-04-18T11%3A42%3A53Z&sr=c&sp=rl&sig=k%2BL7uF4zgHywaVYUegb2Pi%2F%2F7AIejrTog53v%2FftznF0%3D

      Discovering: Microsoft.Extensions.Hosting.Unit.Tests (method display = ClassAndMethod, method display options = None)
      Discovered:  Microsoft.Extensions.Hosting.Unit.Tests (found 100 test cases)
      Starting:    Microsoft.Extensions.Hosting.Unit.Tests (parallel test collections = on, max threads = 2)
        Microsoft.Extensions.Hosting.Tests.HostTests.CreateDefaultBuilder_SecretsDoesReload [FAIL]
          Assert.Equal() Failure
                                        ↓ (pos 20)
          Expected: Hello ASP.NET Core: 1466b2f4da5249bdaef71d3aeee50e47
          Actual:   Hello ASP.NET Core: 8ab58f24c0c34494a4a4969709dc8a26
                                        ↑ (pos 20)
          Stack Trace:
            /_/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostTests.cs(264,0): at Microsoft.Extensions.Hosting.Tests.HostTests.CreateDefaultBuilder_SecretsDoesReload()
            --- End of stack trace from previous location ---
    �[40m�[32minfo�[39m�[22m�[49m: Microsoft.Extensions.Hosting.Tests.HostTests[0]
          Request starting
      Finished:    Microsoft.Extensions.Hosting.Unit.Tests
    
  7. added
    blocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
    on Mar 31, 2021
  8. maryamariyan commented on Mar 31, 2021

    @maryamariyan
    Contributor

    The test was added in #43807

  9. removed
    blocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
    on Apr 6, 2021
  10. maryamariyan commented on Apr 6, 2021

    @maryamariyan
    Contributor

    Removed blocking-clean-ci as the ActiveIssue attribute is now added to the test.

    Keeping issue open to track re-enabling it properly

  11. added a commit that references this issue on Apr 19, 2021
  12. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Apr 19, 2021
  13. added a commit that references this issue on Apr 21, 2021
  14. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Apr 21, 2021
  15. ViktorHofer commented on Apr 27, 2021

    @ViktorHofer
    Member

    Happened again in https://dev.azure.com/dnceng/public/_build/results?buildId=1109669&view=ms.vss-test-web.build-test-results-tab&runId=33849264&resultId=182792&paneView=debug

      Discovering: Microsoft.Extensions.Hosting.Unit.Tests (method display = ClassAndMethod, method display options = None)
      Discovered:  Microsoft.Extensions.Hosting.Unit.Tests (found 108 of 109 test cases)
      Starting:    Microsoft.Extensions.Hosting.Unit.Tests (parallel test collections = on, max threads = 2)
        Microsoft.Extensions.Hosting.Tests.HostTests.CreateDefaultBuilder_SecretsDoesReload [FAIL]
          Assert.Equal() Failure
                                        ↓ (pos 20)
          Expected: Hello ASP.NET Core: fd88495f2f6f4395a50b8a8bb9002821
          Actual:   Hello ASP.NET Core: 96d471cc9668492aa1d5528c5d782693
                                        ↑ (pos 20)
          Stack Trace:
            /_/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostTests.cs(315,0): at Microsoft.Extensions.Hosting.Tests.HostTests.CreateDefaultBuilder_SecretsDoesReload()
            --- End of stack trace from previous location ---
    �[40m�[32minfo�[39m�[22m�[49m: Microsoft.Extensions.Hosting.Tests.HostTests[0]
          Request starting
      Finished:    Microsoft.Extensions.Hosting.Unit.Tests
    

    Configuration: net6.0-Linux-Debug-x64-CoreCLR_release-Ubuntu.1604.Amd64.Open

  16. ViktorHofer commented on Apr 27, 2021

    @ViktorHofer
    Member
  17. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on May 7, 2021
  18. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Jun 7, 2021
  19. bartonjs commented on Jun 21, 2021

    @bartonjs
    Member

    And again. https://dev.azure.com/dnceng/public/_build/results?buildId=1179018&view=ms.vss-test-web.build-test-results-tab&runId=35916356&resultId=117977&paneView=debug

    /datadisks/disk1/work/C7C50B48/w/B068098D/e /datadisks/disk1/work/C7C50B48/w/B068098D/e
      Discovering: Microsoft.Extensions.Hosting.Unit.Tests (method display = ClassAndMethod, method display options = None)
      Discovered:  Microsoft.Extensions.Hosting.Unit.Tests (found 109 of 110 test cases)
      Starting:    Microsoft.Extensions.Hosting.Unit.Tests (parallel test collections = on, max threads = 2)
        Microsoft.Extensions.Hosting.Tests.HostTests.CreateDefaultBuilder_SecretsDoesReload [FAIL]
          Assert.Equal() Failure
                                        ↓ (pos 20)
          Expected: Hello ASP.NET Core: d05cbd4bd6cf4e89b5e5a16267814a60
          Actual:   Hello ASP.NET Core: 5d71a4fa37c348828f14c431f252b45e
                                        ↑ (pos 20)
          Stack Trace:
            /_/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostTests.cs(316,0): at Microsoft.Extensions.Hosting.Tests.HostTests.CreateDefaultBuilder_SecretsDoesReload()
            --- End of stack trace from previous location ---
    �[40m�[32minfo�[39m�[22m�[49m: Microsoft.Extensions.Hosting.Tests.HostTests[0]
          Request starting
      Finished:    Microsoft.Extensions.Hosting.Unit.Tests
    === TEST EXECUTION SUMMARY ===
       Microsoft.Extensions.Hosting.Unit.Tests  Total: 115, Errors: 0, Failed: 1, Skipped: 0, Time: 3.639s
    
  20. modified the milestones: 6.0.0, 7.0.0 on Jul 22, 2021
  21. removed their assignment
    on Feb 27, 2022
  22. eerhardt commented on Jul 19, 2022

    @eerhardt
    Member

    Closing as this hasn't failed in over a year. Please re-open if this happens again.

  23. ghost locked as resolved and limited conversation to collaborators on Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions