Add REPO_SNAPSHOT_TIME to the toolkit for package and image build.#10369
Merged
Add REPO_SNAPSHOT_TIME to the toolkit for package and image build.#10369
Conversation
dmcilvaney
reviewed
Sep 17, 2024
f94aa40 to
1430837
Compare
29c5f2e to
a7ef227
Compare
Base automatically changed from
sammeluch/add-snapshot-exclude-repo
to
3.0-dev
September 19, 2024 00:41
9377755 to
541f77a
Compare
dmcilvaney
reviewed
Sep 23, 2024
| endif | ||
|
|
||
| ifneq ($(REPO_SNAPSHOT_TIME),) | ||
| graphpkgfetcher_extra_flags += --repo-snapshot-time=$(REPO_SNAPSHOT_TIME) |
Contributor
There was a problem hiding this comment.
nit, feel free to ignore: Everywhere else this just gets passed unconditionally, maybe just do the same here?
dmcilvaney
approved these changes
Sep 23, 2024
…NAPSHOT_TIME changes
541f77a to
db86c9d
Compare
jslobodzian
reviewed
Oct 3, 2024
jslobodzian
reviewed
Oct 3, 2024
jslobodzian
reviewed
Oct 3, 2024
| timestamp.StartEvent("initialize and configure cloner", nil) | ||
|
|
||
| cloner, err := rpmrepocloner.ConstructCloner(*outDir, *tmpDir, *workertar, *existingRpmDir, *existingToolchainRpmDir, *tlsClientCert, *tlsClientKey, *repoFiles) | ||
| cloner, err := rpmrepocloner.ConstructCloner(*outDir, *tmpDir, *workertar, *existingRpmDir, *existingToolchainRpmDir, *tlsClientCert, *tlsClientKey, *repoFiles, *repoSnapshotTime) |
Collaborator
There was a problem hiding this comment.
what happens if we pass something null here?
Contributor
Author
There was a problem hiding this comment.
The parameter is null safe as handled by go. If the pointer is null, an empty/default value will be passed, in this case, the empty string due to the typing.
jslobodzian
reviewed
Oct 3, 2024
| buildNumber = app.Flag("build-number", "Build number to be used in the image.").String() | ||
| logFlags = exe.SetupLogFlags(app) | ||
| profFlags = exe.SetupProfileFlags(app) | ||
| app = kingpin.New("imager", "Tool to create and install images.") |
Collaborator
There was a problem hiding this comment.
what were the changes in this block?
Contributor
Author
There was a problem hiding this comment.
The change is on line 44 to add repoSnapshotTime. The rest is go making whitespace changes.
christopherco
approved these changes
Oct 4, 2024
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-staticsubpackages, etc.) have had theirReleasetag incremented../cgmanifest.json,./toolkit/scripts/toolchain/cgmanifest.json,.github/workflows/cgmanifest.json)./LICENSES-AND-NOTICES/SPECS/data/licenses.json,./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md,./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)*.signatures.jsonfilessudo make go-tidy-allandsudo make go-test-coveragepassSummary
What does the PR accomplish, why was it needed?
Enable the new --snapshottime feature of tdnf for presence when building an image or packages when pulling packages from pmc or packages pulled from the toolkit. Locally built packages are still taken over the snapshot of pmc or toolchain.
Additionally, a
snapshottime=<REPO_SNAPSHOT_TIME>is inserted into/etc/tdnf/tdnf.confwithin the vhdx or installed image from the iso to have the snapshot maintained even after the initial build of the image.Change Log
Does this affect the toolchain?
YES
Test Methodology