-
Notifications
You must be signed in to change notification settings - Fork 46
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
Changes made for provisoners flag #221
base: main
Are you sure you want to change the base?
Conversation
Thanks, @rabelmervin! You need to sign your commits to have the DCO passing successfully on this PR:
|
Hello @mathieu-benoit @astromechza I have signed the commits and DCO is passed successfully :) Is there anything i can help you with ? |
hey, @rabelmervin I'm not a reviewer but can you also update the test case over here https://github.com/score-spec/score-compose/blob/main/internal/command/init_test.go#L79 |
provisioner.yaml
Outdated
@@ -0,0 +1,35 @@ | |||
# Score provides a developer-centric and platform-agnostic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @rabelmervin you should not add this file cause it's irrelevant to issue #220
Also, it is of no use.
score.yaml
Outdated
# Score provides a developer-centric and platform-agnostic | ||
# Workload specification to improve developer productivity and experience. | ||
# Score eliminates configuration management between local and remote environments. | ||
# | ||
# Specification reference: https://docs.score.dev/docs/reference/score-spec-reference/ | ||
--- | ||
|
||
# Score specification version | ||
apiVersion: score.dev/v1b1 | ||
|
||
metadata: | ||
name: example | ||
|
||
containers: | ||
hello-world: | ||
image: nginx:latest | ||
|
||
# Uncomment the following for a custom entrypoint command | ||
# command: [] | ||
|
||
# Uncomment the following for custom arguments | ||
# args: [] | ||
|
||
# Environment variables to inject into the container | ||
variables: | ||
EXAMPLE_VARIABLE: "example-value" | ||
|
||
service: | ||
ports: | ||
# Expose the http port from nginx on port 8080 | ||
www: | ||
port: 8080 | ||
targetPort: 80 | ||
|
||
resources: {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for this, If you want to add examples, you should refer to this and in a separate PR.
Hi @7h3-3mp7y-m4n I'll the add the test functions and I'll remove that irrelevant files 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No change here? Can we drop it from the PR?
internal/command/init.go
Outdated
|
||
var saveFilename string | ||
if vi == "-" { | ||
saveFilename = fmt.Sprintf("stdin-provisioner-%d%s", i+1, loader.DefaultSuffix) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file name here needs to look like a provisioners file. I'd also suggest dropping the %d
suffix since we can only ever have one stdin file.
saveFilename = fmt.Sprintf("stdin-provisioner-%d%s", i+1, loader.DefaultSuffix) | |
saveFilename = "from-stdin.provisioners.yaml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure @astromechza @mathieu-benoit I'll make changes !. Is there anything i can help you with ?
internal/command/init.go
Outdated
@@ -31,6 +33,21 @@ import ( | |||
"github.com/score-spec/score-compose/internal/provisioners/loader" | |||
) | |||
|
|||
func GetStdinFile(ctx context.Context) ([]byte, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we please move this functionality over to https://github.com/score-spec/score-go/blob/main/uriget/uriget.go#L155 as part of the file type getter? This is a good place to add unit tests too.
This is common functionality that we can use and document in all the consumers of this library. This would allow the uri to be documented as either: file://-
or just -
.
I can help get this turned around quickly :)
Hi @mathieu-benoit and @astromechza Now the Test is passed. I'll commit the changes What's your opinion ? |
@rabelmervin Thanks! can you address the remaining comments on the diff, including this one for score-go? https://github.com/score-spec/score-compose/pull/221/files#r1904017231 |
Bonjour @mathieu-benoit @astromechza I made changes ! I have Moved the |
Signed-off-by: rabelmervin <rabelmervin@gmail.com>
Signed-off-by: rabelmervin <rabelmervin@gmail.com>
Signed-off-by: rabelmervin <rabelmervin@gmail.com>
Signed-off-by: rabelmervin <rabelmervin@gmail.com>
Signed-off-by: rabelmervin <rabelmervin@gmail.com>
I have proposed some changes to your |
@rabelmervin your score-go PR is now released under https://github.com/score-spec/score-go/releases/tag/v1.9.2 and can be imported here :) |
Initially the provisioners flag doesnt support local file and stdin. But now local and stdin added