Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: create app instead of project on pspace init#48

Draft
ps-kwang wants to merge 12 commits into
main from
kwang/pla-2431-pspace-init-should-use-v1apps-endpoint-instead-of-v1projects
Draft

fix: create app instead of project on pspace init #48
ps-kwang wants to merge 12 commits into
main from
kwang/pla-2431-pspace-init-should-use-v1apps-endpoint-instead-of-v1projects

Conversation

@ps-kwang

@ps-kwang ps-kwang commented Jun 30, 2023

Copy link
Copy Markdown
Contributor

I'm actually not clear this is correct because it requires the image and resources specified?

Comment thread commands/init/mod.ts Outdated
Comment thread commands/init/mod.ts
Comment thread commands/init/mod.ts
yield `✨ Created app "${app.config.name}"`;
yield "";
yield fmt.colors.bold("Console URL");
yield new URL(

@jared-paperspace jared-paperspace Jul 5, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh whoops, this URL is wrong now. Should be

 yield new URL(
 `/${team}/apps/${app.id}`,
 env.get("PAPERSPACE_CONSOLE_URL"),
 ) + "";

@jared-paperspace jared-paperspace Jul 5, 2023
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also I think the message in general is off because calling this command will trigger a deploy. I wonder if that's actually desirable. I mean the alternative is to not actually call apps.create({ config }) here I guess, but then there's no project linking etc.

@ps-kwang ps-kwang Jul 5, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was also a little surprised by that. I wouldn't expect that initializing a cli would deploy something. But if we remove that then is the command really necessary?

It seems like maybe init is not the right name, it sounds more like bootstrap or something?

@jared-paperspace jared-paperspace Jul 6, 2023
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ya we need to remove the upsert from the init api and just set up project linking. The command is definitely necessary and named correctly 😄 It's similar to docker init in that it gets you set up with all of the necessary files to start your project. It has the additional step of linking your local directory to a project ID which lets you drop --projectId flags from commands.

@jared-paperspace jared-paperspace Jul 6, 2023
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Screen Shot 2023年07月05日 at 5 35 10 PM

This is what it looks like. You could try using it in the current version of the CLI where the benefits are clear.

Comment thread commands/init/mod.ts
`Project already exists, skipping creation. (link: ${link.id})`,
);
const res = await projects.get({ id: link.id });
const res = await apps.get({ id: link.id });

@jared-paperspace jared-paperspace Jul 5, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

IDK if this line or L133 is actually right anymore either because I think it'd have to be id: app.projectId. Linking is going to be super wonky now because when you get an app, you're not getting it by project ID (currently) you're getting it by the base deployment UUID.

@jared-paperspace jared-paperspace Jul 5, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

might need to make an API change to make this work

@ps-kwang ps-kwang marked this pull request as draft April 4, 2024 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@colin-welch colin-welch Awaiting requested review from colin-welch
1 more reviewer
@jared-paperspace jared-paperspace jared-paperspace approved these changes
Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /