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 OCI Tests & Vendoring #1093

Open
wants to merge 74 commits into
base: main
Choose a base branch
from
Open

Fix OCI Tests & Vendoring #1093

wants to merge 74 commits into from

Conversation

haitham911
Copy link
Collaborator

@haitham911 haitham911 commented Feb 26, 2025

what

  • Ensure atmos exits non-zero when vendoring from OCI fails
  • Inject GitHub token on requests to ghcr.io
  • Do not .gitignore generated files in test/fixtures because then we cannot delete untracked files (regression)
  • Do not commit files vendored in tests (e.g. tests/fixtures/scenarios/vendor/test-components/)
  • Support tar+gz OCI artifacts
  • Respect the artifact-type: application/vnd.atmos.component.terraform.v1+tar+gzip
  • Check that files are actually vendored
  • Support backward compatibility tar artifacts
  • Use OCI fixtures managed by atmos for testing

why

  • We accidentally deleted the OCI repo that was used for testing fixtures
  • The OCI implementation was incomplete, lacking an vendor specific artifact-type
  • Files were not checked for OCI vendoring

references

@haitham911 haitham911 requested review from a team as code owners February 26, 2025 02:33
@mergify mergify bot added the triage Needs triage label Feb 26, 2025
@osterman osterman changed the title Dev 3065-Fix OCI tests & vendoring Fix OCI Tests & Vendoring Feb 26, 2025
.gitignore Outdated
Comment on lines 40 to 43

# Ignore components vendored during tests
tests/fixtures/scenarios/vendor/components/**
examples/demo-vendoring/components/**
Copy link
Member

Choose a reason for hiding this comment

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

Comment for others:

  • Files ignored with .gitignore do not appear when querying for untracked files in go-git. While they are not tracked by Git, being listed in .gitignore makes them behave as if they are, preventing their detection as untracked. We rely on untracked files to identify files for cleanup during tests, so this behavior interferes with that process.

Copy link

mergify bot commented Feb 26, 2025

💥 This pull request now has conflicts. Could you fix it @haitham911? 🙏

@mergify mergify bot added the conflict This PR has conflicts label Feb 26, 2025
@mergify mergify bot removed the conflict This PR has conflicts label Feb 28, 2025
Copy link

mergify bot commented Feb 28, 2025

💥 This pull request now has conflicts. Could you fix it @haitham911? 🙏

@mergify mergify bot added the conflict This PR has conflicts label Feb 28, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 28, 2025
@mergify mergify bot removed the triage Needs triage label Feb 28, 2025
@haitham911 haitham911 requested review from osterman and aknysh March 8, 2025 22:03
tempDirPermissions = 0o700
progressBarWidth = 30
maxWidth = 120
pkgTypeRemote pkgType = iota
Copy link
Member

Choose a reason for hiding this comment

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

what is iota?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor New features that do not break anything patch A minor, backward compatible change size/xl
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants