-
-
Notifications
You must be signed in to change notification settings - Fork 23
support custom TopCP images #1163
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
Open
MattShirley
wants to merge
64
commits into
develop
Choose a base branch
from
1162-support-custom-topcp-images
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 50 commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
34127c1
support custom TopCP images
MattShirley ba71014
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 86d536d
resolve flake8 issues
MattShirley b518d40
Revert "resolve flake8 issues"
MattShirley c185637
Merge branch '1162-support-custom-topcp-images' of https://github.com…
MattShirley 8286d95
fix broken test
MattShirley 2e706b7
add back allowed_repos logic
MattShirley fe976f3
remove accidental values changes
MattShirley e129256
moving towards MVP (app server is failing due to bad mount)
MattShirley 0386476
update directory structure
MattShirley d0776b0
tighten flake8
MattShirley 1cade42
Merge branch 'develop' of https://github.com/ssl-hep/ServiceX into 11…
MattShirley f1b7b43
remove comments and unused env vars
MattShirley 8a4fbb7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 0fd050d
rewrite custom_docker_image logic
MattShirley 2d3bf8f
Merge branch 'develop' of https://github.com/ssl-hep/ServiceX into 11…
MattShirley 8fc3645
Merge branch '1162-support-custom-topcp-images' of https://github.com…
MattShirley d7bb6cd
add back runTop_el
MattShirley e5024d0
remove old test files
MattShirley 0125f41
fix local volume mount
MattShirley b49b9ee
change reload to mountLocal
MattShirley f799896
Merge branch 'develop' of https://github.com/ssl-hep/ServiceX into 11…
MattShirley 6686336
update helm charts and other config stuff
MattShirley 0f4f3f4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 8aeff9e
resolve flake8
MattShirley c9aaf95
Merge branch '1162-support-custom-topcp-images' of https://github.com…
MattShirley 981504b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 28523ed
move boot.sh
MattShirley c60e495
Merge branch '1162-support-custom-topcp-images' of https://github.com…
MattShirley ce26f8f
update boot.sh command
MattShirley 6c2059f
update test coverage
MattShirley 3dfd2ad
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5aa97d6
resolve flake8
MattShirley 8aa6bf2
Merge branch '1162-support-custom-topcp-images' of https://github.com…
MattShirley 8cce096
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 01c453a
resolve flake8 again
MattShirley 91343d2
remove unneeded defaultBaseImage from values.yaml
MattShirley a172125
properly source app config values
MattShirley 78ddeac
resolve flake8
MattShirley 6bbd73b
update tests to use app.config
MattShirley 1f20afe
resolve flake8
MattShirley f8b8dde
remove local dev related changes
MattShirley d03f8ba
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 1098084
remove Procfile changes from this PR
MattShirley f9fe691
Merge branch '1162-support-custom-topcp-images' of https://github.com…
MattShirley cdc29c2
add topcp codegen values to reference.md
MattShirley e2e076c
correct topcp pullpolicy
MattShirley 1b140d0
move custom image logic to topcp codegen
MattShirley eea313b
move boot.sh back
MattShirley e348931
remove comment
MattShirley 2ba1a2a
move docker image validation tests to codegen
MattShirley 50c542c
flake8/black
MattShirley 5fc9d75
flake8
MattShirley c45ad9f
revert submit.py
MattShirley 7141637
remove TOPCP_CUSTOM_IMAGES from app template
MattShirley 1d9fab9
remove custom_image from generate_code_for_selection
MattShirley 4cca0aa
flake8
MattShirley c688ece
add new codegen topcp custom docker image test
MattShirley c956c90
update test
MattShirley 8a1d8a5
add json parsing check to topcp codegen startup
MattShirley 2a5f730
check to make sure allowed_images_json is truthy
MattShirley 53448d8
Merge branch 'develop' into 1162-support-custom-topcp-images
MattShirley 32293b5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 19601a7
cleanup merge conflict
MattShirley 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
Empty file.
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
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
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 |
|---|---|---|
|
|
@@ -183,6 +183,11 @@ data: | |
| CODE_GEN_IMAGES = { {{ join "," $code_gen_images }} } | ||
| {{- end }} | ||
|
|
||
| {{- if .Values.codeGen.topcp.enabled }} | ||
| # TopCP custom image configuration | ||
| TOPCP_ALLOWED_IMAGES = {{ .Values.codeGen.topcp.allowedImages | toJson | quote }} | ||
|
||
| {{- end }} | ||
|
|
||
| {{- $didFinders := list }} | ||
| {{- if .Values.didFinder.CERNOpenData.enabled }} | ||
| {{- $didFinders = append $didFinders "cernopendata" }} | ||
|
|
||
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
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 |
|---|---|---|
|
|
@@ -25,6 +25,8 @@ | |
| # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
| # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| from typing import Optional | ||
|
|
||
| import requests | ||
| from requests_toolbelt.multipart import decoder | ||
|
|
||
|
|
@@ -43,7 +45,11 @@ def post_request(self, post_url, post_obj): | |
| return result | ||
|
|
||
| def generate_code_for_selection( | ||
| self, request_record: TransformRequest, namespace: str, user_codegen_name: str | ||
| self, | ||
| request_record: TransformRequest, | ||
| namespace: str, | ||
| user_codegen_name: str, | ||
| custom_image: Optional[str] = None, | ||
|
||
| ) -> tuple[str, str, str, str]: | ||
| """ | ||
| Generates the C++ code for a request's selection string. | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
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.
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 this be moved to the codegen's
__init__so that if there is a formatting error in the ALLOWED_IMAGES it will fail at startup instead of the first time someone submits?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 function call can't go in
__init__.pybecause there's nothing to compare it to. However, I added a check increate_appto validate the JSON parsing of of TOPCP_ALLOWED_IMAGES. And I removed type guarding fromvalidate_custom_docker_image.