-
Notifications
You must be signed in to change notification settings - Fork 30
feat(cdn): add cdn client, config, list command #1100
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
base: main
Are you sure you want to change the base?
feat(cdn): add cdn client, config, list command #1100
Conversation
Co-authored-by: Ruben Hönle <[email protected]>
Co-authored-by: Ruben Hönle <[email protected]>
|
Btw, please always add the Jira issue ID to your PR description if possible :) |
Co-authored-by: Ruben Hönle <[email protected]>
- replace single char names with more descriptive ones - remove predefined mod functions - deduplicate ParseOriginRequestHeaders and test it - deduplicate ParseGeofencing and test it - add test FlagTo* funcs
|
This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it. |
Merging this branch changes the coverage (1 decrease, 10 increase)
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files
|
Merging this branch changes the coverage (1 decrease, 10 increase)
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files
|
| table.AddSeparator() | ||
| table.AddRow("OPTIMIZER ENABLED", optimizerEnabled) | ||
| table.AddSeparator() | ||
| // TODO config has yet another WAF block, left it out because the docs say to use the WAF block at the top level to determine enabled rules. There's also mode and type fields here, both left out. |
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.
open TODO
| return err | ||
| } | ||
| if model.Bucket != nil { | ||
| pw, err := params.Printer.PromptForPassword("enter your secret access key for the object storage bucket: ") |
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.
How does this work with scripts? Could you add an example please which shows this use-case? 😅
| return fmt.Errorf("create distribution response is nil") | ||
| } | ||
| return p.OutputResult(outputFormat, resp, func() error { | ||
| p.Outputf("Created CDN distribution for %q. Id: %s\n", projectLabel, utils.PtrString(resp.Distribution.Id)) |
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.
| p.Outputf("Created CDN distribution for %q. Id: %s\n", projectLabel, utils.PtrString(resp.Distribution.Id)) | |
| p.Outputf("Created CDN distribution for %q. ID: %s\n", projectLabel, utils.PtrString(resp.Distribution.Id)) |
During the update it's upper-case. Please stay consistent within your implementation 😅
| return fmt.Errorf("delete loadbalancer: %w", err) | ||
| } | ||
|
|
||
| params.Printer.Outputf("CDN distribution %q deleted.", model.DistributionID) |
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 get some weird % at the end of the output when testing this.
And in addition, it's possible to delete non-existent distributions. I just took some random uuid from https://www.uuidgenerator.net/ and got the message that the distribution was deleted. I would expect an HTTP 404 error in that case from the API. Could you check this please with the service team?
Description
Issue: STACKITCLI-70
Checklist
make fmtmake generate-docs(will be checked by CI)make test(will be checked by CI)make lint(will be checked by CI)