sync-internal-tags needs to run before sync-snaps on release day

Bug #1971503 reported by Kevin W Monroe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Charmed Kubernetes Testing
New
Undecided
Unassigned

Bug Description

The sync-internal-tags job runs every 12 hours. It ran just before 1.24 GA was released upstream. This means our internal k8s fork did not have the 1.24.0 tag.

Then sync-snaps ran and tried to figure out a non pre-release semver based on the branch name. That failed like this:

-----
15:23:30 20:23:30 | INFO [kube-apiserver] Latest branch version 1.23.6
15:23:30 20:23:30 | INFO [kube-apiserver] > Versions match 1.23.6 == 1.23.6, not building a new snap
15:23:30 20:23:30 | INFO [kube-apiserver] > Checking snaps in version 1.24 for arch amd64
15:23:30 20:23:30 | INFO [kube-apiserver] Found snap version 1.24.0-rc.1 at revision 2756 for 1.24/edge
15:23:32 Traceback (most recent call last):
15:23:32 File "jobs/sync-upstream/sync.py", line 405, in <module>
15:23:32 cli()
15:23:32 File "/var/lib/jenkins/slaves/jenkins-slave-focal-3/workspace/sync-snaps/.tox/py38/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
15:23:32 return self.main(*args, **kwargs)
15:23:32 File "/var/lib/jenkins/slaves/jenkins-slave-focal-3/workspace/sync-snaps/.tox/py38/lib/python3.8/site-packages/click/core.py", line 1055, in main
15:23:32 rv = self.invoke(ctx)
15:23:32 File "/var/lib/jenkins/slaves/jenkins-slave-focal-3/workspace/sync-snaps/.tox/py38/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
15:23:32 return _process_result(sub_ctx.command.invoke(sub_ctx))
15:23:32 File "/var/lib/jenkins/slaves/jenkins-slave-focal-3/workspace/sync-snaps/.tox/py38/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
15:23:32 return ctx.invoke(self.callback, **ctx.params)
15:23:32 File "/var/lib/jenkins/slaves/jenkins-slave-focal-3/workspace/sync-snaps/.tox/py38/lib/python3.8/site-packages/click/core.py", line 760, in invoke
15:23:32 return __callback(*args, **kwargs)
15:23:32 File "jobs/sync-upstream/sync.py", line 370, in snaps
15:23:32 snap_service_obj.sync_all_track_snaps()
15:23:32 File "/var/lib/jenkins/slaves/jenkins-slave-focal-3/workspace/sync-snaps/cilib/service/snap.py", line 149, in sync_all_track_snaps
15:23:32 self.snap_model.base.latest_branch_from_major_minor(
15:23:32 File "/var/lib/jenkins/slaves/jenkins-slave-focal-3/workspace/sync-snaps/cilib/models/repos/__init__.py", line 63, in latest_branch_from_major_minor
15:23:32 return self._latest_from_semver(self.branches, major_minor, exclude_pre)
15:23:32 File "/var/lib/jenkins/slaves/jenkins-slave-focal-3/workspace/sync-snaps/cilib/models/repos/__init__.py", line 102, in _latest_from_semver
15:23:32 max_ver = max(map(version.parse, _semvers))
15:23:32 ValueError: max() arg is an empty sequence
15:23:32 ERROR: InvocationError for command /var/lib/jenkins/slaves/jenkins-slave-focal-3/workspace/sync-snaps/.tox/py38/bin/python jobs/sync-upstream/sync.py snaps (exited with code 1)
-----

We need to either adjust the timing of those 2 jobs, handle errors gracefully, or both.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.