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

updates to scoped variables struct #221

Merged
merged 5 commits into from
Dec 6, 2023
Merged

Conversation

blewisCycle
Copy link
Collaborator

Update to scoped var struct

  • access moved to top level
  • Encryption moved to RAW type only
  • Added config for internal api and file

components/schemas/scoped-variables/RawSource.yml Outdated Show resolved Hide resolved
components/schemas/scoped-variables/URLSource.yml Outdated Show resolved Hide resolved
components/schemas/stacks/spec/StackSpec.yml Show resolved Hide resolved
components/schemas/scoped-variables/RawSource.yml Outdated Show resolved Hide resolved
internal_api:
nullable: true
description: Descibes an object with variables that the internal api will serve after runtime starts
Copy link
Member

Choose a reason for hiding this comment

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

This needs updated to something like "If set, this scoped variable will be available over the internal API. Contains settings for accessing this variable over the internal API."

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated to that ^

type: object
properties:
duration:
$ref: ../Duration.yml
type: object
description: Duration is a time string that the internal api will serve that variable after runtime starts
Copy link
Member

Choose a reason for hiding this comment

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

API - consistency! Also don't forget punctuation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

got it

properties:
decode:
description: Decode tells Cycle that the file is a base64 encoded string
Copy link
Member

Choose a reason for hiding this comment

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

no need for the "Decode" at the beginning - it's obvious because of what field you're in. Also, this is missing something - specifically, Cycle will try to decode the base64 string.

"When true, Cycle will interpret this variable as a base-64 encoded string, and decode it before passing it into the container."

Copy link
Collaborator Author

@blewisCycle blewisCycle Dec 6, 2023

Choose a reason for hiding this comment

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

No way to describe defaults specifically
image

Copy link
Member

Choose a reason for hiding this comment

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

dont use example that way, just show the default without the Default path- part

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok

Copy link
Member

Choose a reason for hiding this comment

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

did you update the description?

properties:
url:
type: string
description: The URL to call to produce the value.
headers:
type: object
description: Additional information about a container
description: Additional information about a URL source
Copy link
Member

Choose a reason for hiding this comment

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

punctuation, but try to bring this inline with the other description for the source block.

Copy link
Collaborator Author

@blewisCycle blewisCycle Dec 6, 2023

Choose a reason for hiding this comment

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

image

Copy link
Member

Choose a reason for hiding this comment

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

is that what headers is? that doesn't seem right.

additionalProperties: {}
auth_token_url:
nullable: true
type: string
description: The response is from auth_token_url will be sent as header authorization which allows third party integration
Copy link
Member

Choose a reason for hiding this comment

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

This comment needs some work. The grammar is strange, and it isn't really specifying what the field is.

"An optional URL that can be provided to authenticate with a third party secret service. Cycle will make a request to this URL before fetching the secret URL, and use the response as the value of an Authorization header when requesting the secret."

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image

Copy link
Member

Choose a reason for hiding this comment

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

saying nullable in the description is strange. just drop it from here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Got it. You originally said optional, which wasn't true

components/schemas/stacks/spec/StackSpecScopedVariable.yml Outdated Show resolved Hide resolved
Copy link
Member

@mattoni mattoni left a comment

Choose a reason for hiding this comment

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

LGTM.

@mattoni mattoni merged commit 7c2751c into main Dec 6, 2023
4 checks passed
@mattoni mattoni deleted the blewis/update-scoped-variables branch December 6, 2023 00:43
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