Giter VIP home page Giter VIP logo

Comments (7)

allenporter avatar allenporter commented on June 27, 2024 1

@xoxys 💯 that's fantastic! I've copied the test example into the canonical set of test clusters used in the test framework and will get a fix out shortly.

from flux-local.

allenporter avatar allenporter commented on June 27, 2024

Yes, can take a look. Do you have a pointer to an example repo that exhibits the problem?

from flux-local.

xoxys avatar xoxys commented on June 27, 2024

Thanks. I've created a min reproduction repo at https://github.com/xoxys/flux-local-test. Home that helps.

from flux-local.

allenporter avatar allenporter commented on June 27, 2024

Releasing in 2.0.0

from flux-local.

xoxys avatar xoxys commented on June 27, 2024

@allenporter Thanks again. The build command works now but test fails:

flux-local test --enable-helm  --path ./flux -a "batch/v1/CronJob"
[...]
/usr/lib64/python3.11/asyncio/tasks.py:267: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = Command(cmd=['helm', 'template', 'renovate', 'flux-system-renovate/renovate', '--namespace', 'default', '--skip-crds',...w0269cv/repository-config.yaml'], cwd=None, exc=<class 'flux_local.exceptions.HelmException'>, retcodes=None, env=None)
stdin = None

    async def run(self, stdin: bytes | None = None) -> bytes:
        """Run the command, returning stdout."""
        _LOGGER.debug("Running command: %s", self)
        env = {
            **os.environ,
            **(self.env if self.env else {}),
        }
        proc = await asyncio.create_subprocess_shell(
            self.string,
            stdin=subprocess.PIPE,
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE,
            cwd=self.cwd,
            env=env,
        )
        out, err = await proc.communicate(stdin)
        if proc.returncode:
            if self.retcodes and proc.returncode in self.retcodes:
                return out
            errors = [f"Command '{self}' failed with return code {proc.returncode}"]
            if out:
                errors.append(out.decode("utf-8"))
            if err:
                errors.append(err.decode("utf-8"))
            _LOGGER.error("\n".join(errors))
>           raise self.exc("\n".join(errors))
E           flux_local.exceptions.HelmException: Command '(None) helm template renovate flux-system-renovate/renovate --namespace default --skip-crds --skip-tests --values /tmp/tmphw0269cv/default-renovate-values.yaml --registry-config /dev/null --repository-cache /tmp/tmprd4jz592 --repository-config /tmp/tmphw0269cv/repository-config.yaml' failed with return code 1
E           Error: execution error at (renovate/templates/cronjob.yaml:8:6): 
E           
E            ERROR: You must have at least batch/v1beta1 to use CronJob
E           
E           Use --debug flag to render out invalid YAML

../../.local/pipx/venvs/flux-local/lib64/python3.11/site-packages/flux_local/command.py:87: HelmException
------------------------------------------------------------------------------------- Captured log call --------------------------------------------------------------------------------------
ERROR    flux_local.command:command.py:86 Command '(None) helm template renovate flux-system-renovate/renovate --namespace default --skip-crds --skip-tests --values /tmp/tmphw0269cv/default-renovate-values.yaml --registry-config /dev/null --repository-cache /tmp/tmprd4jz592 --repository-config /tmp/tmphw0269cv/repository-config.yaml' failed with return code 1
Error: execution error at (renovate/templates/cronjob.yaml:8:6): 

 ERROR: You must have at least batch/v1beta1 to use CronJob

Use --debug flag to render out invalid YAML
================================================================================== short test summary info ===================================================================================
FAILED flux::kustomization::default/renovate - flux_local.exceptions.HelmException: Command '(None) helm template renovate flux-system-renovate/renovate --namespace default --skip-crds --skip-tests --values /tmp/tmphw0269cv/default-...

from flux-local.

allenporter avatar allenporter commented on June 27, 2024

Ok must have busted something during refactor

from flux-local.

allenporter avatar allenporter commented on June 27, 2024

Tagged 2.0.1 with a fix.
I've added the test repos to CI to make sure the tests are run in an additional way for every repo.

from flux-local.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.