Repository navigation
Add workaround for weird CodeQL releasing schema #72
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Activity
I put
github/codeql-action/init@v2into the files now, and when I run the updater, it throws an exception (though it’s not clear from the context it’s the codeql one, I just ran the updater on an almost-copy of the.github/workflows/directory in another repo that had all but the codeql one, and it worked fine):2023-04-17T02:42:06.7521618Z return _run_code(code, main_globals, None, 2023-04-17T02:42:06.7521932Z File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code 2023-04-17T02:42:06.7522221Z exec(code, run_globals) 2023-04-17T02:42:06.7522489Z File "/app/src/main.py", line 473, in <module> 2023-04-17T02:42:06.7522765Z actions_version_updater.run() 2023-04-17T02:42:06.7523035Z File "/app/src/main.py", line 59, in run 2023-04-17T02:42:06.7523296Z self._update_workflow(workflow_path) 2023-04-17T02:42:06.7523603Z File "/app/src/main.py", line 149, in _update_workflow 2023-04-17T02:42:06.7523917Z new_version, new_version_data = self._get_new_version( 2023-04-17T02:42:06.7524233Z File "/app/src/main.py", line 360, in _get_new_version 2023-04-17T02:42:06.7524547Z latest_release_data = self._get_latest_version_release( 2023-04-17T02:42:06.7524884Z File "/app/src/main.py", line 290, in _get_latest_version_release 2023-04-17T02:42:06.7525152Z latest_release = next( 2023-04-17T02:42:06.7525414Z File "/app/src/main.py", line 292, in <lambda> 2023-04-17T02:42:06.7525740Z lambda r: self._release_filter_function(r, parsed_current_version), 2023-04-17T02:42:06.7526069Z File "/app/src/main.py", line 271, in filter_func 2023-04-17T02:42:06.7526395Z return any(check(release_tag, current_version) for check in checks) 2023-04-17T02:42:06.7526713Z File "/app/src/main.py", line 271, in <genexpr> 2023-04-17T02:42:06.7527035Z return any(check(release_tag, current_version) for check in checks) 2023-04-17T02:42:06.7527344Z File "/app/src/main.py", line 255, in <lambda> 2023-04-17T02:42:06.7527723Z checks.append(lambda r, c: parse(r["tag_name"]).major > c.major) 2023-04-17T02:42:06.7528161Z AttributeError: 'LegacyVersion' object has no attribute 'major'The beginning is cut off, perhaps earlier in the log, but unsure.
The action now displays warning messages in such cases and will suggest the latest release instead of crashing. You can also skip
github/codeql-action/init@v2update by usingignoreoption.OK, not crashing, and ignoring it is one thing, but maybe have a whitelist of actions for which to not look at the releases but at tags instead would make sense?
- added a commit that references this issue
on Aug 12, 2023
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
github/codeql-action#1561 (comment) indicates that we shouldn’t look at “releases” for CodeQL.
Could you please add a workaround to the GHA version updater that handles
github/codeql-action/*specially?Thanks!