-
Notifications
You must be signed in to change notification settings - Fork 461
Package Versions
Jay Michalska edited this page Sep 15, 2025
·
1 revision
The core functionality of this feature is to track and manage local package versions. This is achieved by creating LocalPackageVersion objects.
-
PackageVersion:- This is the base database model.
- It stores a reference to a
package_idand aversionstring. - Represents a version of a package.
-
LocalPackageVersion:- This is a Single Table Inheritance (STI) subclass of
PackageVersion. - It represents a package version that is locally managed within the project.
- The
typecolumn in thepackage_versionstable will be set toLocalPackageVersionfor these objects.
- This is a Single Table Inheritance (STI) subclass of
The feature is activated when the OBS:AnityaDistribution attribute is added to a Project. This triggers a chain of events and background jobs to synchronize and manage package versions.
-
Event:
ProjectattributeOBS:AnityaDistributionis set. -
Trigger: An
after_createaction gets triggered on the new attribute. -
Action: A background job,
FetchVersionHistoriesJob, is enqueued. -
FetchVersionHistoriesJobResponsibilities:- Iterates through all
packageswithin theProjectthat now has theOBS:AnityaDistributionattribute. - For each package, it queries the OBS backend to fetch the current version.
- For each version in the fetched history, it creates a
LocalPackageVersionobject if one does not already exist.
- Iterates through all
-
Event:
Event:VersionChangeis triggered on aPackagewithin aProjectthat has theOBS:AnityaDistributionattribute. - Source: This event is typically generated by OBS when a package's version is updated (e.g., a new release is built or committed).
-
Trigger: An
after_createaction gets triggered on this event. -
Action:
after_createaction onEvent:VersionChangewill be performed. -
after_createAction Responsibilities:- Checks if the associated
Projecthas theOBS:AnityaDistributionattribute set. - Extracts the new
versionnumber from the event payload. - Creates a new
LocalPackageVersionobject for the package with the new version number.
- Checks if the associated
- Development Environment Overview
- Development Environment Tips & Tricks
- Spec-Tips
- Code Style
- Rubocop
- Testing with VCR
- Test in kanku
- Authentication
- Authorization
- Autocomplete
- BS Requests
- Events
- ProjectLog
- Notifications
- Feature Toggles
- Build Results
- Attrib classes
- Flags
- The BackendPackage Cache
- Maintenance classes
- Cloud uploader
- Delayed Jobs
- Staging Workflow
- StatusHistory
- OBS API
- Owner Search
- Search
- Links
- Distributions
- Repository
- Data Migrations
- Package Versions
- next_rails
- Ruby Update
- Rails Profiling
- Remote Pairing Setup Guide
- Factory Dashboard
- osc
- Setup an OBS Development Environment on macOS
- Run OpenQA smoketest locally
- Responsive Guidelines
- Importing database dumps
- Problem Statement & Solution
- Kickoff New Stuff
- New Swagger API doc
- Documentation and Communication
- GitHub Actions
- Brakeman
- How to Introduce Software Design Patterns
- Query Objects
- Services
- View Components
- RFC: Core Components
- RFC: Decorator Pattern
- RFC: Backend models
- RFC: Hotwire Turbo Frames Pattern