-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: allow skipping aws s3 uploads #48
base: main
Are you sure you want to change the base?
Conversation
9f4da0d
to
a35b381
Compare
.github/workflows/plugin-cd.yml
Outdated
@@ -29,6 +29,13 @@ on: | |||
required: false | |||
type: string | |||
|
|||
skip-aws-upload: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the CD part it's imperative to upload. This is how we download the pre-packaged plugins .
Do we also need the flag there ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we get the release on Github but not uploaded to S3, since the bundles are attached to releases here there's no need to have the S3 files around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you bundle a plugin with mattermost platform currently it is being fetched from the S3 bucket through a cloudfront distribution .
Since we have not yet changed this functionality we should continue uploading artifacts to S3
https://github.com/mattermost/mattermost/blob/master/server/build/release.mk#L147
If you are completely sure that your plugin is not going to be bundled in the future with mattermost platform then you should use this but I suggest against that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case this plugin won't be bundled since it will become EoL the moment the full feature arrives in Mattermost, and I see this being like that for a number of plugins: cc: @wiggin77
Are we putting plugins in the bucket "just in case", are we doing any kind of cleanup of deprecated/deleted/outdated plugins?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fmartingr Thanks for taking the time to look at this. I made a comment in our internal discussion to clarify that we're not saving "just in case" but as main data store - https://hub.mattermost.com/private-core/pl/epzwcuorgjgpzxgrnjamfqhrcc
are we doing any kind of cleanup of deprecated/deleted/outdated plugins?
No, for it's protected (data integrity, compliance, audit, etc) but can do so if requested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood. Removed the option from CD.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will get back to you
@@ -100,7 +107,7 @@ jobs: | |||
uses: mattermost/actions/plugin-ci/build@cd879ea9c64cc3e26a75a042d1c5066be28130a6 | |||
|
|||
delivery: | |||
if: ${{ github.repository_owner == 'mattermost' && github.event_name != 'schedule' && (github.ref_name == 'master' || github.ref_name == 'main') }} | |||
if: ${{ github.repository_owner == 'mattermost' && github.event_name != 'schedule' && (github.ref_name == 'master' || github.ref_name == 'main') && !inputs.skip-aws-upload }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will have to test that . I do not think this is evaluated as boolean .
Check here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I forgot about that, but you're right, we need to use fromJSON
or use string comparison.
Summary
Allows plugins to skip the AWS S3 artifact upload by using a new input argument:
skip-s3-upload