Skip to content

fix(ci): get latest created tag for catalog remote tests#576

Merged
ajaskolski merged 3 commits into
mainfrom
fix-use-latest-dynamic-tag-for-catalog-tests
Nov 13, 2025
Merged

fix(ci): get latest created tag for catalog remote tests#576
ajaskolski merged 3 commits into
mainfrom
fix-use-latest-dynamic-tag-for-catalog-tests

Conversation

@ajaskolski

@ajaskolski ajaskolski commented Nov 13, 2025

Copy link
Copy Markdown
Contributor

We dont use latest tag anymore as we have settings for immutable tags. We need to get latest tag dynamically.

@changeset-bot

changeset-bot Bot commented Nov 13, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2d95e71

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ajaskolski ajaskolski changed the title fix(ci): get latest tag for catalog remote tests fix(ci): get latest created tag for catalog remote tests Nov 13, 2025
@ajaskolski ajaskolski force-pushed the fix-use-latest-dynamic-tag-for-catalog-tests branch from 153618a to a9a9ee5 Compare November 13, 2025 11:05
@ajaskolski ajaskolski marked this pull request as ready for review November 13, 2025 11:29
@ajaskolski ajaskolski requested a review from a team as a code owner November 13, 2025 11:29
Copilot AI review requested due to automatic review settings November 13, 2025 11:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the CI workflows to dynamically fetch the latest semantic version tag from ECR instead of relying on the now-immutable latest tag for catalog remote tests.

Key Changes:

  • Replaced hardcoded latest tag with dynamic tag retrieval from AWS ECR
  • Added AWS credentials configuration and tag fetching logic to both workflows
  • Moved CATALOG_SERVICE_IMAGE environment variable to the test step scope

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/schedule-main.yml Added dynamic ECR tag retrieval and updated image references to use fetched semantic version tag
.github/workflows/pull-request-main.yml Added dynamic ECR tag retrieval and updated image references to use fetched semantic version tag

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/schedule-main.yml Outdated
Comment thread .github/workflows/pull-request-main.yml Outdated
@ajaskolski ajaskolski force-pushed the fix-use-latest-dynamic-tag-for-catalog-tests branch from a9a9ee5 to 7e6c623 Compare November 13, 2025 11:34
@ajaskolski ajaskolski enabled auto-merge November 13, 2025 11:57
run: |
# Fetch all image tags from ECR and get the latest semantic version tag
# Get all tags, filter for semantic versions (vX.Y.Z), and sort properly
LATEST_TAG=$(aws ecr describe-images \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Think this will return images from older to latest. Also not sure what will happen when there are too many (eg will we use pagination?)

You could use something like this to sort then based on push date in reverse (latest first)

aws ecr describe-images --repository-name op-catalog-service \
--query 'reverse(sort_by(imageDetails,& imagePushedAt))'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

actually good idea there I will update it like that ! thx, updated !

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok now it works, simplified a bit.

Copilot AI review requested due to automatic review settings November 13, 2025 12:12
@ajaskolski ajaskolski force-pushed the fix-use-latest-dynamic-tag-for-catalog-tests branch from 7e6c623 to 60afe27 Compare November 13, 2025 12:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ajaskolski ajaskolski force-pushed the fix-use-latest-dynamic-tag-for-catalog-tests branch from 60afe27 to 088d05a Compare November 13, 2025 12:15
Copilot AI review requested due to automatic review settings November 13, 2025 12:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cl-sonarqube-production

Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

] | first
')

if [[ -z "${LATEST_TAG}" ]] || [[ "${LATEST_TAG}" == "null" ]]; then

@graham-chainlink graham-chainlink Nov 13, 2025

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

hmm i wonder if this approach of running integration test on latest docker image is the right appraoch? Shouldn we be building the docker image using the PR branch instead?

What if i updated or made a breaking change and modified the intergration tests, i would always get a failure here right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We spoke with James about it. So we own both products if we do introduce breaking changes we update upstream and downstream (cldf) in sync. You can test locally your breaking changes with local service version and update cldf when upstream service is released.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Also if somebody make breaking changes here we should fail it imo, otherwise someone can update breaking version of the CLDF in projects importing it that won't work with the running service.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Oh wait i was confused, this makes sense!

@ajaskolski ajaskolski added this pull request to the merge queue Nov 13, 2025
Merged via the queue into main with commit b301941 Nov 13, 2025
16 checks passed
@ajaskolski ajaskolski deleted the fix-use-latest-dynamic-tag-for-catalog-tests branch November 13, 2025 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants