Skip to content

Add workaround for weird CodeQL releasing schema #72

Description

@mirabilos

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!

Activity

  1. mirabilos commented on Apr 17, 2023

    @mirabilos
    Author

    I put github/codeql-action/init@v2 into 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.

  2. saadmk11 commented on Aug 5, 2023

    @saadmk11
    Owner

    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@v2 update by using ignore option.

  3. mirabilos commented on Aug 6, 2023

    @mirabilos
    Author

    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?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions