#263 Fix docker_label keyword and fix label caps
Merged 6 years ago by ausil. Opened 6 years ago by maxamillion.
maxamillion/pungi-fedora f26-fix-docker-labels  into  f26

file modified
+1 -6
@@ -229,12 +229,7 @@ 

                  'dockerversion': "1.10.1",

                  'docker_cmd':  '[ "/bin/bash" ]',

                  'docker_env': '[ "DISTTAG=f26container", "FGC=f26" ]',

-                 'docker_labels': {

-                     'Name': 'fedora',

-                     'License': u'MIT',

-                     'Vendor': 'Fedora Project',

-                     'Version': '26',

-                 },

+                 'docker_label': '{ "name": "fedora", "license": "MIT", "vendor": "Fedora Project", "version": "26"}',

              },

          },

          {

file modified
+1 -1
@@ -61,7 +61,7 @@ 

  # CREATEREPO

  createrepo_c = True

  createrepo_checksum = 'sha256'

- createrepo_deltas = False 

+ createrepo_deltas = False

  

  # CHECKSUMS

  media_checksums = ['sha256']

file modified
+2 -10
@@ -289,11 +289,7 @@ 

                  'dockerversion': "1.10.1",

                  'docker_cmd':  '[ "/usr/bin/bash" ]',

                  'docker_env': '[ "DISTTAG=f26container", "FGC=f26" ]',

-                 'docker_labels': {

-                     'Name': 'fedora',

-                     'License': u'MIT',

-                     'Vendor': 'Fedora Project',

-                     'Version': '26',

+                 'docker_label': '{ "name": "fedora", "license": "MIT", "vendor": "Fedora Project", "version": "26"}',

                  },

              },

          },
@@ -314,11 +310,7 @@ 

                  'dockerversion': "1.10.1",

                  'docker_cmd':  '[ "/usr/bin/bash" ]',

                  'docker_env': '[ "DISTTAG=f26container", "FGC=f26" ]',

-                 'docker_labels': {

-                     'Name': 'fedora-minimal',

-                     'License': u'MIT',

-                     'Vendor': 'Fedora Project',

-                     'Version': '26',

+                 'docker_label': '{ "name": "fedora", "license": "MIT", "vendor": "Fedora Project", "version": "26"}',

                  },

              },

          }

Previously the key 'docker_labels' was used but this isn't actually
picked up by imagefactory because the parameter key it's looking for
is 'docker_label'. This patch resolves that.

Also included in this patch is a change to set the labels to be
lowercase as defined in the Fedora Container Guidelines.

Signed-off-by: Adam Miller maxamillion@fedoraproject.org

fedora-beta.conf needs to not change. it is there for a historical record of the beta compose config

@maxamillion are you sure these are correct? since the docs has what we are using right now https://docs.pagure.org/pungi/configuration.html#id25 and the RC failed when I used the values from this PR
https://koji.fedoraproject.org/koji/taskinfo?taskID=20290824

Yeah, so it wasn't working previously and I assumed that was because the configuration key was incorrect as it is docker_labels in the pungi config but docker_label in the imagefactory code. I also couldn't find either value in the pungi code base so it didn't appear as though that key was being altered before being passed to the imagefactor plugin. I'll debug.

I found the issue, it turns out that my fix was almost correct. However that dict needs to actually be passed as a string because the python string output of a dict uses single quotes (') even if you define the dict using double quotes ("), and single quotes are invalid json. Also in here is an unicode entry (u"MIT") for the dict, which is also not valid json. I'll update the related PRs.

rebased

6 years ago

I would only change fedora-docker.conf for f26 branch

rebased

6 years ago

2 new commits added

  • fix the docker_label entry to be a valid JSON string
  • Fix docker_label keyword and fix label caps
6 years ago

rebased

6 years ago

Pull-Request has been merged by ausil

6 years ago