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

Adds beta command runme env store snapshot #532

Merged
merged 17 commits into from
Mar 17, 2024
Merged

Conversation

pastuxso
Copy link
Collaborator

@pastuxso pastuxso commented Mar 14, 2024

This PR supports interacting with the MonitorEnvStore in the CLI.

Usage:

runme env store snapshot --tlsdir=<RUNME TLS CERTIFICATES> --address=<RUNME SERVER ADDRESS> --session=<RUNME SESSION ID>

The following variables will be used by default if you don't pass arguments:

RUNME_SESSION
RUNME_SERVER_ADDR
RUNME_TLS_DIR

Example:

runme env store snapshot

image

Issue: #528

@pastuxso pastuxso changed the title Initial work Adds support to use the Owl Store through the CLI Mar 14, 2024
internal/runner/session.go Outdated Show resolved Hide resolved
internal/cmd/environment.go Outdated Show resolved Hide resolved
@pastuxso pastuxso changed the title Adds support to use the Owl Store through the CLI [WIP] Adds support to use the Owl Store through the CLI Mar 14, 2024
internal/runner/service.go Outdated Show resolved Hide resolved
@pastuxso pastuxso self-assigned this Mar 14, 2024
@pastuxso pastuxso force-pushed the cli-owl-store-snapshot branch 3 times, most recently from 2bcc8d8 to 1bd3a71 Compare March 15, 2024 21:49
@pastuxso pastuxso force-pushed the cli-owl-store-snapshot branch from 78551e0 to ee8e042 Compare March 16, 2024 16:49
@pastuxso pastuxso marked this pull request as ready for review March 16, 2024 16:50
@pastuxso pastuxso changed the title [WIP] Adds support to use the Owl Store through the CLI Adds support to use the Owl Store through the CLI Mar 16, 2024
@pastuxso pastuxso changed the title Adds support to use the Owl Store through the CLI Adds command runme env store snapshot Mar 16, 2024
@@ -803,8 +816,8 @@ func convertToMonitorEnvStoreResponse(msg *runnerv1.MonitorEnvStoreResponse, sna
OriginalValue: item.Value.Original,
ResolvedValue: item.Value.Resolved,
Status: status,
CreateTime: item.Var.Created.String(),
UpdateTime: item.Var.Updated.String(),
CreateTime: item.Var.Created.Format(time.RFC3339),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@sourishkrout let's use the RFC3339 which is more standard for sharing dates through systems and compatible with ISO8601, It was tested with the extension and is working fine.

@pastuxso pastuxso changed the title Adds command runme env store snapshot Adds beta command runme env store snapshot Mar 16, 2024
Copy link
Member

@sourishkrout sourishkrout left a comment

Choose a reason for hiding this comment

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

Can we "remove" the session injection for now? Don't need it for the demo and it needs more thought.

internal/env/env.go Outdated Show resolved Hide resolved
internal/cmd/environment.go Outdated Show resolved Hide resolved
internal/cmd/server.go Outdated Show resolved Hide resolved
internal/cmd/environment.go Outdated Show resolved Hide resolved
@pastuxso pastuxso force-pushed the cli-owl-store-snapshot branch from 1fdfa9d to 69b5139 Compare March 16, 2024 19:27
@pastuxso
Copy link
Collaborator Author

Can we "remove" the session injection for now? Don't need it for the demo and it needs more thought.

Yes, removed.

@pastuxso pastuxso requested a review from sourishkrout March 16, 2024 19:28
Copy link
Member

@sourishkrout sourishkrout left a comment

Choose a reason for hiding this comment

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

👍 Works. Added some flags.

Likely needs a refactor to use the Runner client interface for non-hidden release which we can do later.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
35.4% Coverage on New Code (required ≥ 70%)

See analysis details on SonarCloud

@sourishkrout sourishkrout merged commit 6be4e28 into main Mar 17, 2024
5 of 6 checks passed
@sourishkrout sourishkrout deleted the cli-owl-store-snapshot branch March 17, 2024 07:32
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