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

Adds support for showing the Pulumi Copilot sidebar on the docs site #12905

Merged
merged 10 commits into from
Sep 27, 2024

Conversation

foot
Copy link
Contributor

@foot foot commented Sep 23, 2024

Proposed changes

Adds support for showing the Pulumi Copilot sidebar on the docs site

Notes

  • Adds a route to the copilot host so that the iframe is SAMEORIGIN with the docs
    • This allows it to React.portal into the doc and interact w/ the page a bit.
    • This requires some tweaks to SecurityPolicy to allow the Copilot path to be iframe'd too

@pulumi-bot
Copy link
Collaborator

Your site preview for commit 74c06eb0 is ready! 🎉

http://www-testing-pulumi-docs-origin-pr-12905-74c06eb0.s3-website.us-west-2.amazonaws.com.

infrastructure/index.ts Outdated Show resolved Hide resolved
@pulumi-bot
Copy link
Collaborator

@pulumi-bot
Copy link
Collaborator

infrastructure/index.ts Outdated Show resolved Hide resolved
@pulumi-bot
Copy link
Collaborator

@foot foot marked this pull request as ready for review September 26, 2024 16:09
@cnunciato cnunciato requested review from a team and sean1588 September 27, 2024 00:31
Copy link
Contributor

@cnunciato cnunciato left a comment

Choose a reason for hiding this comment

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

Looks great @foot! Leaving an approval to unblock, but two things before we merge:

  • I'd love to get a 👍🏻 from @sean1588 as well, just so we're all on the same page with this
  • We'll need to fix up those lines in infrastructure/index.ts once the prod stack is ready to go

Copy link
Member

@sean1588 sean1588 left a comment

Choose a reason for hiding this comment

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

These changes look good to me @foot! Nice work here!!

@@ -59,8 +59,10 @@ const config = {
marketingPortalStack: stackConfig.get("marketingPortalStack"),
};

const aiAppStack = new pulumi.StackReference('pulumi/pulumi-ai-app-infra/prod');
// const aiAppStack = new pulumi.StackReference('pulumi/pulumi-ai-app-infra/prod');
const aiAppStack = new pulumi.StackReference('pulumi/pulumi-ai-app-infra/pr-pulumi-pulumi.ai-1297');
Copy link
Member

Choose a reason for hiding this comment

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

can we make the stack reference itself a config value that is specified in the stack config, instead of hard coding it, since it appears to be environment specific?

unless we only have one environment for the ai stack that all docs stacks will reference then maybe this is ok

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We'll only have a one env really. Its a bit hard to align all the CORS etc to get this going on the test previews for now.

But I still like the idea a lot. Will do a follow up PR.

layouts/partials/copilot/sidebar.html Show resolved Hide resolved
@pulumi-bot
Copy link
Collaborator

@foot foot merged commit bae4315 into master Sep 27, 2024
6 checks passed
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.

4 participants