Skip to content

Properly handle 404 errors while publishing Android artifacts#32860

Merged
mchowning merged 1 commit into
trunkfrom
fix-404-android-artifact-publishing-error
Jun 21, 2021
Merged

Properly handle 404 errors while publishing Android artifacts#32860
mchowning merged 1 commit into
trunkfrom
fix-404-android-artifact-publishing-error

Conversation

@oguzkocer
Copy link
Copy Markdown
Contributor

Description

We have made a change to the ACL settings of our S3 bucket where we publish Android artifacts to return 404 error instead of 403 for files that don't exist. This resulted in a regression in our checkIfVersionIsAlreadyPublished Gradle task in react-native-aztec & react-native-bridge projects.

Please note that this check will be removed and these build files will be refactored in a few days.

How has this been tested?

I've tried manually publishing a react-native-aztec version that exists in S3 and got the following error as expected:

'2582-1a8bb9a0c2fc1075d3c776b44fa823c9cc45d42c' is already published, please use a different version name. If this happened in CI for a PR, a new commit is necessary. If this happened for a tag, the existing version needs to be manually removed from S3.

I don't think there is any testing necessary from the reviewer. S3 publishing requires credentials and we only have them in our CIs. I think it's best to merge this in and update gutenberg-mobile to verify that the issue is resolved.

Types of changes

Android build file changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@oguzkocer oguzkocer added the Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) label Jun 21, 2021
Copy link
Copy Markdown

@AliSoftware AliSoftware left a comment

Choose a reason for hiding this comment

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

I've tested these changes by calling ./gradlew checkIfVersionIsAlreadyPublished -P publishReactNativeAztecVersion=3573-82ae7effff33b6de8078f187206300e2da874e2c with that code earlier today, and saw the expected 404 error being caught, so LGTM.

:shipit:

Copy link
Copy Markdown
Contributor

@mchowning mchowning left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks @oguzkocer ! 🙇

@mchowning mchowning merged commit 117a1bf into trunk Jun 21, 2021
@mchowning mchowning deleted the fix-404-android-artifact-publishing-error branch June 21, 2021 18:37
@github-actions github-actions Bot added this to the Gutenberg 11.0 milestone Jun 21, 2021
dcalhoun added a commit that referenced this pull request Jun 23, 2021
* Release script: Update react-native-editor version to 1.55.0

* Release script: Update with changes from 'npm run core preios'

* Release script: Update react-native-editor version to 1.55.1

* Release script: Update with changes from 'npm run core preios'

* Fix: RNMobile borderRadius value setting (#32717)

* [RNMobile] Improve unsupported block message for reusable block (#32618)

* Improve unsupported block message for reusable block

The unsupported block message has been updated and the convert to regular blocks button has been also included.

* Update unsupported block message of reusable block

* Update react-native-editor changelog

* Release script: Update react-native-editor version to 1.55.2

* Release script: Update with changes from 'npm run core preios'

* Fix incorrect block insertion point after blurring post title (#32831)

Selecting the title selection status within the same `useSelect` for
reusable blocks caused the title selection status to become stale, due
to the dependency array for the `useSelect` hook.

The staleness caused the block insertion point to show up in the
incorrect location after blurring the title text input.

* Update changelog

* Properly handle 404 errors while publishing Android artifacts (#32860)

Co-authored-by: Antonis Lilis <antonis.lilis@automattic.com>
Co-authored-by: Carlos Garcia <fluiddot@gmail.com>
Co-authored-by: Enej Bajgoric <enej.bajgoric@automattic.com>
Co-authored-by: Oguz Kocer <oguzkocer@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants