Skip to content
This repository was archived by the owner on Dec 20, 2025. It is now read-only.

fix(core): In baseProvider, fixed autoselection of React stage - #6673

Merged
alanmquach merged 2 commits into
spinnaker:masterfrom
alanmquach:fix-base-provider-stage
Mar 12, 2019
Merged

alanmquach merged 2 commits into
spinnaker:masterfrom
alanmquach:fix-base-provider-stage

Conversation

@alanmquach

Copy link
Copy Markdown
Contributor

This doesn't feel great to me but it fixes things.

The problem was that when

  1. There is only a single cloud provider configured for a stage that supports multiple
  2. That stage is a React stage

We get an Invariant Violation: Target container is not a DOM element. because we try to immediately auto-select the only cloud provider, but the .react-stage-details div has not been mounted yet.

This defers the React render until after the digest cycle completes. Not great, but I think this can probably hold us over until we port the baseProvider code over to React (soon).

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yikes. Thanks for catching that.

@alanmquach
alanmquach merged commit 7a49d82 into spinnaker:master Mar 12, 2019
@alanmquach
alanmquach deleted the fix-base-provider-stage branch March 12, 2019 17:56
@alanmquach

Copy link
Copy Markdown
Contributor Author

@sbwsg Anytime. Does this need to be cherry-picked to the other releases?

@ghost

ghost commented Mar 12, 2019

Copy link
Copy Markdown

Ah yes good call.

@ghost

ghost commented Mar 12, 2019

Copy link
Copy Markdown

@spinnakerbot cherry-pick 1.12

@spinnakerbot

Copy link
Copy Markdown
Contributor

Cherry pick failed: Command failed (cherry pick commit 7a49d82) with exit code 1:

error: could not apply 7a49d8222... fix(core): In baseProvider, fixed autoselection of React stage (#6673)
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'

alanmquach added a commit to alanmquach/deck that referenced this pull request Mar 12, 2019
7a49d82 fix(core): In baseProvider, fixed autoselection of React stage (spinnaker#6673)
alanmquach added a commit that referenced this pull request Mar 12, 2019
7a49d82 fix(core): In baseProvider, fixed autoselection of React stage (#6673)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants