-
Notifications
You must be signed in to change notification settings - Fork 820
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
Fix ensure SDK image #878
Fix ensure SDK image #878
Conversation
Build Failed 😱 Build Id: 8d166230-5023-4949-95a8-f1b958cb8145 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
E2E test failed, not connected with this PR:
|
3517e8f
to
fd4fb7a
Compare
Build Failed 😱 Build Id: 2d9dba8a-23e3-4092-89e4-95cbc9ce2796 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
8914a45
to
e76b368
Compare
Added crossplatform sha_bash function verified on Linux and MacOs. Currently on both it gives a result of
|
Build Succeeded 👏 Build Id: 076ce844-edd9-4d27-b5be-f7f535c5c203 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
Build Succeeded 👏 Build Id: 04fe0353-5679-473f-bd94-59c5dd6fbad0 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
build/includes/sdk.mk
Outdated
@@ -22,12 +22,14 @@ | |||
|
|||
build_sdk_base_version = $(call sha,$(build_path)/build-sdk-images/tool/base/Dockerfile) | |||
build_sdk_base_tag = agones-build-sdk-base:$(build_sdk_base_version) | |||
build_sdk_version = $(call sha_bash,$(build_path)/build-sdk-images/*/*.sh) |
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.
A couple of questions on this:
- What if I change the
/build-sdk-images/go/Dockerfile
then this won't rebuild, since it's only looking at .sh files, no? - If i change
/build-sdk-images/go/gen.sh
- won't that mean that all images will get rebuilt?
Should this be (or something close to):
build_sdk_version = $(call sha_bash,$(build_path)/build-sdk-images/*/*.sh) | |
build_sdk_version = $(call sha_bash,$(build_path)/build-sdk-images/$(SDK_FOLDER)/*) |
?
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.
Nice questions, I don't expect these scripts to be changed too often.
Currently we have rebuild every time. So this version is better, but not absolutely. Let me check both questions in practise. But I think:
- We would have another base-image so rebuild would be triggered.
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.
Sorry I'm confused 😕 , if I only change /build-sdk-images/go/Dockerfile
- then the image won't rebuild, it would only change if I changed the .sh files. This could be really confusing for the developer.
I can't see a path that would cause that to do anything else? But I could be missing something.
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.
You are right definitely, let's concat those two hashes. Will resend new version in a moment.
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 we might be saying two different, but important things.
I think you are referencing when the /build-sdk-images/tool/base/Dockerfile
changes.
I'm talking about when the language specific Dockerfile changes, for example /build-sdk-images/go/Dockerfile
You are right - both are actually issues!
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.
Just looking at this again, does this bring us back to the original problems?
e76b368
to
a7df0a5
Compare
Build Succeeded 👏 Build Id: accb4f21-00dc-4ea1-9774-dc83b2bcbe31 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
build/includes/sdk.mk
Outdated
@@ -22,12 +22,14 @@ | |||
|
|||
build_sdk_base_version = $(call sha,$(build_path)/build-sdk-images/tool/base/Dockerfile) | |||
build_sdk_base_tag = agones-build-sdk-base:$(build_sdk_base_version) | |||
build_sdk_version = $(call sha_bash,$(build_path)/build-sdk-images/$(SDK_FOLDER)/*.sh)$(call sha,$(build_path)/build-sdk-images/$(SDK_FOLDER)/Dockerfile) |
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.
build_sdk_version = $(call sha_bash,$(build_path)/build-sdk-images/$(SDK_FOLDER)/*.sh)$(call sha,$(build_path)/build-sdk-images/$(SDK_FOLDER)/Dockerfile) | |
build_sdk_version = $(call sha_bash,$(build_path)/build-sdk-images/$(SDK_FOLDER)/{*.sh,Dockerfile}) |
sha256sum {*.sh,Dockerfile} | cut -d' ' -f1 | sha256sum | head -c 10
- works in bash!
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.
Thanks, let's use just $(SDK_FOLDER)/*
because suggested version leads to :
sha256sum: '"/home/UserName/go/src/agones.dev/agones/build//build-sdk-images/go/{*.sh': No such file or directory
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 mean we could even more simplify to:
sha256sum {*} | cut -d' ' -f1 | sha256sum | head -c 10
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.
Yes - we could use everything in the directory. We may end up with a README.md in each one, but that's probably fine if we happen to catch that. WDYT?
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.
Yes, the proper wildcard should fix README.md case in the future.
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 it's fine if we end up pickup up a README - also it's not an issue right now so, let's just use a solution that simplest for now (use build_sdk_version = $(call sha_bash,$(build_path)/build-sdk-images/$(SDK_FOLDER)/*
) and we can always revisit it when we actually need to.
WDYT?
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.
Yes, that would work, for now we don't have README files in any of build-sdk-images/$(SDK_FOLDER)/
, I will update PR with suggested naming.
05e055f
to
e1b80c7
Compare
Build Failed 😱 Build Id: 27fb7373-5900-49bd-9d9d-abccb1193d54 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Failed 😱 Build Id: 148436d5-2006-42d6-a008-4fc5ce728849 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
e1b80c7
to
dd4eebc
Compare
Build Failed 😱 Build Id: 4724ba3b-c7d6-4b55-a4d8-e429bafdfd0d To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
9d24d11
to
b8aa277
Compare
Build Succeeded 👏 Build Id: 919e83a0-d3c9-4e11-a480-5a55f8c28830 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
Build Succeeded 👏 Build Id: 559af4a0-6e50-4266-b0b1-0057e646a708 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
Build Failed 😱 Build Id: a8ab8949-2635-4315-991f-50820435a946 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
b8aa277
to
b9de525
Compare
Build failed because I mistakenly added |
Build Succeeded 👏 Build Id: ae57bb38-8e4c-4cb9-b9e5-7a8ad08178ad The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
build/includes/sdk.mk
Outdated
@@ -22,12 +22,14 @@ | |||
|
|||
build_sdk_base_version = $(call sha,$(build_path)/build-sdk-images/tool/base/Dockerfile) | |||
build_sdk_base_tag = agones-build-sdk-base:$(build_sdk_base_version) | |||
build_sdk_version = $(call sha_dir,$(build_path)/build-sdk-images/$(SDK_FOLDER)/*.sh) |
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.
build_sdk_version = $(call sha_dir,$(build_path)/build-sdk-images/$(SDK_FOLDER)/*.sh) | |
build_sdk_version = $(call sha_dir,$(build_path)/build-sdk-images/$(SDK_FOLDER)/*) |
Yes?
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.
yes, sorry, fixing
b9de525
to
1a8ed89
Compare
Build Succeeded 👏 Build Id: 94e276d5-660a-4557-9394-f8ee50eb3cfc The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
1a8ed89
to
33a5a48
Compare
Build Failed 😱 Build Id: 8fffef33-0477-4ed8-8a1c-921bbf1269a0 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
33a5a48
to
5a24d2e
Compare
Updated comment to : |
Build Failed 😱 Build Id: 805bbe62-e9b1-4d3d-a3dc-a09f707e72da To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Strange flaky test not connected with this changes:
|
5a24d2e
to
d0e8715
Compare
Build Succeeded 👏 Build Id: 12db66dc-218b-46fa-9018-641ee6d47e99 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
Use git version instead of build image version. Does not rebuild SDK images if image was found.
d0e8715
to
dc54924
Compare
Build Succeeded 👏 Build Id: cc26f111-1d64-4103-8e20-713bccdbef03 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
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.
🤸
Use bash scripts hash instead of build image version.
Does not rebuild SDK images if image was found, previously rebuild was performed every time.