microsoft / appcenter-rest-python Goto Github PK
View Code? Open in Web Editor NEWA minimal Python wrapper around the App Center REST API
License: MIT License
A minimal Python wrapper around the App Center REST API
License: MIT License
Hi,
I noticed when you call client.versions.all()
in the result the BuildInfo
object remains empty for all versions, because it is trying to deserialize the keys from the response branchName
, commitHash
and commitMessage
into the object with the keys branch_name
, commit_hash
and commit_message
.
Bastian
from appcenter import AppCenterClient
> mypy .
main.py:1:1: error: Skipping analyzing "appcenter": module is installed, but missing library stubs or py.typed marker [import]
mainpy:1:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
see https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-library-stubs-or-py-typed-marker
Hi!
This is probably not related to the sdk, but rather to the infrastructure behind it. Unfortunately, I didn't find another channel to report this. If there is one, I'd be happy to forward it there.
Anyhow, we started to receive 404
since recently for a few of our registered apps in AppCenter. There are still apps that work somehow. Is there anything we can do about this? The built-in retries don't succeed either.
WARNING:__main__.appcenter.versions:Failed to post in get_upload_url: method=POST, url=https://api.appcenter.ms/v0.1/apps/***/***/uploads/releases, status_code=404, error=<code=Not Found, message=Not found. Correlation ID: f5a9a76d-2e53-441b-b074-b720a36f7728>
Uploading a release keeps failing with 500 from server, eg.
Failed to post in release: method=POST, url=https://api.appcenter.ms/v0.1/apps/org-name/app-name/releases/1477/groups, status_code=500, error=<code=dependent_service_error, m
essage=Error: {"error":{"code":"DatabaseError","message":"Conversion failed when converting from a character string to uniqueidentifier."}}>
might be related with the recent issues at appcenter -> https://status.appcenter.ms/incidents/jvl3rs5tmdlx?u=k9xw0m8pkd90
I used directly the api and just checked if this lib is working, maybe it's also another mistake, just want to raise this here.
Hi, my team has been using this dependency as part of our CD process for awhile and we noticed the newer versions broke after 2.0.2. The error:
File "~/.pyenv/versions/3.6.8/lib/python3.6/site-packages/appcenter/__init__.py", line 19, in <module>
from appcenter.tokens import AppCenterTokensClient
File "<fstring>", line 1
(name=)
I've tracked it down to the debug statements in tokens.py
. It appears that the newer f-string syntax of "{name=}" is not supported in 3.6.x. If possible, could those be fixed to support older versions of Python? Unfortunately, we don't have any control over the version of Python available to us.
Since approx. 10:00 AM CET we are receiving appcenter.derived_client.AppCenterHTTPException from appcenter/crashes.py
`
23-Feb-2022 10:19:34 | Traceback (most recent call last): |
---|---|
23-Feb-2022 10:19:34 | File "analyse_crashes.py", line 458, in |
23-Feb-2022 10:19:34 | main() |
23-Feb-2022 10:19:34 | File "analyse_crashes.py", line 350, in main |
23-Feb-2022 10:19:34 | android_reu_groups = android_reu_crashes_handler.groups() |
23-Feb-2022 10:19:34 | File "analyse_crashes.py", line 79, in groups |
23-Feb-2022 10:19:34 | groups = list(self.client.get_error_groups(owner_name=self.owner_name, |
23-Feb-2022 10:19:34 | File "/Users/bamboo/Library/Python/3.8/lib/python/site-packages/appcenter/crashes.py", line 208, in get_error_groups |
23-Feb-2022 10:19:34 | response = self.get(request_url) |
23-Feb-2022 10:19:34 | File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tenacity/init.py", line 333, in wrapped_f |
23-Feb-2022 10:19:34 | return self(f, *args, **kw) |
23-Feb-2022 10:19:34 | File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tenacity/init.py", line 423, in call |
23-Feb-2022 10:19:34 | do = self.iter(retry_state=retry_state) |
23-Feb-2022 10:19:34 | File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tenacity/init.py", line 360, in iter |
23-Feb-2022 10:19:34 | return fut.result() |
23-Feb-2022 10:19:34 | File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/concurrent/futures/_base.py", line 432, in result |
23-Feb-2022 10:19:34 | return self.__get_result() |
23-Feb-2022 10:19:34 | File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result |
23-Feb-2022 10:19:34 | raise self._exception |
23-Feb-2022 10:19:34 | File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tenacity/init.py", line 426, in call |
23-Feb-2022 10:19:34 | result = fn(*args, **kwargs) |
23-Feb-2022 10:19:34 | File "/Users/bamboo/Library/Python/3.8/lib/python/site-packages/appcenter/derived_client.py", line 185, in get |
23-Feb-2022 10:19:34 | raise create_exception(response) |
23-Feb-2022 10:19:34 | appcenter.derived_client.AppCenterHTTPException: <method=GET, url=https://api.appcenter.ms/v0.1/apps/Home-Connect/Home-Connect-App-1/errors/errorGroups?start=2021-11-25T11%3A19%3A03&$top=30&$token=e7cbb259-aeed-407b-8d63-1eb61d241b84, status_code=502, text={"message":"internal error","err_message":"error: activity_name: graph router, exception: ESOCKETTIMEDOUT, current_request_url: /v0.1/apps/Home-Connect/Home-Connect-App-1/errors/errorGroups?start=2021-11-25T11%3A19%3A03&$top=30, api_path: v0.1/apps/{owner_name}/{app_name}/errors/errorGroups, beacon: errors, code: ESOCKETTIMEDOUT. Correlation ID: 14863e1b-34c7-4d46-b3fa-7e6897c60faf"}> |
`
I wrote a scripts to pull version info every 30 seconds and when getting all versions by :
appcenter-rest-python/appcenter/versions.py
Line 113 in 016008a
I encounter a problem that the process seems stuck sometime and the last log i got is always:
[2023-11-02 04:35:03,968][INFO][appcenter.versions] Getting versions of app: [******]
[2023-11-02 04:35:03,968][DEBUG][appcenter.versions] Generated URL: https://api.appcenter.ms/v0.1/apps/[******]/[******]
[2023-11-02 04:35:03,968][DEBUG][urllib3.connectionpool] Starting new HTTPS connection (8): api.appcenter.ms:443
[2023-11-02 04:35:28,896][DEBUG][urllib3.connectionpool] https://api.appcenter.ms:443 "GET /v0.1/apps/[******]/[******]/releases?published_only=false&scope=tester HTTP/1.1" 200 990783
After investigation i confirm that it blames to the missing timeout
setting when:
and after changing to
response = self.session.get(url, timeout=10)
things seems normal and i will get TimeoutError
as expected.
So could we add timeout argument? I am not sure should we set a default value or additionally expose it to the function that calls it.
Hello,
we are using this python-library to create issues in our issuestracker based on an appcenter crash.
Is it possible to also access the raw crash-report to attach it to our newly created issue?
I did not find anything in HandledErrorDetail
but in the "error info dictionary" (via self.client.error_info_dictionary
) I saw that there is blobReference
which kind of indicates to a JSON-file. But I did not find a way to access/download this file.
Is this possible at all?
Cheers, Andy
Hello. Method upload_and_release
under the hood has notify_testers = false
, so when using it, tests don't get emails about new release. Could you extend the contact of this method?
We are using appcenter for nightly and weekly builds. Client suddenly stopped working tonight with a 403 invalid token.
We didn't touched our script nor our access tokens.
Already checked status.appcenter.ms but distribute status is green there. Was there a change on the API that not reflected in the client?
Recent changes lead to a usage issue on our end:
in <module>
25-Jan-2022 08:26:00 client.versions.upload_and_release(
25-Jan-2022 08:26:00 TypeError: upload_and_release() got an unexpected keyword argument 'version'
I saw a version 3 is released not sure what changed yet. Will try to pin to previous release for us.
I think it would be nice to have a CHANGELOG here in repo to spot changes quickly. Also not sure if README is up to date.
Edit: i just see #7 maybe related.
I'm encountering an exception when trying to uploading a zip file for a windows artifact.
This is what I'm trying to run:
client = appcenter.AppCenterClient(access_token=accessToken)
client.versions.upload_and_release(
owner_name=ownerName,
app_name=appName,
binary_path=artifactFile, # A zip file that works when uploaded using the site.
group_id=distributionGroup, # 00000000-0000-0000-0000-000000000000 (Collaborators)
release_notes="upload test"
)
And the issues happen here:
appcenter-rest-python/appcenter/versions.py
Line 489 in da69559
This is the exception:
Exception has occurred: AttributeError (note: full exception trace is shown but execution is paused at: _run_module_as_main)
'CommitUploadResponse' object has no attribute 'get'
File "C:\Python310\Lib\site-packages\appcenter\versions.py", line 489, in _wait_for_upload
+ response_data.get("error_details", "?")
File "C:\Python310\Lib\site-packages\appcenter\versions.py", line 624, in upload_build
upload_end_response = self._wait_for_upload(
File "C:\Python310\Lib\site-packages\appcenter\versions.py", line 682, in upload_and_release
release_id = self.upload_build(
File "C:\Utils\UploadToAppCenter.py", line 72, in main
client.versions.upload_and_release(
File "C:\Utils\UploadToAppCenter.py", line 87, in <module>
main()
File "C:\Python310\Lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Python310\Lib\runpy.py", line 196, in _run_module_as_main (Current frame)
return _run_code(code, main_globals, None,
AttributeError: 'CommitUploadResponse' object has no attribute 'get'
The response I'm getting :
b'{"id":"some-guid-A","upload_status":"error","error_details":"A problem occured while extracting your app. (Correlation ID: some-guid-B)"}'
While getting crash groups and crashes, the operation will take a long time if the number of crash groups is very large.
Is that possible to get the total number of pages and download the crash group data using multiple threads?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.