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: Implement environment update functionality in launchdevly ui #423

Merged
merged 7 commits into from
Sep 12, 2024

Conversation

cdelst
Copy link
Contributor

@cdelst cdelst commented Sep 11, 2024

@cdelst cdelst requested a review from mike-zorn September 11, 2024 21:19
@cdelst cdelst changed the title Implement environment update functionality in launchdevly ui feat: Implement environment update functionality in launchdevly ui Sep 11, 2024
type Server struct {
var _ StrictServerInterface = server{}

type server struct {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this should be private

}

func NewStrictServer() Server {
return Server{}
func NewStrictServer() StrictServerInterface {
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 want to return the interface not the struct

return GetProjectsEnvironments404JSONResponse{}, nil
}

environments, err := project.Environments(ctx)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I need to refactor this off the project rep still. On my list

@@ -83,9 +83,9 @@ func (s Sqlite) UpdateProject(ctx context.Context, project model.Project) (bool,
}()
result, err := tx.ExecContext(ctx, `
UPDATE projects
SET flag_state = ?, last_sync_time = ?, context=?
SET flag_state = ?, last_sync_time = ?, context=?, source_environment_key=?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

was this intentionally left out? I saw some tests that might suggest so.

@@ -77,6 +78,7 @@ func (c LDClient) RunServer(ctx context.Context, serverParams ServerParams) {

func getDBPath() string {
dbFilePath, err := xdg.StateFile("ldcli/dev_server.db")
log.Printf("Using database at %s", dbFilePath)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

useful for locally connecting to the db

@cdelst cdelst requested a review from mike-zorn September 12, 2024 20:26
@cdelst cdelst merged commit 216dc95 into main Sep 12, 2024
9 checks passed
@cdelst cdelst deleted the cdelst/sc-255156/add-ui-support-for-editing-a-project branch September 12, 2024 21:00
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.

2 participants