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

Can't create new profile named "local"- same name as deleted profile #15643

Open
discdiver opened this issue Oct 10, 2024 · 2 comments
Open

Can't create new profile named "local"- same name as deleted profile #15643

discdiver opened this issue Oct 10, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@discdiver
Copy link
Contributor

Bug summary

I once had a profile named "local".

I deleted that profile and verified it is not present in profiles.toml.

Now I cannot create a profile named "local".

(base) jeffhale prefect/docs [main] $ prefect profile ls

┏━━━━━━━━━━━━━━━━━━━━━┓
┃ Available Profiles: ┃
┡━━━━━━━━━━━━━━━━━━━━━┩
│      * sandbox-jeff │
└─────────────────────┘
   * active profile    
   
(base) jeffhale prefect/docs [main] $ prefect profile create local

Profile 'local' already exists.

To create a new profile, remove the existing profile first:

    prefect profile delete 'local'

(base) jeffhale prefect/docs [main] $ prefect profile delete 'local'

Are you sure you want to delete profile with name 'local'? [y/N]: y
Removed profile 'local'.

(base) jeffhale prefect/docs [main] $ prefect profile create local  

Profile 'local' already exists.

To create a new profile, remove the existing profile first:

    prefect profile delete 'local'

I can create profiles with other names.

Version info (prefect version output)

Version:             3.0.7
API version:         0.8.4
Python version:      3.12.2
Git commit:          8fee9e1e
Built:               Wed, Oct 9, 2024 5:55 PM
OS/Arch:             darwin/arm64
Profile:             sandbox-jeff
Server type:         cloud
Pydantic version:    2.8.2

Additional context

No response

@discdiver discdiver added the bug Something isn't working label Oct 10, 2024
@discdiver discdiver changed the title Can't create new profile with same name as deleted profile Can't create new profile named "local"- same name as deleted profile Oct 10, 2024
@discdiver
Copy link
Contributor Author

discdiver commented Oct 10, 2024

From prefect profile populate-defaults I see that local is also the name of one of the default profiles. So perhaps this is a reserved profile name we don't want to users to be able to create?

If that's the case, then stating in the CLI output that you can't create a workpool with that name would be helpful.

Hmm, I don't see anything in the Prefect codebase that would make "local" a reserved name for a profile.

@discdiver
Copy link
Contributor Author

Also present in prefect 3.0.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant