-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[Playground] GetMetadata() endpoint #25610
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
damccorm
merged 29 commits into
apache:master
from
akvelon:get-metadata-endpoint-playground
Mar 24, 2023
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
9297acc
Add stubs for GetMetadata endpoint
TSultanov 8d9de57
Add GetMetadata() endpoint to controller
TSultanov a9a5510
Add Beam SDK version to go build
TSultanov 42b5dba
Remove commented out code
TSultanov 4fd3753
Change BuildCommitTimestamp type to int64
TSultanov ecd840a
Reformat containers build.gradle
TSultanov 5877451
Change syntax in git-functions.gradle
TSultanov 92fe2b4
Make build_commit and beam_sdk fields optional
TSultanov 90278a3
Update Tour of Beam protocol definitions to reflect Playground protoc…
TSultanov 5cf5099
Show versions on the frontend (#22271)
alexeyinkin 62fe1e7
Remove config.g.dart generation (#22271)
alexeyinkin 0d41f15
Add config.g.dart (#22271)
alexeyinkin 2ffc78e
Address review comments (#22271)
alexeyinkin ee51109
Clean up (#22271)
alexeyinkin 097f468
Clean up (#22271)
alexeyinkin 55c5c25
Add license to build_metadata.g.dart (#22271)
alexeyinkin b7b1e9e
Address review comments (#22271)
alexeyinkin 3d581e5
Address review comments (#22271)
alexeyinkin 0d31d6f
Merge remote-tracking branch 'upstream/master' into get-metadata-endp…
TSultanov 26edffd
Add a TODO (#22271)
alexeyinkin e343078
Fix tabulation
TSultanov ce86f05
Remove optional fields from Playground protocol
TSultanov f738096
Document the backend lookup (#22271)
alexeyinkin 222bcf3
Improve handling of empty values coming from GetMetadataResponse (#22…
alexeyinkin 0e45fbc
Merge remote-tracking branch 'apache/master' into get-metadata-endpoi…
alexeyinkin 96badc3
Fix integration tests (#22271)
alexeyinkin 8a6c166
Merge remote-tracking branch 'upstream/master' into get-metadata-endp…
TSultanov 1cff6fd
Remove protoc requirement from Readme
TSultanov 1336e8e
Remove trailing whitespace
TSultanov 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
521 changes: 340 additions & 181 deletions
521
learning/tour-of-beam/backend/playground_api/api/v1/api.pb.go
Large diffs are not rendered by default.
Oops, something went wrong.
38 changes: 38 additions & 0 deletions
38
learning/tour-of-beam/backend/playground_api/api/v1/api_grpc.pb.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
56 changes: 56 additions & 0 deletions
56
learning/tour-of-beam/backend/playground_api/api/v1/mock.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| // Licensed to the Apache Software Foundation (ASF) under one or more | ||
| // contributor license agreements. See the NOTICE file distributed with | ||
| // this work for additional information regarding copyright ownership. | ||
| // The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| // (the "License"); you may not use this file except in compliance with | ||
| // the License. You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| package main | ||
|
|
||
| // This file is intended to store build-time variables. | ||
| // To set a value to any of this variable use '-ldflags="-X main.<variable_name>=<variable_value>"' | ||
| // option when invoking 'go build'. | ||
|
|
||
| // BuildCommitHash will contain hash of git commit from which the application is built | ||
| var BuildCommitHash string | ||
|
|
||
| // BuildCommitTimestamp will contain timestamp of git commit from which the application is built | ||
| var BuildCommitTimestamp string |
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,37 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * License); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an AS IS BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| ext.getGitCommitHash = () -> { | ||
| def stdout = new ByteArrayOutputStream() | ||
| exec { | ||
| executable('git') | ||
| args('rev-parse', 'HEAD') | ||
| standardOutput = stdout | ||
| } | ||
| return stdout.toString().trim() | ||
| } as Closure<String> | ||
|
|
||
| ext.getGitCommitTimestamp = () -> { | ||
| def stdout = new ByteArrayOutputStream() | ||
| exec { | ||
| executable('git') | ||
| args('show', '-s', '--format=%ct', 'HEAD') | ||
| standardOutput = stdout | ||
| } | ||
| return stdout.toString().trim() | ||
| } as Closure<String> | ||
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
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.
Why is a gradle wrapper needed? Why not just run the command in the context where the value is needed?
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.
We need this in 6 separate locations:
The 5 backends may be similar but frontend and backend are still two rather distinct users of this. This motivates to do this in a single location like this because duplicating
git show -s --format=%ct HEADandgit rev-parse HEAD2-6 times is more confusing.Next, we cannot do this in Dockerfile because by the time it is built the directory is unaware of
.git.This leads to the requirement of having the values before the 6 containers' builds start. And their builds are triggered from Gradle. So we cannot shorten this to
command $(git rev-parse HEAD), we would still have the wholeexec { ... }thing but in 12 locations.