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

🔄 synced file(s) with nebari-dev/nebari #526

Merged
merged 4 commits into from
Oct 29, 2024

Conversation

nebari-sensei
Copy link
Contributor

@nebari-sensei nebari-sensei commented Sep 17, 2024

synced local file(s) with nebari-dev/nebari.

Changed files
  • synced local docs/docs/references/RELEASE.md with remote RELEASE.md

This PR was created automatically by the repo-file-sync-action workflow run #11078400861

Copy link

netlify bot commented Sep 17, 2024

Deploy Preview for nebari-docs ready!

Name Link
🔨 Latest commit 1815d21
🔍 Latest deploy log https://app.netlify.com/sites/nebari-docs/deploys/6721252131d81e000813e9d1
😎 Deploy Preview https://deploy-preview-526--nebari-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kcpevey kcpevey added the DO-NOT-MERGE This is not ready for merge label Sep 23, 2024
@kcpevey
Copy link
Contributor

kcpevey commented Sep 23, 2024

This PR is syncing release notes from the main repo. However, there are syntax errors with docusaurus v3. Essentially, I fixed these issues in the docusaurus v3 PR, but since this file is auto-pushed from the main repo, those changes need to be made over there.

@nebari-sensei nebari-sensei force-pushed the repo-sync/nebari/default branch 2 times, most recently from 39f41f2 to e754473 Compare September 27, 2024 14:15
@marcelovilla
Copy link
Member

@kcpevey given that the release notes are automatically generated by GitHub Releases, is there anything else we can do on the docs side? Or do we need to come up with some kind of pre-processing on the GHA workflow to make whatever changes are needed?

@viniciusdc
Copy link
Contributor

Hi @marcelovilla, This has been discussed previously. What we need to do to unblock this is to run the same validation we run here in the docs in the current source code to assert that these files are compatible with Docssaurus.

However, last week, I suggested that instead of performing this, it seems counterproductive, in my opinion. Instead, we could fetch the RELEASE.md from the github repo during runtime in the docs.

Here's a similar thing that I did for the schema json (though on draft):

const defaultSchema: Schema = {
    title: "ConfigSchema",
    description: "The configuration schema for Nebari.",
    type: "object",
    properties: {}
};

function useSchema(schemaUrl: string, useLocal = false) {
    const [schema, setSchema] = useState<Schema>(defaultSchema);
    const [loading, setLoading] = useState(true);
    const [error, setError] = useState<string | null>(null);

    useEffect(() => {
        if (useLocal) {
            const resolver = new Resolver();
            resolver.resolve(JSONSchema, {}).then((resolvedSchema) => {
                setSchema(resolvedSchema.result);
            });
            setLoading(false);
            setError(null);
        } else {
            async function fetchSchema() {
                try {
                    const response = await fetch(schemaUrl, { headers: { 'Accept': 'application/json' } });
                    if (!response.ok) {
                        throw new Error(`Failed to fetch schema: ${response.status} ${response.statusText}`);
                    }

                    const json = await response.json();
                    const resolver = new Resolver();
                    const resolvedSchema = await resolver.resolve(json, {});
                    setSchema(resolvedSchema.result);
                } catch (err) {
                    console.error('Error:', err);
                    setError(err.message);
                } finally {
                    setLoading(false);
                }
            }

            fetchSchema();
        }
    }, [schemaUrl, useLocal]);

    return { schema, loading, error };
}

@marcelovilla marcelovilla merged commit 72b3b6f into main Oct 29, 2024
6 checks passed
@marcelovilla marcelovilla deleted the repo-sync/nebari/default branch October 29, 2024 18:37
@marcelovilla marcelovilla removed the DO-NOT-MERGE This is not ready for merge label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done 💪🏾
Development

Successfully merging this pull request may close these issues.

4 participants