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

fix(list-images): filter images by environment=production #9601

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

fruch
Copy link
Contributor

@fruch fruch commented Dec 22, 2024

in order to minimize the noise from development images, we should list as offical released images only images labels with environment=production

Testing

  • [ ]

PR pre-checks (self review)

  • I added the relevant backport labels
  • I didn't leave commented-out/debugging code

Reminders

  • Add New configuration option and document them (in sdcm/sct_config.py)
  • Add unit tests to cover my changes (under unit-test/ folder)
  • Update the Readme/doc folder relevant to this change (if needed)

in order to minimize the noise from development images,
we should list as offical released images only images labels
with `environment=production`
@fruch fruch requested a review from a team December 22, 2024 14:42
@fruch fruch marked this pull request as draft December 22, 2024 17:44
@fruch
Copy link
Contributor Author

fruch commented Dec 22, 2024

it's currently a bit problematic, since this label doesn't existing on older releases (i.e. ones used for oracle in gemini tests)
@yaronkaikov can we apply this label to all live releases images ?

@yaronkaikov
Copy link
Contributor

it's currently a bit problematic, since this label doesn't existing on older releases (i.e. ones used for oracle in gemini tests) @yaronkaikov can we apply this label to all live releases images ?

It's already applied on 6.1,6.2, 2024.1 and 2024.2

@fruch
Copy link
Contributor Author

fruch commented Dec 22, 2024

it's currently a bit problematic, since this label doesn't existing on older releases (i.e. ones used for oracle in gemini tests) @yaronkaikov can we apply this label to all live releases images ?

It's already applied on 6.1,6.2, 2024.1 and 2024.2

we are still using 2022.1 version as gemini oracle:

oracle_scylla_version: '2022.1.14'

so we'll need some backward compatibility, to move to using that tab

@yaronkaikov
Copy link
Contributor

it's currently a bit problematic, since this label doesn't existing on older releases (i.e. ones used for oracle in gemini tests) @yaronkaikov can we apply this label to all live releases images ?

It's already applied on 6.1,6.2, 2024.1 and 2024.2

we are still using 2022.1 version as gemini oracle:

oracle_scylla_version: '2022.1.14'

so we'll need some backward compatibility, to move to using that tab

Skip it :-), we are not going to release a new official AMI for that, i can add this tag manually on the latest one for main region or something if you can overcome it

@fruch
Copy link
Contributor Author

fruch commented Dec 23, 2024

it's currently a bit problematic, since this label doesn't existing on older releases (i.e. ones used for oracle in gemini tests) @yaronkaikov can we apply this label to all live releases images ?

It's already applied on 6.1,6.2, 2024.1 and 2024.2

we are still using 2022.1 version as gemini oracle:

oracle_scylla_version: '2022.1.14'

so we'll need some backward compatibility, to move to using that tab

Skip it :-), we are not going to release a new official AMI for that, i can add this tag manually on the latest one for main region or something if you can overcome it

I'll tag them myself, I found a way to do that quickly

Copy link
Contributor

@soyacz soyacz left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -1132,14 +1132,14 @@ def filter_k8s_clusters_by_tags(tags_dict: dict, clusters: list[
@lru_cache
def get_scylla_ami_versions(region_name: str, arch: AwsArchType = 'x86_64', version: str = None) -> list[EC2Image]:
Copy link
Contributor

Choose a reason for hiding this comment

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

it's used by get_latest_scylla_ami_release which is not used anywhere, maybe remove this function along so it's not distracting?

Copy link
Contributor

Choose a reason for hiding this comment

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

$ git grep get_scylla_ami_versions
sdcm/sct_config.py:    get_scylla_ami_versions,
sdcm/sct_config.py:                            ami = get_scylla_ami_versions(version=scylla_version, region_name=region, arch=aws_arch)[0]
sdcm/sct_config.py:                            ami = get_scylla_ami_versions(version=oracle_scylla_version,
sdcm/utils/common.py:def get_scylla_ami_versions(region_name: str, arch: AwsArchType = 'x86_64', version: str = None) -> list[EC2Image]:
sdcm/utils/common.py:    for ami in get_scylla_ami_versions(region_name=region):
sdcm/utils/common.py:            for ami in get_scylla_ami_versions(region_name=region_name, arch=arch, version=version)]
unit_tests/test_scylla_yaml_builders.py:            with patch("sdcm.sct_config.get_scylla_ami_versions", return_value=[self.get_scylla_ami_version_output]), \

Copy link
Contributor

Choose a reason for hiding this comment

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

I meant get_latest_scylla_ami_release to be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's not in use, but the removal of it isn't really have anything with this PR

@fruch fruch marked this pull request as ready for review December 23, 2024 15:53
@fruch fruch added the backport/none Backport is not required label Dec 23, 2024
@fruch fruch merged commit f15e1c1 into scylladb:master Dec 23, 2024
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/none Backport is not required promoted-to-master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants