Code Monkey home page Code Monkey logo

commodore-component-template's People

Contributors

glrf avatar haasad avatar happytetrahedron avatar kidswiss avatar mhutter avatar renovate[bot] avatar rxbn avatar simu avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

commodore-component-template's Issues

Add `--pull always` to the Docker options in the component's `Makefile.vars.mk`

Context

Recent versions of Docker Engine (20.10) and Podman (at least v2 and newer) support flag --pull always to specify that images should always be pulled. We should use this, as long as we're using :latest image tags for the container images we use in the component's Makefile.vars.mk`:

DOCKER_ARGS ?= run --rm -u "$$(id -u):$$(id -g)" --userns=$(DOCKER_USERNS) -w /$(COMPONENT_NAME) -e HOME="/$(COMPONENT_NAME)"

Alternatives

  • Switch to fixed image tags, and deal with renovate PRs on the template and the cascading PRs to update all components.

Add a "real" make target for `compile`

Context

We currently mark the make target for component compile as phony. This causes the component to be recompiled, regardless of whether that's necessary. By changing the target to a non-phony target we could leverage make's smart rebuilding for targets which need the compiled component (tests/golden diff/kubent/custom targets operating on the golden test outputs).

While this is not providing a big benefit for many components as we mainly use the targets based on .compile when making changes to the component implementation, there are some cases (e.g. rendering documentation from compiled manifests) where we save some time by reusing the compiled component manifests if no inputs have changed.

The original PR on the modulesync-control repo (projectsyn/modulesync-control#58) keeps the phony `.compile target, so that components which have custom make rules which depend on that target continue to work unchanged.

Update the template's `.editorconfig` for golden test outputs

The current template only has a minimal .editorconfig configuration for golden test outputs:

# Don't check for trailing newlines in golden tests output
[tests/golden/**]
insert_final_newline = unset

We had a more comprehensive config in the modulesync template:

https://github.com/projectsyn/modulesync-control/blob/bb736acbff62068695b525333ccc0184085bfb75/moduleroot/.editorconfig.erb#L32-L37

Additionally, because we've migrated existing components for which golden tests were disabled/didn't exist yet at creation time to a template version which unconditionally added the minimal config, we'll probably run into some merge conflicts after updating the template to use the more comprehensive configuration which was present in modulesync.

Actual Behavior

Editorconfig linting fails after enabling golden tests for a component which was originally templated without golden tests (see e.g. projectsyn/component-grafana-helm#26)

Expected Behavior

Editorconfig linting passes after enabling golden tests for a component which was originally templated without golden tests.

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.