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

Add to irrelevant_files list #217

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 58 additions & 4 deletions .zuul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,26 @@
roles:
- zuul: github.com/openstack-k8s-operators/ci-framework
required-projects: *required_projects
irrelevant-files: *irrelevant_files
irrelevant-files:
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks less than ideal. Can a combination of file and irrelevant-files be used?

Or perhaps a yaml anchor?
I looked at this article: https://medium.com/@kinghuang/docker-compose-anchors-aliases-extensions-a1e4105d70bd, I think something like this should work

irrelevant-files: &irrelevant_files 
    - the
    - list
    - of
    - files

### some other content

- irrelevant-files:
    - <<: *irrelevant_files
    - another
    - file

Copy link
Contributor Author

@ayefimov-1 ayefimov-1 Feb 4, 2025

Choose a reason for hiding this comment

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

Tried the following with failure:

######################################
    irrelevant-files:
      <<: *irrelevant_files
      - roles/telemetry_graphing
      - roles/telemetry_autoscaling
      - roles/telemetry_verify_metrics
#   (LINT FAILURE)
######################################
    irrelevant-files:
      - <<: *irrelevant_files
      - roles/telemetry_graphing
      - roles/telemetry_autoscaling
      - roles/telemetry_verify_metrics
#   (Lint FAILURE)
######################################
    irrelevant-files:
      - *irrelevant_files
      - roles/telemetry_graphing
      - roles/telemetry_autoscaling
      - roles/telemetry_verify_metrics
#   (Build failure)  expected a dictionary @ data['irrelevant-files'][0]
#######################################
    irrelevant-files: *irrelevant_files
      - roles/telemetry_graphing
      - roles/telemetry_autoscaling
      - roles/telemetry_verify_metrics
#   ( LINT FAILURE )
########################################
    irrelevant-files:
      *irrelevant_files
      - roles/telemetry_graphing
      - roles/telemetry_autoscaling
      - roles/telemetry_verify_metrics
#   (Buuildset result ERROR)  expected a dictionary @ data['irrelevant-files'][0]

Copy link
Contributor Author

@ayefimov-1 ayefimov-1 Feb 4, 2025

Choose a reason for hiding this comment

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

Per rhos-prodchain-support:

dr.shimi
:meow_puffy-terrified:  [Yesterday at 18:45](https://redhat-internal.slack.com/archives/C0836QJNBF1/p1738626346118159?thread_ts=1738168284.356889&cid=C0836QJNBF1)
so this is problem with YAML parsers...

dr.shimi
:meow_puffy-terrified:  [Yesterday at 18:46](https://redhat-internal.slack.com/archives/C0836QJNBF1/p1738626367158379?thread_ts=1738168284.356889&cid=C0836QJNBF1)
I cannot tell much, but AFAIK it works well with mappings/dictionaries, but not with lists

dr.shimi
:meow_puffy-terrified:  [Yesterday at 18:46](https://redhat-internal.slack.com/archives/C0836QJNBF1/p1738626403827689?thread_ts=1738168284.356889&cid=C0836QJNBF1)
I mean, the anchors stuff and extending the defintions

dr.shimi
:meow_puffy-terrified:  [Yesterday at 18:47](https://redhat-internal.slack.com/archives/C0836QJNBF1/p1738626471739599?thread_ts=1738168284.356889&cid=C0836QJNBF1)
you can sort of workaround it by defining it as dictionary in helper variable and then reusing that variable with list jinja filter, but that's ugly...

dr.shimi
:meow_puffy-terrified:  [Yesterday at 18:48](https://redhat-internal.slack.com/archives/C0836QJNBF1/p1738626492350889?thread_ts=1738168284.356889&cid=C0836QJNBF1)
TL;DR no nice solution as far as I know

Copy link
Collaborator

Choose a reason for hiding this comment

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

Boo! (not directed at anyone)
This is annoying, but since it works and the alternatives were unsuccessful, then it'll have to do.
Thank you for looking at this and testing the alternatives.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that the irrelevant-files should support matching on regular expressions. It could make the list look tidier, and prevent issues later when new roles get added

Please try that out if it's not a huge effort (perhaps as a follow-up PR once this is done)

# *irrelevant_files
- .github/.*
- ci/github/.*
- callback_plugins/.*
- README*
- .*/*.md
- roles/client_side_tests/.*
- roles/test_alerts/.*
- roles/test_collectd/.*
- roles/test_metrics_retention/.*
- roles/test_observability_strategy/.*
- roles/test_qdr/.*
- roles/test_sensubility/.*
- roles/test_snmp_traps/.*
- roles/test_verify_email/.*
#
- roles/telemetry_graphing
- roles/telemetry_autoscaling
- roles/telemetry_verify_metrics

- job:
name: functional-metric-verification-tests-osp18
Expand All @@ -75,7 +94,25 @@
roles:
- zuul: github.com/openstack-k8s-operators/ci-framework
required-projects: *required_projects
irrelevant-files: *irrelevant_files
irrelevant-files:
# *irrelevant_files
- .github/.*
- ci/github/.*
- callback_plugins/.*
- README*
- .*/*.md
- roles/client_side_tests/.*
- roles/test_alerts/.*
- roles/test_collectd/.*
- roles/test_metrics_retention/.*
- roles/test_observability_strategy/.*
- roles/test_qdr/.*
- roles/test_sensubility/.*
- roles/test_snmp_traps/.*
- roles/test_verify_email/.*
#
- roles/telemetry_graphing
- roles/telemetry_logging

- job:
name: feature-verification-tests-noop
Expand All @@ -101,8 +138,25 @@
roles:
- zuul: github.com/openstack-k8s-operators/ci-framework
required-projects: *required_projects
irrelevant-files: *irrelevant_files

irrelevant-files:
# *irrelevant_files
- .github/.*
- ci/github/.*
- callback_plugins/.*
- README*
- .*/*.md
- roles/client_side_tests/.*
- roles/test_alerts/.*
- roles/test_collectd/.*
- roles/test_metrics_retention/.*
- roles/test_observability_strategy/.*
- roles/test_qdr/.*
- roles/test_sensubility/.*
- roles/test_snmp_traps/.*
- roles/test_verify_email/.*
#
- roles/telemetry_logging
- roles/telemetry_verify_metrics

- project:
name: infrawatch/feature-verification-tests
Expand Down