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

feat(project-update): add project update options and refactor code (#main) #318

Merged
merged 2 commits into from
Jan 31, 2025

Conversation

chaporgin
Copy link
Member

@chaporgin chaporgin commented Jan 30, 2025

This commit introduces new options for project updates, including
block_vpc_connections and block_public_connections. It also refactors
the existing code for improved readability and maintainability by alphabetically sorting the parameters for the project update command.

Use --block-vpc-connections=false to set the value to false.
Use --block-public-connections=false to set the value to false.

https://github.com/neondatabase/cloud/issues/21903

…main)

This commit introduces new options for project updates including
block_vpc_connections and block_public_connections. It also refactors
the existing code for improved readability and maintainability, by sorting the parameters for the `project update` command alphabetically.
@chaporgin chaporgin requested a review from duskpoet January 30, 2025 15:49
@chaporgin chaporgin marked this pull request as ready for review January 30, 2025 15:50
@duskpoet
Copy link
Member

why didn't it work? what's the problem?
Can you please also add tests for these options

@chaporgin
Copy link
Member Author

why didn't it work? what's the problem?

The --block_vpc_connections=yes does not have an effect.

@duskpoet
Copy link
Member

so it's the backend problem?

@chaporgin
Copy link
Member Author

so it's the backend problem?

Unlikely, because

While the --block_public_connections works as expected with the following options: --block_public_connections (for true), --block_public_connections=no (for false), --block_public_connections=false, --block_public_connections=yes (for true), --block_public_connections=true

block_vpc_connections does not work only when --block_vpc_connections=yes. All other combinations work as expected for block_vpc_connections.

@chaporgin
Copy link
Member Author

I got it, it's probably the expected behaviour:

➜  neonctl git:(chaporgin/21903-project-update) ✗ node dist projects update super-base-59043008 --name "Hello" --block-vpc-connections=f
ERROR: props.blockPublicConnections false
➜  neonctl git:(chaporgin/21903-project-update) ✗ node dist projects update super-base-59043008 --name "Hello" --block-vpc-connections=false
ERROR: props.blockPublicConnections false
➜  neonctl git:(chaporgin/21903-project-update) ✗ node dist projects update super-base-59043008 --name "Hello" --block-vpc-connections=yes
ERROR: props.blockPublicConnections false
➜  neonctl git:(chaporgin/21903-project-update) ✗ node dist projects update super-base-59043008 --name "Hello" --block-vpc-connections=true
ERROR: props.blockPublicConnections true
➜  neonctl git:(chaporgin/21903-project-update) ✗

so, everything except for the "true" or without the value is considered as "false". I am adding this to the description of the flags.

Update variable names in 'projects.ts'. Change 'block_vpc_connections' and
'block_public_connections' to 'blockVpcConnections' and
'blockPublicConnections' respectively. Also update the usage instructions
for these variables in their descriptions.
@chaporgin chaporgin merged commit a89ed63 into main Jan 31, 2025
6 checks passed
@chaporgin chaporgin deleted the chaporgin/21903-project-update branch January 31, 2025 16:50
@duskpoet
Copy link
Member

duskpoet commented Feb 6, 2025

🎉 This issue has been resolved in version 2.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants