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

Add fixes for optional uaa-target flag #640

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

sneal
Copy link
Member

@sneal sneal commented Apr 17, 2024

Lazily validate target URLs to avoid interfering with connectionless commands like help and interpolate

@cf-gitbot
Copy link
Member

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

@rhall-pivotal
Copy link
Member

Hi @sneal - sorry it took so long for someone to review this.

I pulled in the changes today and rebased main onto the branch, then ran tests by running the following:

CGO_ENGABLED=1 ginkgo -r -race -succinct -nodes 4 -randomizeAllSpecs -randomizeSuites -keepGoing .

Unfortunately there were quite a few test failures resulting from your changes:

CGO_ENGABLED=1 ginkgo -r -race -succinct -nodes 4 -randomizeAllSpecs -randomizeSuites -keepGoing .
[1721420056] Tile Generator Integration Suite - 4 specs - 4 nodes •••• SUCCESS! 229.790834ms 
[1721420056] Modify Suite - 19 specs - 4 nodes ••••••••••••••••••• SUCCESS! 834.989084ms 
[1721420056] Executor Suite - 4 specs - 4 nodes ••# github.com/shirou/gopsutil/disk
iostat_darwin.c:28:2: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:143:1: note: 'IOMasterPort' has been explicitly marked deprecated here
# github.com/pivotal-cf/om/configtemplate/metadata.test
ld: warning: '/private/var/folders/gc/nfttbxg53ld0yh9t3dlx73dw0000gq/T/go-link-205285856/000015.o' has malformed LC_DYSYMTAB, expected 98 undefined symbols to start at index 1626, found 95 undefined symbols starting at index 1626

•• SUCCESS! 2.335330292s 
# github.com/shirou/gopsutil/disk
iostat_darwin.c:28:2: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:143:1: note: 'IOMasterPort' has been explicitly marked deprecated here
# github.com/pivotal-cf/om/commands.test
ld: warning: '/private/var/folders/gc/nfttbxg53ld0yh9t3dlx73dw0000gq/T/go-link-3514613559/000015.o' has malformed LC_DYSYMTAB, expected 98 undefined symbols to start at index 1626, found 95 undefined symbols starting at index 1626

[1721420056] ConfigFetchers Suite - 42 specs - 4 nodes ••••••••••••••••••••••••••••••••••••••••# github.com/shirou/gopsutil/disk
iostat_darwin.c:28:2: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:143:1: note: 'IOMasterPort' has been explicitly marked deprecated here
# github.com/pivotal-cf/om/presenters.test
ld: warning: '/private/var/folders/gc/nfttbxg53ld0yh9t3dlx73dw0000gq/T/go-link-1513811446/000015.o' has malformed LC_DYSYMTAB, expected 98 undefined symbols to start at index 1626, found 95 undefined symbols starting at index 1626

•• SUCCESS! 1.048519375s 
[1721420056] Configparser Suite - 2 specs - 4 nodes •• SUCCESS! 5.453917ms 
# github.com/shirou/gopsutil/disk
iostat_darwin.c:28:2: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:143:1: note: 'IOMasterPort' has been explicitly marked deprecated here
# github.com/pivotal-cf/om/download_clients.test
ld: warning: '/private/var/folders/gc/nfttbxg53ld0yh9t3dlx73dw0000gq/T/go-link-2493413679/000015.o' has malformed LC_DYSYMTAB, expected 98 undefined symbols to start at index 1626, found 95 undefined symbols starting at index 1626

[1721420056] commands - 517 specs - 4 nodes ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• SUCCESS! 353.054667ms 
[1721420056] Metadata Suite - 2 specs - 4 nodes •• SUCCESS! 7.074708ms 
[1721420056] Formcontent Suite - 7 specs - 4 nodes ••••••• SUCCESS! 7.263125ms 
[1721420056] Stub Suite - 8 specs - 4 nodes •••••••• SUCCESS! 1.050762416s 
[1721420056] validator - 2 specs - 4 nodes •• SUCCESS! 3.00775ms 
Failed to compile network:

# github.com/pivotal-cf/om/network [github.com/pivotal-cf/om/network.test]
network/unauthenticated_client.go:15:6: syntax error: unexpected NewUnauthenticatedClient, expected (
network/unauthenticated_client.go:27:82: syntax error: unexpected { at end of statement
[1721420056] extractor - 15 specs - 4 nodes ••••••••••••••• SUCCESS! 44.309291ms 
[1721420056] presenters - 14 specs - 4 nodes •••••••••••••• SUCCESS! 8.948416ms 
[1721420056] api - 399 specs - 4 nodes ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• SUCCESS! 387.123083ms 
[1721420056] Stub Suite - 8 specs - 4 nodes •••••••• SUCCESS! 1.012837875s 
Failed to compile acceptance:

# github.com/shirou/gopsutil/disk
iostat_darwin.c:28:2: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:143:1: note: 'IOMasterPort' has been explicitly marked deprecated here
# github.com/pivotal-cf/om/network
network/unauthenticated_client.go:15:6: syntax error: unexpected NewUnauthenticatedClient, expected (
network/unauthenticated_client.go:27:82: syntax error: unexpected { at end of statement
[1721420056] VM Lifecycle Suite - 219 specs - 4 nodes ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• SUCCESS! 2.570376375s 
[1721420056] Interpolate Suite - 20 specs - 4 nodes •••••••••••••••••••• SUCCESS! 29.163959ms 
[1721420056] Tile Suite - 92 specs - 4 nodes •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• SUCCESS! 2.205696s 
[1721420056] Matchers Suite - 8 specs - 4 nodes •••••••• SUCCESS! 7.623042ms 
[1721420056] ExtractOpsmanSemver Suite - 6 specs - 4 nodes •••••• SUCCESS! 6.079167ms 
[1721420056] Runner Suite - 6 specs - 4 nodes •••••• SUCCESS! 49.165667ms 
[1721420056] Depstability Suite - 1 specs - 4 nodes • SUCCESS! 97.26325ms 
[1721420056] Generator Suite - 15 specs - 4 nodes ••••••••••••••• SUCCESS! 36.463ms 
[1721420056] VMManagers Suite - 224 specs - 4 nodes •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
------------------------------
• Failure [0.001 seconds]
select the correct vmmanager instance given the correct config valid azure config [It] returns the azure vmmanager instance 
/Users/hallr/workspace/om/vmlifecycle/vmmanagers/initialize_test.go:59

  Unexpected error:
      <*fmt.wrapError | 0xc00051c1c0>: 
      the cli 'az' is not available in PATH: exec: "az": executable file not found in $PATH
      {
          msg: "the cli 'az' is not available in PATH: exec: \"az\": executable file not found in $PATH",
          err: <*exec.Error | 0xc00051c140>{
              Name: "az",
              Err: <*errors.errorString | 0x102f86ef0>{
                  s: "executable file not found in $PATH",
              },
          },
      }
  occurred

  /Users/hallr/workspace/om/vmlifecycle/vmmanagers/initialize_test.go:64
------------------------------
•••••••••••••
------------------------------
• Failure [0.001 seconds]
select the correct vmmanager instance given the correct config valid openstack config [It] returns the openstack vmmanager instance 
/Users/hallr/workspace/om/vmlifecycle/vmmanagers/initialize_test.go:74

  Unexpected error:
      <*fmt.wrapError | 0xc000154980>: 
      the cli 'openstack' is not available in PATH: exec: "openstack": executable file not found in $PATH
      {
          msg: "the cli 'openstack' is not available in PATH: exec: \"openstack\": executable file not found in $PATH",
          err: <*exec.Error | 0xc0001547e0>{
              Name: "openstack",
              Err: <*errors.errorString | 0x10526aef0>{
                  s: "executable file not found in $PATH",
              },
          },
      }
  occurred

  /Users/hallr/workspace/om/vmlifecycle/vmmanagers/initialize_test.go:79
------------------------------
••••••••••••••••••••••••••••••••••••••••••

Summarizing 2 Failures:

[Fail] select the correct vmmanager instance given the correct config valid azure config [It] returns the azure vmmanager instance 
/Users/hallr/workspace/om/vmlifecycle/vmmanagers/initialize_test.go:64

[Fail] select the correct vmmanager instance given the correct config valid openstack config [It] returns the openstack vmmanager instance 
/Users/hallr/workspace/om/vmlifecycle/vmmanagers/initialize_test.go:79

Ran 224 of 224 Specs in 0.702 seconds
FAIL! -- 222 Passed | 2 Failed | 0 Pending | 0 Skipped

[1721420056] Integration Suite - 7 specs - 4 nodes 
------------------------------
Failure [0.334 seconds]
[BeforeSuite] BeforeSuite 
/Users/hallr/workspace/om/vmlifecycle/acceptance/integration_suite_test.go:25

  Unexpected error:
      <*errors.errorString | 0xc0001a4020>: 
      Failed to build github.com/pivotal-cf/om:
      
      Error:
      exit status 1
      
      Output:
      # github.com/shirou/gopsutil/disk
      iostat_darwin.c:28:2: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:143:1: note: 'IOMasterPort' has been explicitly marked deprecated here
      # github.com/pivotal-cf/om/network
      ../../network/unauthenticated_client.go:15:6: syntax error: unexpected NewUnauthenticatedClient, expected (
      ../../network/unauthenticated_client.go:27:82: syntax error: unexpected { at end of statement
      
      {
          s: "Failed to build github.com/pivotal-cf/om:\n\nError:\nexit status 1\n\nOutput:\n# github.com/shirou/gopsutil/disk\niostat_darwin.c:28:2: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:143:1: note: 'IOMasterPort' has been explicitly marked deprecated here\n# github.com/pivotal-cf/om/network\n../../network/unauthenticated_client.go:15:6: syntax error: unexpected NewUnauthenticatedClient, expected (\n../../network/unauthenticated_client.go:27:82: syntax error: unexpected { at end of statement\n",
      }
  occurred

  /Users/hallr/workspace/om/vmlifecycle/acceptance/integration_suite_test.go:29
------------------------------
Failure [0.358 seconds]
[BeforeSuite] BeforeSuite 
/Users/hallr/workspace/om/vmlifecycle/acceptance/integration_suite_test.go:25

  BeforeSuite on Node 1 failed

  /Users/hallr/workspace/om/vmlifecycle/acceptance/integration_suite_test.go:25
------------------------------
Failure [0.358 seconds]
[BeforeSuite] BeforeSuite 
/Users/hallr/workspace/om/vmlifecycle/acceptance/integration_suite_test.go:25

  BeforeSuite on Node 1 failed

  /Users/hallr/workspace/om/vmlifecycle/acceptance/integration_suite_test.go:25
------------------------------
Failure [0.357 seconds]
[BeforeSuite] BeforeSuite 
/Users/hallr/workspace/om/vmlifecycle/acceptance/integration_suite_test.go:25

  BeforeSuite on Node 1 failed

  /Users/hallr/workspace/om/vmlifecycle/acceptance/integration_suite_test.go:25
------------------------------

Ran 28 of 0 Specs in 0.389 seconds
FAIL! -- 0 Passed | 28 Failed | 0 Pending | 0 Skipped

[1721420056] Docstest Suite - 2 specs - 4 nodes 
------------------------------
Failure [0.279 seconds]
[BeforeSuite] BeforeSuite 
/Users/hallr/workspace/om/docstest/docs_suite_test.go:18

  Unexpected error:
      <*errors.errorString | 0xc00031c0e0>: 
      Failed to build ../main.go:
      
      Error:
      exit status 1
      
      Output:
      # github.com/shirou/gopsutil/disk
      iostat_darwin.c:28:2: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:143:1: note: 'IOMasterPort' has been explicitly marked deprecated here
      # github.com/pivotal-cf/om/network
      ../network/unauthenticated_client.go:15:6: syntax error: unexpected NewUnauthenticatedClient, expected (
      ../network/unauthenticated_client.go:27:82: syntax error: unexpected { at end of statement
      
      {
          s: "Failed to build ../main.go:\n\nError:\nexit status 1\n\nOutput:\n# github.com/shirou/gopsutil/disk\niostat_darwin.c:28:2: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:143:1: note: 'IOMasterPort' has been explicitly marked deprecated here\n# github.com/pivotal-cf/om/network\n../network/unauthenticated_client.go:15:6: syntax error: unexpected NewUnauthenticatedClient, expected (\n../network/unauthenticated_client.go:27:82: syntax error: unexpected { at end of statement\n",
      }
  occurred

  /Users/hallr/workspace/om/docstest/docs_suite_test.go:21
------------------------------
Failure [0.308 seconds]
[BeforeSuite] BeforeSuite 
/Users/hallr/workspace/om/docstest/docs_suite_test.go:18

  BeforeSuite on Node 1 failed

  /Users/hallr/workspace/om/docstest/docs_suite_test.go:18
------------------------------
Failure [0.308 seconds]
[BeforeSuite] BeforeSuite 
/Users/hallr/workspace/om/docstest/docs_suite_test.go:18

  BeforeSuite on Node 1 failed

  /Users/hallr/workspace/om/docstest/docs_suite_test.go:18
------------------------------
Failure [0.308 seconds]
[BeforeSuite] BeforeSuite 
/Users/hallr/workspace/om/docstest/docs_suite_test.go:18

  BeforeSuite on Node 1 failed

  /Users/hallr/workspace/om/docstest/docs_suite_test.go:18
------------------------------

Ran 8 of 0 Specs in 0.334 seconds
FAIL! -- 0 Passed | 8 Failed | 0 Pending | 0 Skipped

[1721420056] renderers - 10 specs - 4 nodes •••••••••• SUCCESS! 10.303916ms 
Failed to compile cmd:

# github.com/shirou/gopsutil/disk
iostat_darwin.c:28:2: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:143:1: note: 'IOMasterPort' has been explicitly marked deprecated here
# github.com/pivotal-cf/om/network
network/unauthenticated_client.go:15:6: syntax error: unexpected NewUnauthenticatedClient, expected (
network/unauthenticated_client.go:27:82: syntax error: unexpected { at end of statement
[1721420056] download_clients - 66 specs - 4 nodes •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• SUCCESS! 80.554666ms 

There were failures detected in the following suites:
           network ./network
        acceptance ./acceptance
        vmmanagers ./vmlifecycle/vmmanagers
        acceptance ./vmlifecycle/acceptance
          docstest ./docstest
               cmd ./cmd

Ginkgo ran 30 suites in 54.722346917s
Test Suite Failed

These two results can be ignored:

/Users/hallr/workspace/om/vmlifecycle/vmmanagers/initialize_test.go:79
/Users/hallr/workspace/om/vmlifecycle/vmmanagers/initialize_test.go:59

I'm happy to chat further about this if you'd like to. Sorry again for the delay in response!

@sneal
Copy link
Member Author

sneal commented Jul 20, 2024

@rhall-pivotal Would you like me to rebase the branch? I don't get the unauthenticated_client.go compilation errors on the uaa-target branch you're seeing in a couple of the suites.

@rhall-pivotal
Copy link
Member

@sneal - yes if you could. I'll re-pull and re-test again once you have rebased.

- The UAA target defaults to /uaa on Operations Manager, but can now be
overridden in cases where UAA is not located at the default location.
- Consistently parse target and allow http(s):// protocol prefix.
@rhall-pivotal
Copy link
Member

@sneal - Testing locally produced better results this time. merging

@rhall-pivotal rhall-pivotal merged commit 5402fc2 into pivotal-cf:main Jul 23, 2024
1 check passed
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.

None yet

3 participants