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

[#118] Spec and schema changes #123

Closed
wants to merge 3 commits into from

Conversation

spyrkob
Copy link
Contributor

@spyrkob spyrkob commented Nov 24, 2022

Part of #118

Copy link
Member

@jmesnil jmesnil left a comment

Choose a reason for hiding this comment

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

@spyrkob Thanks this looks great, I have a few comments but this looks good.

I wonder if we should have a non-spec document that provides an simple hypothetical example to highlight how things are pieced together?

doc/spec.adoc Outdated

### Blocking artifact versions
When using an open channel, a situation may arise where certain artifacts are promoted to the channel and later discovered to be invalid. As it’s impossible to remove artifacts already deployed into a repository, those versions have to blocklisted.
The blocklist is a separate YAML artifact included in the channel itself. When channel resolves the blacklist artifact, it will always resolve the latest available version. Any changes to the blocked artifact versions can be done independently of channel changes.
Copy link
Member

Choose a reason for hiding this comment

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

s/blacklist/blocklist

Copy link
Member

Choose a reason for hiding this comment

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

When channel resolves the blacklist artifact, it will always resolve the latest available version

does it? The block list can be referenced as groupId:artifactId[:version]. It is possible to "stick" to a given version

doc/spec.adoc Outdated Show resolved Hide resolved
doc/spec.adoc Outdated

#### Resolving channel blocklist

The blocklist is resolved when a channel is initialized. If no blocklist artifact can be resolved with supplied GAVs, the channel treats it as an empty blocklist.
Copy link
Member

Choose a reason for hiding this comment

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

If no blocklist artifact can be resolved with supplied GAVs, the channel treats it as an empty blocklist

shouldn't that be an error? If we specified a GAV for the blocklist, and it is not used (because we did not use the right location), we could eventually pull artifacts that we know are defective... this seems bad

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The use case I had in mind is if there's a channel we know might require blocklist in the future, but initially there's no blocked versions. So rather then having to create a new version of channel definition in future, the initial channel contains a "placeholder" blocklist.

But maybe a better way to do it is to require an empty blocklist to be published

doc/spec.adoc Outdated Show resolved Hide resolved
doc/spec.adoc Show resolved Hide resolved
@spyrkob
Copy link
Contributor Author

spyrkob commented Nov 25, 2022

@jmesnil I pushed some fixes and added an example doc describing how the channel would be constructed.

Looking at the schemas the manifest and blocklist are quite similar. I think by allowing the manifest to accept multiple versions, we could use it for blocklist as well. WDYT?

@jmesnil
Copy link
Member

jmesnil commented Nov 30, 2022

Looking at the schemas the manifest and blocklist are quite similar. I think by allowing the manifest to accept multiple versions, we could use it for blocklist as well. WDYT?

I'm not sure. What would it mean for a channel manifest to accept multiple versions?
We have a separate issue to be able to provision 2 versions of the same artifact (tracked by #35) which is slightly different.

@spyrkob
Copy link
Contributor Author

spyrkob commented Nov 30, 2022

I think the simplest would be always use the latest listed version ignoring the others. Or if the blocklist should work with concrete versions, it could act as a list of allowed values were the latest, non-blocked one is used

@spyrkob
Copy link
Contributor Author

spyrkob commented Dec 5, 2022

@jmesnil did you have a chance to review the changes to the spec?

@spyrkob
Copy link
Contributor Author

spyrkob commented Jan 20, 2023

included in #109

@spyrkob spyrkob closed this Jan 20, 2023
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.

Splitting channel metadata into Channel and Manifest files
2 participants