Skip to content
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

kiln bake always adds tile source revision and kiln version to kiln_metadata in product template #414

Merged
merged 7 commits into from
Aug 29, 2023

Conversation

crhntr
Copy link
Member

@crhntr crhntr commented Jul 7, 2023

this change ensures tile metadata always has kiln_metadata and the contents include the repository hash and the kiln CLI version.

All tile metadata files will now include a section like this:

  kiln_metadata:
+   metadata_git_sha: 5d2741ad92192521b7282a838f3ba24835cd3af2
+   kiln_version: "0.86.0"
  releases:
    - name: banana
      version: "1.2.3"
      sha1: "the sha 1 sum of the tarball file"
+     commit_sha: "the commit sha from release.MF"

The field name "metadata_git_sha" is a bit awkward but it is how releng (tas, ist, and tasw) have been doing it for years.

@cf-gitbot
Copy link
Member

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

@crhntr crhntr force-pushed the add-tile-source-revision branch 2 times, most recently from 1132b22 to 72b75f8 Compare July 31, 2023 23:06
@crhntr crhntr force-pushed the add-tile-source-revision branch 2 times, most recently from 2ba165e to 39dfcde Compare August 8, 2023 23:47
@crhntr crhntr marked this pull request as ready for review August 16, 2023 02:19
@crhntr crhntr requested a review from notrepo05 August 16, 2023 02:21
this refactor is in reponse to the Slack comment "this resilient enough to lots of things that might go wrong?"
reffering to the previous GitMetadataSHA implementation

I agree it was not simple. I hope this is better.
this was required to make the builder.ReleaseManifestReader.Read method not require an billy.FS
also allows upload of compiled releases
this reduces the responsibility of the builder package
it is no longer used in the local release source both rely on the tarball loading from the cargo package
internal/acceptance/bake/bake_test.go Outdated Show resolved Hide resolved
internal/commands/upload_release_test.go Show resolved Hide resolved
@notrepo05
Copy link
Contributor

Metadata appears correctly testing against hello-tile.

Copy link
Member

@rizwanreza rizwanreza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Change error message
  • Please test and make sure OpsManager is okay with this field.
  • Add context around where the prefactors are coming from
  • PR title and description can be clearer around what is impacted (kiln bake etc.)

@crhntr crhntr changed the title always add tile source revision and kiln version to kiln_metadata in product template kiln bake always adds tile source revision and kiln version to kiln_metadata in product template Aug 16, 2023
@crhntr
Copy link
Member Author

crhntr commented Aug 17, 2023

I was not able to test this on toolsmiths today. @notrepo05 if you don't get a chance to do it, I would be happy to do that test next week.

@pabloarodas
Copy link
Contributor

@crhntr @notrepo05 where you able to test the changes? let us know if everything went well so we can proceed and merge this PR.

@notrepo05
Copy link
Contributor

notrepo05 commented Aug 29, 2023

This passed an upgrade from a standard 4.0.7 sf-tas to a slightly changed "4.0.8-build.1" sf-tas built with this branch of Kiln on Toolsmith.

For reference, here's the added tile metadata:

kiln_metadata:
  metadata_git_sha: 8c2bfbbdcf77f5f4c3902012b368ae6d825d8a59
  kiln_version: unknown
Screenshot 2023-08-29 at 8 47 20 AM

@notrepo05
Copy link
Contributor

Hi @rizwanreza , I believe this is ready to be merged.

  • Change error message ✅
  • Please test and make sure OpsManager is okay with this field. ✅
  • Add context around where the prefactors are coming from ✅
    • These refactors are actually necessary for the functionality to add commit_sha to the releases section. This was miscommunicated.
  • PR title and description can be clearer around what is impacted (kiln bake etc.) ✅

@rizwanreza
Copy link
Member

@pabloarodas Approved the changes.

@pabloarodas pabloarodas merged commit 0e2d6e2 into main Aug 29, 2023
3 checks passed
@pabloarodas pabloarodas deleted the add-tile-source-revision branch August 29, 2023 19:26
@pabloarodas
Copy link
Contributor

@notrepo05 when will you need a kiln release including these changes?

@notrepo05
Copy link
Contributor

@pabloarodas I think the sooner the better- essentially we're overdue. @crhntr might have a specific date in mind though

@pabloarodas
Copy link
Contributor

@pabloarodas I think the sooner the better- essentially we're overdue. @crhntr might have a specific date in mind though

Ok, I'm trying to get merged several of the open PRs so we can have a single release including all the features

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants