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

feat(trait): add InfluencesBuild() func #4512

Merged
merged 1 commit into from
Jun 26, 2023
Merged

Conversation

squakez
Copy link
Contributor

@squakez squakez commented Jun 26, 2023

With this func we have a lower level of granularity, giving the possibility to each trait to define when influences a build.

Closes #4511

Release Note

feat(trait): add InfluencesBuild() func

With this func we have a lower level of granularity, giving the possibility to each trait to define when influences a build.

Closes apache#4511
@squakez squakez added the kind/feature New feature or request label Jun 26, 2023
Copy link
Contributor

@gansheer gansheer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good !

@christophd
Copy link
Contributor

many thanks. that's a very good enhancement

@squakez squakez merged commit f3a76b4 into apache:main Jun 26, 2023
16 checks passed
@squakez squakez deleted the fix/4511 branch June 26, 2023 12:24
squakez added a commit to squakez/camel-k that referenced this pull request Mar 7, 2024
Reverting apache#4512 which introduced a function diverging the match from the original design
squakez added a commit to squakez/camel-k that referenced this pull request Mar 8, 2024
Reverting apache#4512 which introduced a function diverging the match from the original design
squakez added a commit to squakez/camel-k that referenced this pull request Mar 11, 2024
Reverting apache#4512 which introduced a function diverging the match from the original design
squakez added a commit to squakez/camel-k that referenced this pull request Mar 11, 2024
Reverting apache#4512 which introduced a function diverging the match from the original design
squakez added a commit to squakez/camel-k that referenced this pull request Mar 12, 2024
Reverting apache#4512 which introduced a function diverging the match from the original design
squakez added a commit that referenced this pull request Mar 12, 2024
Reverting #4512 which introduced a function diverging the match from the original design
realMartinez added a commit to realMartinez/camel-k that referenced this pull request Mar 25, 2024
doc: generated documentation

chore: added E2E test for logging category

chore: changed e2e test to use IntegrationLogs

doc: generated documentation

chore: nightly automatic updates

fix(trait): deprecate operator inspecting secrets

Eventually remove this feature which is making the operator to inspect the list of namespaces secrets

fix(quarkus): build time properties into file

Moving from maven based approach to a file approach in order to let be able to use any character which may be a limitation in pom.xml

Closes apache#5195

fix(e2e): stricter pipe test check

chore: nightly automatic updates

chore(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.4 to 1.9.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.8.4...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

chore: nightly automatic updates

fix(ci): add snapshot repo

For those unit test requiring it.

chore(deps): bump golang.org/x/oauth2 from 0.17.0 to 0.18.0

Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.17.0 to 0.18.0.
- [Commits](golang/oauth2@v0.17.0...v0.18.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

chore: nightly automatic updates

feat(ci): upgrade golang to 1.21

Closes apache#4795

chore(traits): deprecate registry

fix(trait): watch for resource versions...

...instead of for their content.

chore: nightly automatic updates

fix(ci): swap deprecation notice

fix(ci): lint for 1.21

chore(deps): bump github.com/cloudevents/sdk-go/v2 from 2.13.0 to 2.15.2

Bumps [github.com/cloudevents/sdk-go/v2](https://github.com/cloudevents/sdk-go) from 2.13.0 to 2.15.2.
- [Release notes](https://github.com/cloudevents/sdk-go/releases)
- [Commits](cloudevents/sdk-go@v2.13.0...v2.15.2)

---
updated-dependencies:
- dependency-name: github.com/cloudevents/sdk-go/v2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

chore(lint): Error nil check: use require.NoError

chore(lint): Error not nil check: use require.Error

chore(lint): assert NoError check: use require.NoError

chore(lint): assert Error check: use require.Error

chore(lint): Use golangci-lint version matching go version 1.21

chore(lint): Fix lint errors

chore(lint): Ignore tests

chore(lint): Fix lint errors

chore(lint): Skip test_support go files

chore(lint): Fix lint errors

chore: nightly automatic updates

chore(deps): bump github.com/prometheus/common from 0.48.0 to 0.50.0

Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.48.0 to 0.50.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](prometheus/common@v0.48.0...v0.50.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

fix(build): Container image upgrad to golang 1.21

fix(cron): Add documentation and test on multiple sources

Closes apache#5158

fix(quarkus): don't override application.properties

fix(ctrl): message digest change

Change of a digest would reset an Integration, but a rebuild may not be required.

Closes apache#5219

fix(cmd): delete KameletBinding until they exists

Closes apache#5156

fix(trait): revert persisted status

The work done in apache#5153 is based on the wrong assumption that a trait status can be persisted at any point of the Integration/IntegrationKit lifecycle
This cannot be always true, because the resource move towards different .status.phase with the execution of its logic or not depending on the phase.
Therefore we cannot persist in a consistent way, as the status would reflect the latest execution of a trait which may happen in a different phase (and would be overridden by the new execution phase).
The best way to deal with this, at this stage, seems to be the usage of .status.conditions in order to warn that some trait value was overwritten.

chore(e2e): Improve E2E tests

- Improve common-it to use separate test namespace and default global operator
- Create default integration kits with global operator before tests are run
- TestMain func() creates commonly used Camel K integrations before the test so the integration kits are reused during the test run
- Reuse default integration kits (type=external image) in all test namespaces with custom operator installation
- Reduces builds of integration kits in tests
- Fix missing IntegrationProfile CRD
- Fix flaky update install tests

chore(e2e): Run E2E tests in parallel

chore(e2e): Use fresh Gomega instance for each test

- Recommended use of Gomega NewWithT() instead of RegisterTestingT() to get a fresh instance for each test
- Avoids concurrency errors when running tests in parallel

chore(e2e): Use operator instance per package in common tests

- Gain execution speed on GitHub CI jobs
- Custom Kamelets creation need to use proper operatorID

chore(e2e): Fix concurrent access to viper flags

chore(e2e): Skip cluster setup when installing Camel K operators in test namespaces

chore(e2e): Use separate operator instances for trait e2e tests

chore(e2e): Synchronize kamel install command in e2e tests

chore(e2e): Use separate viper instance per command

chore(e2e): Fix E2E tests

chore: nightly automatic updates

chore(e2e): Fix smoke tests

- Fix execution in Makefile after E2E tests refactoring

chore: fixed e2e to use integration logs

chore: updated e2e

chore: removed unnecessary code, fixed typos

fix(trait): changing data type for rollingUpdateMaxSurge and rollingUpdateMaxUnavailable to strings are also supported

chore: nightly automatic updates

fix(traits): use Comparable matches

Reverting apache#4512 which introduced a function diverging the match from the original design

Azure Key Vault Trait: Support Azure Identity as authentication method (apache#5244)

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>

chore: nightly automatic updates

chore(ci): Upgrade setup-kubectl action

chore: propagate capabilities to Kit

Useful in order to know what are the capabilities instead of inspecting the dependencies. It may also enable finer tuning on the kits matching.

chore(e2e): Add option to set base image and runtime version in E2E tests

- Useful when running native tests on a macOS arm64 machine (e.g. CAMEL_K_TEST_BASE_IMAGE=arm64v8/eclipse-temurin:17)
- Useful when running tests with SNAPSHOT runtime version (e.g. CAMEL_K_TEST_RUNTIME_VERSION=3.8.0-SNAPSHOT)

chore(e2e): Use new context instance for each E2E test

chore(e2e): Use UpdatePlatform func as it is more stable

chore(e2e): Improve Integration logs waiting for container created

- Avoid logs watch errors when container is still creating

chore(e2e): Use a shared context in E2E tests

chore(e2e): Do not run fast setup locally

- Only run main_test.go fast setup optimizations when env var is set (usually on GitHub CI workflow)

chore: nightly automatic updates

Install operator image according to the target architecture

Fixes apache#5200

chore: nightly automatic updates

chore(ci): Upgrade kind action to 2.0.4

Add Kamelet v1alpha1 sample (apache#5254)

chore: nightly automatic updates

chore: nightly automatic updates

chore: nightly automatic updates

Fix wrong Kamelet sample content (apache#5255)

chore: nightly automatic updates

fix(apache#5252): release-nightly does not build/push multiarch manifest

chore(deps): bump github.com/onsi/gomega from 1.31.1 to 1.32.0

Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.31.1 to 1.32.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](onsi/gomega@v1.31.1...v1.32.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

[chore] improve metrics for integration (apache#5154)

* [chore] improve metrics for integration

improve metrics for integrations, record a vector with integration_name and state

* [chore] add tests

* chore: change test dependency

* solve go.mod conflict

* chore: change test library and fix lint

chore: nightly automatic updates

chore: Use camel case for Pipe error handler ref

fix(ci): use ubuntu which now have 16 GB memory

Closes apache#4885

feat(trait): move runtime logic into trait catalog

chore: nightly automatic updates

chore(deps): bump github.com/docker/docker

Bumps [github.com/docker/docker](https://github.com/docker/docker) from 24.0.7+incompatible to 24.0.9+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](moby/moby@v24.0.7...v24.0.9)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

fix(apache#5238): Integration builds fail with arm64 base image

feat(traits): builder image platforms

doc(trait): sourceless Integrations

chore: nightly automatic updates

chore(deps): bump github.com/prometheus/common from 0.50.0 to 0.51.0

Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.50.0 to 0.51.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](prometheus/common@v0.50.0...v0.51.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

feat(catalog): support placeholders

Ref apache/camel-k-runtime#1192

chore(trait): add executed trait condition

chore(trait): polish conditions

Closes apache#5027

chore: nightly automatic updates

chore: nightly automatic updates

chore(deps): bump github.com/prometheus/common from 0.51.0 to 0.51.1

Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.51.0 to 0.51.1.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](prometheus/common@v0.51.0...v0.51.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

chore: added E2E test for logging category

chore: changed e2e test to use IntegrationLogs

chore: updated e2e

chore: removed unnecessary code, fixed typos
realMartinez added a commit to realMartinez/camel-k that referenced this pull request Mar 25, 2024
chore: added E2E test for logging category

chore: changed e2e test to use IntegrationLogs

doc: generated documentation

chore: nightly automatic updates

fix(trait): deprecate operator inspecting secrets

Eventually remove this feature which is making the operator to inspect the list of namespaces secrets

fix(quarkus): build time properties into file

Moving from maven based approach to a file approach in order to let be able to use any character which may be a limitation in pom.xml

Closes apache#5195

fix(e2e): stricter pipe test check

chore: nightly automatic updates

chore(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.4 to 1.9.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.8.4...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

chore: nightly automatic updates

fix(ci): add snapshot repo

For those unit test requiring it.

chore(deps): bump golang.org/x/oauth2 from 0.17.0 to 0.18.0

Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.17.0 to 0.18.0.
- [Commits](golang/oauth2@v0.17.0...v0.18.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

chore: nightly automatic updates

feat(ci): upgrade golang to 1.21

Closes apache#4795

chore(traits): deprecate registry

fix(trait): watch for resource versions...

...instead of for their content.

chore: nightly automatic updates

fix(ci): swap deprecation notice

fix(ci): lint for 1.21

chore(deps): bump github.com/cloudevents/sdk-go/v2 from 2.13.0 to 2.15.2

Bumps [github.com/cloudevents/sdk-go/v2](https://github.com/cloudevents/sdk-go) from 2.13.0 to 2.15.2.
- [Release notes](https://github.com/cloudevents/sdk-go/releases)
- [Commits](cloudevents/sdk-go@v2.13.0...v2.15.2)

---
updated-dependencies:
- dependency-name: github.com/cloudevents/sdk-go/v2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

chore(lint): Error nil check: use require.NoError

chore(lint): Error not nil check: use require.Error

chore(lint): assert NoError check: use require.NoError

chore(lint): assert Error check: use require.Error

chore(lint): Use golangci-lint version matching go version 1.21

chore(lint): Fix lint errors

chore(lint): Ignore tests

chore(lint): Fix lint errors

chore(lint): Skip test_support go files

chore(lint): Fix lint errors

chore: nightly automatic updates

chore(deps): bump github.com/prometheus/common from 0.48.0 to 0.50.0

Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.48.0 to 0.50.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](prometheus/common@v0.48.0...v0.50.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

fix(build): Container image upgrad to golang 1.21

fix(cron): Add documentation and test on multiple sources

Closes apache#5158

fix(quarkus): don't override application.properties

fix(ctrl): message digest change

Change of a digest would reset an Integration, but a rebuild may not be required.

Closes apache#5219

fix(cmd): delete KameletBinding until they exists

Closes apache#5156

fix(trait): revert persisted status

The work done in apache#5153 is based on the wrong assumption that a trait status can be persisted at any point of the Integration/IntegrationKit lifecycle
This cannot be always true, because the resource move towards different .status.phase with the execution of its logic or not depending on the phase.
Therefore we cannot persist in a consistent way, as the status would reflect the latest execution of a trait which may happen in a different phase (and would be overridden by the new execution phase).
The best way to deal with this, at this stage, seems to be the usage of .status.conditions in order to warn that some trait value was overwritten.

chore(e2e): Improve E2E tests

- Improve common-it to use separate test namespace and default global operator
- Create default integration kits with global operator before tests are run
- TestMain func() creates commonly used Camel K integrations before the test so the integration kits are reused during the test run
- Reuse default integration kits (type=external image) in all test namespaces with custom operator installation
- Reduces builds of integration kits in tests
- Fix missing IntegrationProfile CRD
- Fix flaky update install tests

chore(e2e): Run E2E tests in parallel

chore(e2e): Use fresh Gomega instance for each test

- Recommended use of Gomega NewWithT() instead of RegisterTestingT() to get a fresh instance for each test
- Avoids concurrency errors when running tests in parallel

chore(e2e): Use operator instance per package in common tests

- Gain execution speed on GitHub CI jobs
- Custom Kamelets creation need to use proper operatorID

chore(e2e): Fix concurrent access to viper flags

chore(e2e): Skip cluster setup when installing Camel K operators in test namespaces

chore(e2e): Use separate operator instances for trait e2e tests

chore(e2e): Synchronize kamel install command in e2e tests

chore(e2e): Use separate viper instance per command

chore(e2e): Fix E2E tests

chore: nightly automatic updates

chore(e2e): Fix smoke tests

- Fix execution in Makefile after E2E tests refactoring

chore: fixed e2e to use integration logs

chore: updated e2e

chore: removed unnecessary code, fixed typos

fix(trait): changing data type for rollingUpdateMaxSurge and rollingUpdateMaxUnavailable to strings are also supported

chore: nightly automatic updates

fix(traits): use Comparable matches

Reverting apache#4512 which introduced a function diverging the match from the original design

Azure Key Vault Trait: Support Azure Identity as authentication method (apache#5244)

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>

chore: nightly automatic updates

chore(ci): Upgrade setup-kubectl action

chore: propagate capabilities to Kit

Useful in order to know what are the capabilities instead of inspecting the dependencies. It may also enable finer tuning on the kits matching.

chore(e2e): Add option to set base image and runtime version in E2E tests

- Useful when running native tests on a macOS arm64 machine (e.g. CAMEL_K_TEST_BASE_IMAGE=arm64v8/eclipse-temurin:17)
- Useful when running tests with SNAPSHOT runtime version (e.g. CAMEL_K_TEST_RUNTIME_VERSION=3.8.0-SNAPSHOT)

chore(e2e): Use new context instance for each E2E test

chore(e2e): Use UpdatePlatform func as it is more stable

chore(e2e): Improve Integration logs waiting for container created

- Avoid logs watch errors when container is still creating

chore(e2e): Use a shared context in E2E tests

chore(e2e): Do not run fast setup locally

- Only run main_test.go fast setup optimizations when env var is set (usually on GitHub CI workflow)

chore: nightly automatic updates

Install operator image according to the target architecture

Fixes apache#5200

chore: nightly automatic updates

chore(ci): Upgrade kind action to 2.0.4

Add Kamelet v1alpha1 sample (apache#5254)

chore: nightly automatic updates

chore: nightly automatic updates

chore: nightly automatic updates

Fix wrong Kamelet sample content (apache#5255)

chore: nightly automatic updates

fix(apache#5252): release-nightly does not build/push multiarch manifest

chore(deps): bump github.com/onsi/gomega from 1.31.1 to 1.32.0

Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.31.1 to 1.32.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](onsi/gomega@v1.31.1...v1.32.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

[chore] improve metrics for integration (apache#5154)

* [chore] improve metrics for integration

improve metrics for integrations, record a vector with integration_name and state

* [chore] add tests

* chore: change test dependency

* solve go.mod conflict

* chore: change test library and fix lint

chore: nightly automatic updates

chore: Use camel case for Pipe error handler ref

fix(ci): use ubuntu which now have 16 GB memory

Closes apache#4885

feat(trait): move runtime logic into trait catalog

chore: nightly automatic updates

chore(deps): bump github.com/docker/docker

Bumps [github.com/docker/docker](https://github.com/docker/docker) from 24.0.7+incompatible to 24.0.9+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](moby/moby@v24.0.7...v24.0.9)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

fix(apache#5238): Integration builds fail with arm64 base image

feat(traits): builder image platforms

doc(trait): sourceless Integrations

chore: nightly automatic updates

chore(deps): bump github.com/prometheus/common from 0.50.0 to 0.51.0

Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.50.0 to 0.51.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](prometheus/common@v0.50.0...v0.51.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

feat(catalog): support placeholders

Ref apache/camel-k-runtime#1192

chore(trait): add executed trait condition

chore(trait): polish conditions

Closes apache#5027

chore: nightly automatic updates

chore: nightly automatic updates

chore(deps): bump github.com/prometheus/common from 0.51.0 to 0.51.1

Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.51.0 to 0.51.1.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](prometheus/common@v0.51.0...v0.51.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

chore: added E2E test for logging category

chore: changed e2e test to use IntegrationLogs

chore: updated e2e

chore: removed unnecessary code, fixed typos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updating a property will cause Integration to rebuild
4 participants