-
Notifications
You must be signed in to change notification settings - Fork 11
fix(agent-data-plane): fail the build when release metadata is missing #2345
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
jszwedko
wants to merge
4
commits into
main
Choose a base branch
from
jszwedko/fail-on-placeholder-build-metadata
base: main
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 all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
fc0d313
fix(agent-data-plane): fail the build when release metadata is missing
jszwedko 6b3c59c
chore(agent-data-plane): tighten the release metadata check comment
jszwedko 03247a3
fix(ci): forward APP_DEV_BUILD into the Windows release build container
jszwedko cd28248
fix(ci): supply complete app metadata in the Windows integration tests
jszwedko 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
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 |
|---|---|---|
|
|
@@ -46,15 +46,15 @@ Install-CachedZipTool ` | |
|
|
||
| # saluki-metadata reads these at build time. Must match the values the Makefile passes through | ||
| # (ADP_APP_FULL_NAME / ADP_APP_SHORT_NAME / ADP_APP_IDENTIFIER / ADP_APP_GIT_HASH / | ||
| # ADP_APP_VERSION / ADP_APP_BUILD_DATE in Makefile) so the Windows binary identifies itself | ||
| # ADP_APP_VERSION / ADP_APP_BUILD_TIME in Makefile) so the Windows binary identifies itself | ||
| # the same way as the linux/darwin binaries do. | ||
| $env:APP_FULL_NAME = "Agent Data Plane" | ||
| $env:APP_SHORT_NAME = "data-plane" | ||
| $env:APP_IDENTIFIER = "agent-data-plane" | ||
| $env:APP_VERSION = $env:ADP_VERSION | ||
| # Windows PowerShell 5.1 (the default `powershell.exe` in the LTSC2022 build image) doesn't | ||
| # have Get-Date's -AsUTC switch (added in PS 7.1). ToUniversalTime() works on both. | ||
| $env:APP_BUILD_DATE = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") | ||
| $env:APP_BUILD_TIME = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was using the wrong name. |
||
| if (-not $env:APP_GIT_HASH) { | ||
| $env:APP_GIT_HASH = if ($env:CI_COMMIT_SHA) { | ||
| $env:CI_COMMIT_SHA.Substring(0, [Math]::Min(7, $env:CI_COMMIT_SHA.Length)) | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -59,9 +59,21 @@ Invoke-Native docker version | |
| Write-Host "[*] Building Panoramic and Agent Data Plane for Windows..." | ||
| # saluki-metadata reads these at build time. They must match the values that | ||
| # the Linux Makefile passes through, otherwise ADP's log subagent prefix | ||
| # renders as "UNKNOWN" instead of "DATAPLANE". | ||
| # renders as "UNKNOWN" instead of "DATAPLANE". Keep the set complete: saluki-metadata | ||
| # rejects partial metadata on release builds, so a gap here would break this job if it | ||
| # were ever handed APP_DEV_BUILD=false. | ||
| $env:APP_FULL_NAME = "Agent Data Plane" | ||
| $env:APP_SHORT_NAME = "data-plane" | ||
| $env:APP_IDENTIFIER = "adp" | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sets missing variables. |
||
| # Mirrors ADP_APP_VERSION_AUTO in the Makefile: the version comes from ADP's manifest. | ||
| $AdpManifest = Join-Path $RepoRoot "bin\agent-data-plane\Cargo.toml" | ||
| $AdpVersionMatch = Select-String -Path $AdpManifest -Pattern '^version = "(.+)"' | Select-Object -First 1 | ||
| if (-not $AdpVersionMatch) { | ||
| throw "Could not read the ADP version from ${AdpManifest}" | ||
| } | ||
| $env:APP_VERSION = $AdpVersionMatch.Matches[0].Groups[1].Value | ||
| # Windows PowerShell 5.1 doesn't have Get-Date's -AsUTC switch (added in PS 7.1). | ||
| $env:APP_BUILD_TIME = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") | ||
| if (-not $env:APP_GIT_HASH) { | ||
| $env:APP_GIT_HASH = if ($env:CI_COMMIT_SHA) { | ||
| $env:CI_COMMIT_SHA.Substring(0, [Math]::Min(7, $env:CI_COMMIT_SHA.Length)) | ||
|
|
||
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
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.