-
Notifications
You must be signed in to change notification settings - Fork 2
Add Makefile overrides for install kpt macro w/ retries #4
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
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
5d15c97
run with inactivity
hellt f0e5141
use branch image
hellt d903379
60s wait time
hellt f1aa9a2
another counter approach
hellt 2ff7eb3
vibing the watcher script
hellt 1756729
180s wait
hellt 3d9464c
trying more proper font setting
hellt 038334f
Use correct img, try without timeout wrapper
kaelemc 4dc9925
Use kaelem testing args
kaelemc e383971
force rerun
kaelemc dfe57b0
Try a make override
kaelemc fe222f5
rebuild
kaelemc deb25d7
Bump retry count, and add the reconcile timeout (3mins)
kaelemc ded45b1
Disable default AI thingy
kaelemc dcdc0b0
gone but not forgotten
kaelemc 93dffbd
Centralise env vars -> devc json, and try-eda params -> overrides
kaelemc be9f27d
Not everything can live in the overrides.mk seemingly
kaelemc 8ce404a
another font attempt
hellt bd9b9dd
fg image pull
hellt 3d1267e
pull in post create
hellt 32de447
fix path for images
hellt d8e7185
pull in create
hellt 5733a9a
Lower concurrent prepulls back to 4
kaelemc 47539e0
pull in post create for process visibility
hellt 2f70cc3
try 8 concurrent pulls
hellt 342d698
remove icons from the prompt
hellt 626efe4
pin playground tag
hellt 389b39a
correct flag
hellt 4d2e71c
use overrides var
hellt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,6 +1,6 @@ | ||||||
| { | ||||||
| "name": "Nokia EDA in GitHub Codespaces", | ||||||
| "image": "ghcr.io/eda-labs/codespaces/base:main", | ||||||
| "image": "ghcr.io/eda-labs/codespaces/base:kaelem-test", | ||||||
hellt marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| "features": { | ||||||
| "ghcr.io/devcontainers/features/docker-in-docker:2": { | ||||||
| "version": "latest", | ||||||
|
|
@@ -10,17 +10,19 @@ | |||||
| "customizations": { | ||||||
| "vscode": { | ||||||
| "extensions": [ | ||||||
| // "ms-kubernetes-tools.vscode-kubernetes-tools", | ||||||
| "entuent.fira-code-nerd-font", | ||||||
| "ms-kubernetes-tools.vscode-kubernetes-tools", | ||||||
| "eda-labs.vscode-eda" | ||||||
| ], | ||||||
| "settings": { | ||||||
| "chat.disableAIFeatures": true, | ||||||
| "terminal.integrated.defaultProfile.linux": "zsh", | ||||||
| "terminal.integrated.profiles.linux": { | ||||||
| "zsh": { | ||||||
| "path": "/bin/zsh" | ||||||
| } | ||||||
| }, | ||||||
| "terminal.integrated.fontFamily": "'JetBrainsMono Nerd Font', 'JetBrainsMono NF', monospace", | ||||||
| "terminal.integrated.fontFamily": "JetBrainsMono Nerd Font, JetBrainsMono, JetBrains Mono, fira-code-nerd, Fira Code Nerd Font, FiraCode Nerd Font, Fira Code, Consolas, Hasklig, Menlo, Monaco, 'Courier New', monospace", | ||||||
| "vscode-eda.edaTargets": { | ||||||
| "https://127.0.0.1:9443": { | ||||||
| "edaUsername": "admin", | ||||||
|
|
@@ -39,7 +41,10 @@ | |||||
| "postCreateCommand": ".devcontainer/postCreate.sh", | ||||||
| "postAttachCommand": ".devcontainer/postAttach.sh", | ||||||
| "containerEnv": { | ||||||
| "EDA_PORT": "9443" | ||||||
| "EDA_PORT": "9443", | ||||||
| "TRY_EDA_OVERRIDES_FILE": "/workspaces/codespaces/.devcontainer/overrides.mk", | ||||||
hellt marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| "TRY_EDA_OVERRIDES_FILE": "/workspaces/codespaces/.devcontainer/overrides.mk", | |
| "TRY_EDA_OVERRIDES_FILE": "${containerWorkspaceFolder}/.devcontainer/overrides.mk", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| KPT_RETRY ?= 5 | ||
| KPT_LIVE_APPLY_ARGS += --reconcile-timeout=3m | ||
|
|
||
| # Override the INSTALL_KPT_PACKAGE macro | ||
| # | ||
| # Set the --reconcile-timeout flag so that KPT doesn't just hang for a while | ||
| # then the updated macro below, will handle the exit by retrying the kpt live apply | ||
| # until we hit the retry limit. | ||
| define INSTALL_KPT_PACKAGE | ||
| { \ | ||
| echo -e "--> INSTALL: [\033[1;34m$2\033[0m] - Applying kpt package" ;\ | ||
| pushd $1 &>/dev/null || (echo "[ERROR]: Failed to switch cwd to $2" && exit 1) ;\ | ||
| if [[ ! -f resourcegroup.yaml ]] || [[ $(KPT_LIVE_INIT_FORCE) -eq 1 ]]; then \ | ||
| $(KPT) live init --force 2>&1 | $(INDENT_OUT) ;\ | ||
| else \ | ||
| echo -e "--> INSTALL: [\033[1;34m$2\033[0m] - Resource group found, don't re-init this package" ;\ | ||
| fi ;\ | ||
| for attempt in $$(seq 1 $(KPT_RETRY)); do \ | ||
| echo -e "--> INSTALL: [\033[1;34m$2\033[0m] - Attempt $$attempt/$(KPT_RETRY)" ;\ | ||
| if $(KPT) live apply $(KPT_LIVE_APPLY_ARGS) 2>&1 | $(INDENT_OUT); then \ | ||
| break ;\ | ||
| fi ;\ | ||
| if [[ $$attempt -eq $(KPT_RETRY) ]]; then \ | ||
| echo -e "--> INSTALL: [\033[1;31m$2\033[0m] - Failed after $(KPT_RETRY) attempts" ;\ | ||
| exit 1 ;\ | ||
| fi ;\ | ||
| echo -e "--> INSTALL: [\033[1;33m$2\033[0m] - Attempt $$attempt failed, retrying..." ;\ | ||
| sleep 2 ;\ | ||
hellt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| done ;\ | ||
| popd &>/dev/null || (echo "[ERROR]: Failed to switch back from $2" && exit 1) ;\ | ||
| echo -e "--> INSTALL: [\033[0;32m$2\033[0m] - Applied and reconciled package" ;\ | ||
| } | ||
| endef | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,39 +1,29 @@ | ||
| # Get editor completions based on the config schema | ||
| "$schema" = 'https://starship.rs/config-schema.json' | ||
|
|
||
|
|
||
| # Inserts a blank line between shell prompts | ||
| add_newline = true | ||
|
|
||
| [git_branch] | ||
| symbol = " " | ||
| format = '· [$symbol$branch(:$remote_branch)]($style) ' | ||
|
|
||
| [git_commit] | ||
| tag_disabled = false | ||
| tag_symbol = " " | ||
|
|
||
| [golang] | ||
| symbol = ' ' | ||
| format = '· [$symbol($version )]($style)' | ||
|
|
||
| [package] | ||
| format = '· [$symbol$version]($style) ' | ||
| symbol = " " | ||
|
|
||
| [python] | ||
| format = '· [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)' | ||
| symbol = " " | ||
|
|
||
hellt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| [kubernetes] | ||
| disabled = false | ||
| symbol = " " | ||
| disabled = true | ||
|
|
||
| [container] | ||
| disabled = true | ||
|
|
||
| [direnv] | ||
| disabled = true | ||
|
|
||
| [hostname] | ||
| ssh_symbol = " " | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.