Changes made for provisoners flag#221
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.
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.
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 👍 |
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.
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.
sure @astromechza @mathieu-benoit I'll make changes !. Is there anything i can help you with ?
internal/command/init.go
Outdated
| "github.com/score-spec/score-compose/internal/provisioners/loader" | ||
| ) | ||
|
|
||
| func GetStdinFile(ctx context.Context) ([]byte, error) { |
There was a problem hiding this comment.
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 :) |
|
Hi @rabelmervin, while we were reviewing the projects status in preparation of KubeCon, we were wondering if you could continue on this one? Thanks again for your contributions! |
|
Ohh ! I forgot this, Sure I'll complete this @mathieu-benoit @astromechza but, could you please tell me what yet to be addressed in this pr ? |
Signed-off-by: Rabel Mervin <152761588+rabelmervin@users.noreply.github.com>
astromechza
left a comment
There was a problem hiding this comment.
There are a few remaining bits to clean up here :) @rabelmervin
internal/command/init.go
Outdated
| var data []byte | ||
|
|
||
| if vi == "-" { | ||
| data, err = uriget.GetFile(cmd.Context(), "-") | ||
| } else { | ||
| // Existing URI loading logic | ||
| data, err = uriget.GetFile(cmd.Context(), vi) | ||
| } | ||
|
|
There was a problem hiding this comment.
None of this is necessary due to line 211 below. it's exactly the same.
| timeout: 10s | ||
| retries: 120 | ||
| info_logs: | | ||
| info_logs: | |
There was a problem hiding this comment.
This is incorrect, the info logs section needs to be indented only 2 spaces, it's a top level field.
There was a problem hiding this comment.
In fact I don't think any changes are necessary to this file?
There was a problem hiding this comment.
sure, I'll not make any changes to this
|
Hello @astromechza i have made some changes. |
Signed-off-by: Ben Meier <1651305+astromechza@users.noreply.github.com>
astromechza
left a comment
There was a problem hiding this comment.
Thanks, @rabelmervin, for your contribution and working through the feedback. I really appreciate it. :)
|
Hurray, I'm over the moon thanks @astromechza and @mathieu-benoit Merci beaucoup. |

Initially the provisioners flag doesnt support local file and stdin. But now local and stdin added