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

jqlang release v1.7 breaks packtivity #96

Closed
5 tasks done
matthewfeickert opened this issue Sep 17, 2023 · 6 comments
Closed
5 tasks done

jqlang release v1.7 breaks packtivity #96

matthewfeickert opened this issue Sep 17, 2023 · 6 comments
Assignees

Comments

@matthewfeickert
Copy link
Member

matthewfeickert commented Sep 17, 2023

jq (the language) had its first release in 5 years with jq v1.7, which includes some breaking changes.

jq the Python library added support for jqlang v1.7 in jq v1.6.0 and so v1.6.0 is also a breaking change for packtivity.

Action plan

of <1.6.0

@matthewfeickert matthewfeickert self-assigned this Sep 17, 2023
@matthewfeickert
Copy link
Member Author

cc @kratsg in the event that similar things hit any of your libraries.

matthewfeickert added a commit that referenced this issue Sep 17, 2023
* Place an upper limit on jq of '<1.6.0' as jq (the Python library)
  v1.6.x+ are compatible with jq (the language) v1.7+ and packtivity
  is currently compatible with jq (the language) v1.6.
   - This should be viewed as a temporary stopgap measure to avoid large
     yadage ecosystem breakage and should be reverted as soon as a
     workaround is found.
   - c.f. #96
@kratsg
Copy link

kratsg commented Sep 18, 2023

what actually breaks?

@matthewfeickert
Copy link
Member Author

Here's an example failure for

def test_multiproc(tmpdir, basic_localfs_state, localproc_packspec):
basic_localfs_state.ensure()
pars = pdm.create({"outputfile": "{workdir}/helloworld.txt"})
backend = MultiProcBackend(2)
proxy = backend.submit(localproc_packspec, pars, basic_localfs_state)
while not backend.ready(proxy):
pass
assert backend.successful(proxy)
assert backend.result(proxy).json() == {
"output": str(tmpdir.join("helloworld.txt"))
}
assert tmpdir.join("helloworld.txt").check() == True

=================================== FAILURES ===================================
________________________________ test_multiproc ________________________________

tmpdir = local('/tmp/pytest-of-runner/pytest-0/test_multiproc0')
basic_localfs_state = <LocalFSState rw: ['/tmp/pytest-of-runner/pytest-0/test_multiproc0'], ro: []>
localproc_packspec = {'environment': {'environment_type': 'localproc-env'}, 'process': {'cmd': 'echo Hello World > {outputfile}', 'process_type': 'string-interpolated-cmd'}, 'publisher': {'outputmap': {'output': 'outputfile'}, 'publisher_type': 'frompar-pub'}}

    def test_multiproc(tmpdir, basic_localfs_state, localproc_packspec):
        basic_localfs_state.ensure()
        pars = pdm.create({"outputfile": "{workdir}/helloworld.txt"})
        backend = MultiProcBackend(2)
        proxy = backend.submit(localproc_packspec, pars, basic_localfs_state)
        while not backend.ready(proxy):
            pass
>       assert backend.successful(proxy)
E       assert False
E        +  where False = <bound method MultiProcBackend.successful of <packtivity.asyncbackends.MultiProcBackend object at 0x7f68c3a[77](https://github.com/yadage/packtivity/actions/runs/6211558623/job/16860874815#step:6:78)160>>(<packtivity.asyncbackends.PacktivityProxyBase object at 0x7f68c3a1b4c0>)
E        +    where <bound method MultiProcBackend.successful of <packtivity.asyncbackends.MultiProcBackend object at 0x7f68c3a77160>> = <packtivity.asyncbackends.MultiProcBackend object at 0x7f68c3a77160>.successful

tests/test_asyncbackends.py:16: AssertionError
----------------------------- Captured stderr call -----------------------------
2023-09-17 04:27:26,0[86](https://github.com/yadage/packtivity/actions/runs/6211558623/job/16860874815#step:6:87) | pack.packtivity.step |   INFO | starting file logging for topic: step
_________________________________ test_maincli _________________________________

tmpdir = local('/tmp/pytest-of-runner/pytest-0/test_maincli0')

    def test_maincli(tmpdir):
        runner = CliRunner()
        result = runner.invoke(
            packtivity.cli.runcli,
            [
                "tests/testspecs/localtouchfile.yml",
                "-p",
                'outputfile="{workdir}/hello.txt"',
                "-w",
                str(tmpdir),
            ],
        )
>       assert result.exit_code == 0
E       AssertionError: assert 1 == 0
E        +  where 1 = <Result ValueError('jq: error: leaf_paths/0 is not defined at <top-level>, line 1:\nleaf_paths\njq: 1 compile error')>.exit_code

This kind of

jq: error: leaf_paths/0 is not defined at <top-level>, line 1:\nleaf_paths\njq: 1 compile error

is happening everywhere.

@matthewfeickert
Copy link
Member Author

I think it might be something like jqlang/jq#38 (comment)

@matthewfeickert
Copy link
Member Author

Ah, this would do it from https://github.com/jqlang/jq/releases/tag/jq-1.7:

Remove deprecated filters leaf_paths, recurse_down. @itchyny jqlang/jq#2666

given that leaf_paths is used in packtivity.

@matthewfeickert
Copy link
Member Author

Closing as resolved with https://github.com/yadage/packtivity/releases/tag/v0.16.2

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

No branches or pull requests

2 participants